Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

vtkMaskedProgrammableGlyphFilter Class Reference

#include <vtkMaskedProgrammableGlyphFilter.h>

List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkMaskedProgrammableGlyphFilter, vtkProgrammableGlyphFilter)
void PrintSelf (ostream &os, vtkIndent indent)
 vtkSetMacro (MaximumNumberOfPoints, int)
 vtkGetMacro (MaximumNumberOfPoints, int)
virtual void SetInput (vtkDataSet *input)
 vtkSetMacro (UseMaskPoints, int)
 vtkGetMacro (UseMaskPoints, int)
void SetRandomMode (int mode)
int GetRandomMode ()
void SetGeometry (mitk::Geometry3D::Pointer geo)
mitk::Geometry3D::Pointer GetGeometry ()

Static Public Member Functions

static
vtkMaskedProgrammableGlyphFilter
New ()

Protected Member Functions

 vtkMaskedProgrammableGlyphFilter ()
 ~vtkMaskedProgrammableGlyphFilter ()
virtual void Execute ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

vtkMaskPoints * MaskPoints
int MaximumNumberOfPoints
int UseMaskPoints
mitk::Geometry3D::Pointer m_Geometry

Detailed Description

This class masked points of the input data set and glyphs only the selected poitns. Points may be selected either by random or by ratio. Additionally, this class allows to set the InputScalars, InputVectors and InputNormals by their field name in the input dataset.

Definition at line 35 of file vtkMaskedProgrammableGlyphFilter.h.


Constructor & Destructor Documentation

vtkMaskedProgrammableGlyphFilter::vtkMaskedProgrammableGlyphFilter (  ) [protected]

Definition at line 27 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints, MaximumNumberOfPoints, New(), and UseMaskPoints.

{
  //this->SetColorModeToColorByScalar();
  //this->SetScaleModeToScaleByVector();
  this->MaskPoints = vtkMaskPoints::New();
  this->MaximumNumberOfPoints = 5000;
  this->UseMaskPoints = 1;
}
vtkMaskedProgrammableGlyphFilter::~vtkMaskedProgrammableGlyphFilter (  ) [protected]

Definition at line 36 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints.

{
  if(this->MaskPoints)
    {
    this->MaskPoints->Delete();
    }
}

Member Function Documentation

void vtkMaskedProgrammableGlyphFilter::Execute (  ) [protected, virtual]

Definition at line 60 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints, MaximumNumberOfPoints, SetInput(), and UseMaskPoints.

{
  if (this->UseMaskPoints)
    {
    this->Superclass::SetInput(this->MaskPoints->GetOutput());
    vtkIdType numPts = this->MaskPoints->GetPolyDataInput(0)->GetNumberOfPoints();
    this->MaskPoints->SetMaximumNumberOfPoints(MaximumNumberOfPoints);
    double onRatio = MaximumNumberOfPoints != 0.0 ? numPts / MaximumNumberOfPoints : 1.0;
    this->MaskPoints->SetOnRatio(onRatio);
    this->MaskPoints->Update();
    }
  else
    {
      this->Superclass::SetInput(this->MaskPoints->GetInput());
    }
  
  this->Superclass::Execute();
}
mitk::Geometry3D::Pointer vtkMaskedProgrammableGlyphFilter::GetGeometry (  ) [inline]
int vtkMaskedProgrammableGlyphFilter::GetRandomMode (  )

Definition at line 55 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints.

{
  return this->MaskPoints->GetRandomMode();
}
static vtkMaskedProgrammableGlyphFilter* vtkMaskedProgrammableGlyphFilter::New (  ) [static]
void vtkMaskedProgrammableGlyphFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

Definition at line 102 of file vtkMaskedProgrammableGlyphFilter.cpp.

References UseMaskPoints.

{
  this->Superclass::PrintSelf(os,indent);
  //os << indent << "InputScalarsSelection: " 
  //   << (this->InputScalarsSelection ? this->InputScalarsSelection : "(none)")
  //   << endl;

  //os << indent << "InputVectorsSelection: " 
  //   << (this->InputVectorsSelection ? this->InputVectorsSelection : "(none)")
  //   << endl;

  //os << indent << "InputNormalsSelection: " 
  //   << (this->InputNormalsSelection ? this->InputNormalsSelection : "(none)")
  //   << endl;
  
  os << indent << "MaximumNumberOfPoints: " << this->GetMaximumNumberOfPoints()
     << endl;

  os << indent << "UseMaskPoints: " << (this->UseMaskPoints?"on":"off") << endl;
}
int vtkMaskedProgrammableGlyphFilter::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
) [protected, virtual]

Definition at line 79 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints, MaximumNumberOfPoints, SetInput(), and UseMaskPoints.

{
  if (this->UseMaskPoints)
  {
    this->Superclass::SetInput(this->MaskPoints->GetOutput());
    vtkIdType numPts = this->MaskPoints->GetPolyDataInput(0)->GetNumberOfPoints();
    this->MaskPoints->SetMaximumNumberOfPoints(MaximumNumberOfPoints);
    this->MaskPoints->SetOnRatio(numPts / MaximumNumberOfPoints);
    this->MaskPoints->Update();
  }
  else
  {
    this->Superclass::SetInput(this->MaskPoints->GetInput());
  }
  
  return this->Superclass::RequestData(
    request,inputVector,outputVector);
}
void vtkMaskedProgrammableGlyphFilter::SetGeometry ( mitk::Geometry3D::Pointer  geo ) [inline]

If you want to use an arbitrary scalars array, then set its name here. By default this in NULL and the filter will use the active scalar array. If you want to use an arbitrary vectors array, then set its name here. By default this in NULL and the filter will use the active vector array. If you want to use an arbitrary normals array, then set its name here. By default this in NULL and the filter will use the active normal array.

Definition at line 93 of file vtkMaskedProgrammableGlyphFilter.h.

Referenced by mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >::Slice().

  { this->m_Geometry = geo; }
void vtkMaskedProgrammableGlyphFilter::SetInput ( vtkDataSet *  input ) [virtual]

Set the input to this filter.

Definition at line 44 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints.

Referenced by Execute(), RequestData(), and mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >::Slice().

{
  this->MaskPoints->SetInput(input);
  this->Superclass::SetInput(this->MaskPoints->GetOutput());
}
void vtkMaskedProgrammableGlyphFilter::SetRandomMode ( int  mode )

Set/get flag to cause randomization of which points to mask.

Definition at line 50 of file vtkMaskedProgrammableGlyphFilter.cpp.

References MaskPoints.

Referenced by mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >::Slice().

{
  this->MaskPoints->SetRandomMode(mode);
}
vtkMaskedProgrammableGlyphFilter::vtkGetMacro ( MaximumNumberOfPoints  ,
int   
)
vtkMaskedProgrammableGlyphFilter::vtkGetMacro ( UseMaskPoints  ,
int   
)
vtkMaskedProgrammableGlyphFilter::vtkSetMacro ( UseMaskPoints  ,
int   
)

Set/get whether to mask points

vtkMaskedProgrammableGlyphFilter::vtkSetMacro ( MaximumNumberOfPoints  ,
int   
)

Limit the number of points to glyph

vtkMaskedProgrammableGlyphFilter::vtkTypeRevisionMacro ( vtkMaskedProgrammableGlyphFilter  ,
vtkProgrammableGlyphFilter   
)

Member Data Documentation

Definition at line 109 of file vtkMaskedProgrammableGlyphFilter.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines