#include <vtkMaskedGlyph3D.h>
Public Member Functions | |
vtkTypeRevisionMacro (vtkMaskedGlyph3D, vtkGlyph3D) | |
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 () |
virtual void | SetInputConnection (vtkAlgorithmOutput *input) |
Static Public Member Functions | |
static vtkMaskedGlyph3D * | New () |
Protected Member Functions | |
vtkMaskedGlyph3D () | |
~vtkMaskedGlyph3D () | |
virtual void | Execute () |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
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 36 of file vtkMaskedGlyph3D.h.
vtkMaskedGlyph3D::vtkMaskedGlyph3D | ( | ) | [protected] |
Definition at line 27 of file vtkMaskedGlyph3D.cpp.
References MaskPoints, MaximumNumberOfPoints, New(), and UseMaskPoints.
{ this->SetColorModeToColorByScalar(); this->SetScaleModeToScaleByVector(); this->MaskPoints = vtkMaskPoints::New(); this->MaximumNumberOfPoints = 5000; this->UseMaskPoints = 1; }
vtkMaskedGlyph3D::~vtkMaskedGlyph3D | ( | ) | [protected] |
Definition at line 36 of file vtkMaskedGlyph3D.cpp.
References MaskPoints.
{ if(this->MaskPoints) { this->MaskPoints->Delete(); } }
void vtkMaskedGlyph3D::Execute | ( | ) | [protected, virtual] |
Definition at line 66 of file vtkMaskedGlyph3D.cpp.
References MaskPoints, MaximumNumberOfPoints, SetInput(), and UseMaskPoints.
{ if (this->UseMaskPoints) { vtkIdType numPts = this->MaskPoints->GetPolyDataInput(0)->GetNumberOfPoints(); this->MaskPoints->SetMaximumNumberOfPoints( MaximumNumberOfPoints ); this->MaskPoints->SetOnRatio( numPts / MaximumNumberOfPoints ); this->MaskPoints->Update(); this->Superclass::SetInput(this->MaskPoints->GetOutput()); } else { this->Superclass::SetInput(this->MaskPoints->GetInput()); } this->Superclass::Execute(); }
int vtkMaskedGlyph3D::GetRandomMode | ( | ) |
Definition at line 61 of file vtkMaskedGlyph3D.cpp.
References MaskPoints.
{ return this->MaskPoints->GetRandomMode(); }
static vtkMaskedGlyph3D* vtkMaskedGlyph3D::New | ( | ) | [static] |
Constructor
Referenced by mitk::VectorImageMapper2D::Paint(), and vtkMaskedGlyph3D().
void vtkMaskedGlyph3D::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Definition at line 106 of file vtkMaskedGlyph3D.cpp.
References UseMaskPoints.
{ this->Superclass::PrintSelf(os,indent); os << indent << "MaximumNumberOfPoints: " << this->GetMaximumNumberOfPoints() << endl; os << indent << "UseMaskPoints: " << (this->UseMaskPoints?"on":"off") << endl; }
int vtkMaskedGlyph3D::RequestData | ( | vtkInformation * | request, |
vtkInformationVector ** | inputVector, | ||
vtkInformationVector * | outputVector | ||
) | [protected, virtual] |
Definition at line 84 of file vtkMaskedGlyph3D.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 vtkMaskedGlyph3D::SetInput | ( | vtkDataSet * | input ) | [virtual] |
Set the input to this filter.
Definition at line 44 of file vtkMaskedGlyph3D.cpp.
References MaskPoints, and SetInputConnection().
Referenced by Execute(), and RequestData().
{ this->MaskPoints->SetInput(input); this->Superclass::SetInputConnection(this->MaskPoints->GetOutputPort()); }
void vtkMaskedGlyph3D::SetInputConnection | ( | vtkAlgorithmOutput * | input ) | [virtual] |
Definition at line 50 of file vtkMaskedGlyph3D.cpp.
References MaskPoints.
Referenced by mitk::VectorImageMapper2D::Paint(), and SetInput().
{ this->MaskPoints->SetInputConnection(input); this->Superclass::SetInputConnection(this->MaskPoints->GetOutputPort()); }
void vtkMaskedGlyph3D::SetRandomMode | ( | int | mode ) |
Set/get flag to cause randomization of which points to mask.
Definition at line 56 of file vtkMaskedGlyph3D.cpp.
References MaskPoints.
Referenced by mitk::VectorImageMapper2D::Paint().
{ this->MaskPoints->SetRandomMode(mode); }
vtkMaskedGlyph3D::vtkGetMacro | ( | MaximumNumberOfPoints | , |
int | |||
) |
vtkMaskedGlyph3D::vtkGetMacro | ( | UseMaskPoints | , |
int | |||
) |
vtkMaskedGlyph3D::vtkSetMacro | ( | MaximumNumberOfPoints | , |
int | |||
) |
Limit the number of points to glyph
vtkMaskedGlyph3D::vtkSetMacro | ( | UseMaskPoints | , |
int | |||
) |
Set/get whether to mask points
vtkMaskedGlyph3D::vtkTypeRevisionMacro | ( | vtkMaskedGlyph3D | , |
vtkGlyph3D | |||
) |
vtkMaskPoints* vtkMaskedGlyph3D::MaskPoints [protected] |
Definition at line 79 of file vtkMaskedGlyph3D.h.
Referenced by Execute(), GetRandomMode(), RequestData(), SetInput(), SetInputConnection(), SetRandomMode(), vtkMaskedGlyph3D(), and ~vtkMaskedGlyph3D().
int vtkMaskedGlyph3D::MaximumNumberOfPoints [protected] |
Definition at line 80 of file vtkMaskedGlyph3D.h.
Referenced by Execute(), RequestData(), and vtkMaskedGlyph3D().
int vtkMaskedGlyph3D::UseMaskPoints [protected] |
Definition at line 81 of file vtkMaskedGlyph3D.h.
Referenced by Execute(), PrintSelf(), RequestData(), and vtkMaskedGlyph3D().