#include <vtkMaskedGlyph2D.h>
Public Member Functions | |
vtkTypeRevisionMacro (vtkMaskedGlyph2D, vtkGlyph2D) | |
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 () |
Static Public Member Functions | |
static vtkMaskedGlyph2D * | New () |
Protected Member Functions | |
vtkMaskedGlyph2D () | |
~vtkMaskedGlyph2D () | |
virtual void | Execute () |
Protected Attributes | |
vtkMaskPoints * | MaskPoints |
int | MaximumNumberOfPoints |
int | UseMaskPoints |
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 vtkMaskedGlyph2D.h.
vtkMaskedGlyph2D::vtkMaskedGlyph2D | ( | ) | [protected] |
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 27 of file vtkMaskedGlyph2D.cpp.
References MaskPoints, MaximumNumberOfPoints, New(), and UseMaskPoints.
{ this->SetColorModeToColorByScalar(); this->SetScaleModeToScaleByVector(); this->MaskPoints = vtkMaskPoints::New(); this->MaximumNumberOfPoints = 5000; this->UseMaskPoints = 1; }
vtkMaskedGlyph2D::~vtkMaskedGlyph2D | ( | ) | [protected] |
Definition at line 36 of file vtkMaskedGlyph2D.cpp.
References MaskPoints.
{ if(this->MaskPoints) { this->MaskPoints->Delete(); } }
void vtkMaskedGlyph2D::Execute | ( | ) | [protected, virtual] |
Definition at line 60 of file vtkMaskedGlyph2D.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()); } this->Superclass::Execute(); }
int vtkMaskedGlyph2D::GetRandomMode | ( | ) |
Definition at line 55 of file vtkMaskedGlyph2D.cpp.
References MaskPoints.
{ return this->MaskPoints->GetRandomMode(); }
static vtkMaskedGlyph2D* vtkMaskedGlyph2D::New | ( | ) | [static] |
Constructor
Referenced by vtkMaskedGlyph2D().
void vtkMaskedGlyph2D::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Definition at line 78 of file vtkMaskedGlyph2D.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; }
void vtkMaskedGlyph2D::SetInput | ( | vtkDataSet * | input ) | [virtual] |
Set the input to this filter.
Definition at line 44 of file vtkMaskedGlyph2D.cpp.
References MaskPoints.
Referenced by Execute().
{ this->MaskPoints->SetInput(input); this->Superclass::SetInput(this->MaskPoints->GetOutput()); }
void vtkMaskedGlyph2D::SetRandomMode | ( | int | mode ) |
Set/get flag to cause randomization of which points to mask.
Definition at line 50 of file vtkMaskedGlyph2D.cpp.
References MaskPoints.
{ this->MaskPoints->SetRandomMode(mode); }
vtkMaskedGlyph2D::vtkGetMacro | ( | MaximumNumberOfPoints | , |
int | |||
) |
vtkMaskedGlyph2D::vtkGetMacro | ( | UseMaskPoints | , |
int | |||
) |
vtkMaskedGlyph2D::vtkSetMacro | ( | UseMaskPoints | , |
int | |||
) |
Set/get whether to mask points
vtkMaskedGlyph2D::vtkSetMacro | ( | MaximumNumberOfPoints | , |
int | |||
) |
Limit the number of points to glyph
vtkMaskedGlyph2D::vtkTypeRevisionMacro | ( | vtkMaskedGlyph2D | , |
vtkGlyph2D | |||
) |
vtkMaskPoints* vtkMaskedGlyph2D::MaskPoints [protected] |
Definition at line 99 of file vtkMaskedGlyph2D.h.
Referenced by Execute(), GetRandomMode(), SetInput(), SetRandomMode(), vtkMaskedGlyph2D(), and ~vtkMaskedGlyph2D().
int vtkMaskedGlyph2D::MaximumNumberOfPoints [protected] |
Definition at line 100 of file vtkMaskedGlyph2D.h.
Referenced by Execute(), and vtkMaskedGlyph2D().
int vtkMaskedGlyph2D::UseMaskPoints [protected] |
Definition at line 101 of file vtkMaskedGlyph2D.h.
Referenced by Execute(), PrintSelf(), and vtkMaskedGlyph2D().