#include <vtkMaskedProgrammableGlyphFilter.h>
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 |
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.
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(); } }
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] |
Definition at line 95 of file vtkMaskedProgrammableGlyphFilter.h.
Referenced by mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >::GlyphMethod().
{ return this->m_Geometry; }
int vtkMaskedProgrammableGlyphFilter::GetRandomMode | ( | ) |
Definition at line 55 of file vtkMaskedProgrammableGlyphFilter.cpp.
References MaskPoints.
{ return this->MaskPoints->GetRandomMode(); }
static vtkMaskedProgrammableGlyphFilter* vtkMaskedProgrammableGlyphFilter::New | ( | ) | [static] |
Constructor
Referenced by mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >::Slice(), and vtkMaskedProgrammableGlyphFilter().
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 | |||
) |
Definition at line 109 of file vtkMaskedProgrammableGlyphFilter.h.
vtkMaskPoints* vtkMaskedProgrammableGlyphFilter::MaskPoints [protected] |
Definition at line 105 of file vtkMaskedProgrammableGlyphFilter.h.
Referenced by Execute(), GetRandomMode(), RequestData(), SetInput(), SetRandomMode(), vtkMaskedProgrammableGlyphFilter(), and ~vtkMaskedProgrammableGlyphFilter().
int vtkMaskedProgrammableGlyphFilter::MaximumNumberOfPoints [protected] |
Definition at line 106 of file vtkMaskedProgrammableGlyphFilter.h.
Referenced by Execute(), RequestData(), and vtkMaskedProgrammableGlyphFilter().
int vtkMaskedProgrammableGlyphFilter::UseMaskPoints [protected] |
Definition at line 107 of file vtkMaskedProgrammableGlyphFilter.h.
Referenced by Execute(), PrintSelf(), RequestData(), and vtkMaskedProgrammableGlyphFilter().