vtkGenericGlyph3DFilter Class Reference

#include <vtkGenericGlyph3DFilter.h>

Inheritance diagram for vtkGenericGlyph3DFilter:

Inheritance graph
[legend]
Collaboration diagram for vtkGenericGlyph3DFilter:

Collaboration graph
[legend]

List of all members.


Detailed Description

copy oriented and scaled glyph geometry to every input point

vtkGenericGlyph3DFilter is a filter that copies a geometric representation (called a glyph) to every point in the input dataset. The glyph is defined with polygonal data from a source filter input. The glyph may be oriented along the input vectors or normals, and it may be scaled according to scalar data or vector magnitude. More than one glyph may be used by creating a table of source objects, each defining a different glyph. If a table of glyphs is defined, then the table can be indexed into by using either scalar value or vector magnitude.

To use this object you'll have to provide an input dataset and a source to define the glyph. Then decide whether you want to scale the glyph and how to scale the glyph (using scalar value or vector magnitude). Next decide whether you want to orient the glyph, and whether to use the vector data or normal data to orient it. Finally, decide whether to use a table of glyphs, or just a single glyph. If you use a table of glyphs, you'll have to decide whether to index into it with scalar value or with vector magnitude.

Warning:
Contrary to vtkGlyph3D, the only way to specify which attributes will be used for scaling, coloring and orienting is through SelectInputScalars(), SelectInputVectors() and SelectInputNormals().

The scaling of the glyphs is controlled by the ScaleFactor ivar multiplied by the scalar value at each point (if VTK_SCALE_BY_SCALAR is set), or multiplied by the vector magnitude (if VTK_SCALE_BY_VECTOR is set), Alternatively (if VTK_SCALE_BY_VECTORCOMPONENTS is set), the scaling may be specified for x,y,z using the vector components. The scale factor can be further controlled by enabling clamping using the Clamping ivar. If clamping is enabled, the scale is normalized by the Range ivar, and then multiplied by the scale factor. The normalization process includes clamping the scale value between (0,1).

Typically this object operates on input data with scalar and/or vector data. However, scalar and/or vector aren't necessary, and it can be used to copy data from a single source to each point. In this case the scale factor can be used to uniformly scale the glyphs.

The object uses "vector" data to scale glyphs, orient glyphs, and/or index into a table of glyphs. You can choose to use either the vector or normal data at each input point. Use the method SetVectorModeToUseVector() to use the vector input data, and SetVectorModeToUseNormal() to use the normal input data.

If you do use a table of glyphs, make sure to set the Range ivar to make sure the index into the glyph table is computed correctly.

You can turn off scaling of the glyphs completely by using the Scaling ivar. You can also turn off scaling due to data (either vector or scalar) by using the SetScaleModeToDataScalingOff() method.

See also:
vtkTensorGlyph
Tests:
vtkGenericGlyph3DFilter (Tests)

Definition at line 103 of file vtkGenericGlyph3DFilter.h.


Public Types

typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetSource (vtkPolyData *pd)
void SetSource (int id, vtkPolyData *pd)
vtkPolyDataGetSource (int id=0)
virtual void SetScaling (int)
virtual void ScalingOn ()
virtual void ScalingOff ()
virtual int GetScaling ()
virtual void SetScaleMode (int)
virtual int GetScaleMode ()
void SetScaleModeToScaleByScalar ()
void SetScaleModeToScaleByVector ()
void SetScaleModeToScaleByVectorComponents ()
void SetScaleModeToDataScalingOff ()
const char * GetScaleModeAsString ()
virtual void SetColorMode (int)
virtual int GetColorMode ()
void SetColorModeToColorByScale ()
void SetColorModeToColorByScalar ()
void SetColorModeToColorByVector ()
const char * GetColorModeAsString ()
virtual void SetScaleFactor (double)
virtual double GetScaleFactor ()
virtual void SetRange (double, double)
void SetRange (double[2])
virtual double * GetRange ()
virtual void GetRange (double data[2])
virtual void SetOrient (int)
virtual void OrientOn ()
virtual void OrientOff ()
virtual int GetOrient ()
virtual void SetClamping (int)
virtual void ClampingOn ()
virtual void ClampingOff ()
virtual int GetClamping ()
virtual void SetVectorMode (int)
virtual int GetVectorMode ()
void SetVectorModeToUseVector ()
void SetVectorModeToUseNormal ()
void SetVectorModeToVectorRotationOff ()
const char * GetVectorModeAsString ()
virtual void SetIndexMode (int)
virtual int GetIndexMode ()
void SetIndexModeToScalar ()
void SetIndexModeToVector ()
void SetIndexModeToOff ()
const char * GetIndexModeAsString ()
virtual void SetGeneratePointIds (int)
virtual int GetGeneratePointIds ()
virtual void GeneratePointIdsOn ()
virtual void GeneratePointIdsOff ()
virtual void SetPointIdsName (const char *)
virtual char * GetPointIdsName ()
virtual char * GetInputScalarsSelection ()
void SelectInputScalars (const char *fieldName)
virtual char * GetInputVectorsSelection ()
void SelectInputVectors (const char *fieldName)
virtual char * GetInputNormalsSelection ()
void SelectInputNormals (const char *fieldName)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkGenericGlyph3DFilterSafeDownCast (vtkObject *o)
static vtkGenericGlyph3DFilterNew ()

Protected Member Functions

 vtkGenericGlyph3DFilter ()
 ~vtkGenericGlyph3DFilter ()
int FillInputPortInformation (int, vtkInformation *)
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void SetInputScalarsSelection (const char *)
virtual void SetInputVectorsSelection (const char *)
virtual void SetInputNormalsSelection (const char *)

Protected Attributes

vtkPolyData ** Source
int Scaling
int ScaleMode
int ColorMode
double ScaleFactor
double Range [2]
int Orient
int VectorMode
int Clamping
int IndexMode
int GeneratePointIds
char * PointIdsName
char * InputScalarsSelection
char * InputVectorsSelection
char * InputNormalsSelection

Member Typedef Documentation

Reimplemented from vtkPolyDataAlgorithm.

Definition at line 106 of file vtkGenericGlyph3DFilter.h.


Constructor & Destructor Documentation

vtkGenericGlyph3DFilter::vtkGenericGlyph3DFilter (  )  [protected]

vtkGenericGlyph3DFilter::~vtkGenericGlyph3DFilter (  )  [protected]


Member Function Documentation

virtual const char* vtkGenericGlyph3DFilter::GetClassName (  )  [virtual]

Reimplemented from vtkPolyDataAlgorithm.

static int vtkGenericGlyph3DFilter::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

virtual int vtkGenericGlyph3DFilter::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

static vtkGenericGlyph3DFilter* vtkGenericGlyph3DFilter::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkPolyDataAlgorithm.

void vtkGenericGlyph3DFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPolyDataAlgorithm.

static vtkGenericGlyph3DFilter* vtkGenericGlyph3DFilter::New (  )  [static]

Construct object with scaling on, scaling mode is by scalar value, scale factor = 1.0, the range is (0,1), orient geometry is on, and orientation is by vector. Clamping and indexing are turned off. No initial sources are defined.

Reimplemented from vtkPolyDataAlgorithm.

void vtkGenericGlyph3DFilter::SetSource ( vtkPolyData pd  )  [inline]

Set the source to use for the glyph.

Definition at line 116 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetSource ( int  id,
vtkPolyData pd 
)

Specify a source object at a specified table location.

vtkPolyData* vtkGenericGlyph3DFilter::GetSource ( int  id = 0  ) 

Get a pointer to a source object at a specified table location.

virtual void vtkGenericGlyph3DFilter::SetScaling ( int   )  [virtual]

Turn on/off scaling of source geometry.

virtual void vtkGenericGlyph3DFilter::ScalingOn (  )  [virtual]

Turn on/off scaling of source geometry.

virtual void vtkGenericGlyph3DFilter::ScalingOff (  )  [virtual]

Turn on/off scaling of source geometry.

virtual int vtkGenericGlyph3DFilter::GetScaling (  )  [virtual]

Turn on/off scaling of source geometry.

virtual void vtkGenericGlyph3DFilter::SetScaleMode ( int   )  [virtual]

Either scale by scalar or by vector/normal magnitude.

virtual int vtkGenericGlyph3DFilter::GetScaleMode (  )  [virtual]

Either scale by scalar or by vector/normal magnitude.

void vtkGenericGlyph3DFilter::SetScaleModeToScaleByScalar (  )  [inline]

Either scale by scalar or by vector/normal magnitude.

Definition at line 135 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetScaleModeToScaleByVector (  )  [inline]

Either scale by scalar or by vector/normal magnitude.

Definition at line 137 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetScaleModeToScaleByVectorComponents (  )  [inline]

Either scale by scalar or by vector/normal magnitude.

Definition at line 139 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetScaleModeToDataScalingOff (  )  [inline]

Either scale by scalar or by vector/normal magnitude.

Definition at line 141 of file vtkGenericGlyph3DFilter.h.

const char * vtkGenericGlyph3DFilter::GetScaleModeAsString (  )  [inline]

Return the method of scaling as a descriptive character string.

Definition at line 290 of file vtkGenericGlyph3DFilter.h.

virtual void vtkGenericGlyph3DFilter::SetColorMode ( int   )  [virtual]

Either color by scale, scalar or by vector/normal magnitude.

virtual int vtkGenericGlyph3DFilter::GetColorMode (  )  [virtual]

Either color by scale, scalar or by vector/normal magnitude.

void vtkGenericGlyph3DFilter::SetColorModeToColorByScale (  )  [inline]

Either color by scale, scalar or by vector/normal magnitude.

Definition at line 150 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetColorModeToColorByScalar (  )  [inline]

Either color by scale, scalar or by vector/normal magnitude.

Definition at line 152 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetColorModeToColorByVector (  )  [inline]

Either color by scale, scalar or by vector/normal magnitude.

Definition at line 154 of file vtkGenericGlyph3DFilter.h.

const char * vtkGenericGlyph3DFilter::GetColorModeAsString (  )  [inline]

Return the method of coloring as a descriptive character string.

Definition at line 309 of file vtkGenericGlyph3DFilter.h.

virtual void vtkGenericGlyph3DFilter::SetScaleFactor ( double   )  [virtual]

Specify scale factor to scale object by.

virtual double vtkGenericGlyph3DFilter::GetScaleFactor (  )  [virtual]

Specify scale factor to scale object by.

virtual void vtkGenericGlyph3DFilter::SetRange ( double  ,
double   
) [virtual]

Specify range to map scalar values into.

void vtkGenericGlyph3DFilter::SetRange ( double  [2]  ) 

Specify range to map scalar values into.

virtual double* vtkGenericGlyph3DFilter::GetRange (  )  [virtual]

Specify range to map scalar values into.

virtual void vtkGenericGlyph3DFilter::GetRange ( double  data[2]  )  [virtual]

Specify range to map scalar values into.

virtual void vtkGenericGlyph3DFilter::SetOrient ( int   )  [virtual]

Turn on/off orienting of input geometry along vector/normal.

virtual void vtkGenericGlyph3DFilter::OrientOn (  )  [virtual]

Turn on/off orienting of input geometry along vector/normal.

virtual void vtkGenericGlyph3DFilter::OrientOff (  )  [virtual]

Turn on/off orienting of input geometry along vector/normal.

virtual int vtkGenericGlyph3DFilter::GetOrient (  )  [virtual]

Turn on/off orienting of input geometry along vector/normal.

virtual void vtkGenericGlyph3DFilter::SetClamping ( int   )  [virtual]

Turn on/off clamping of "scalar" values to range. (Scalar value may be vector magnitude if ScaleByVector() is enabled.)

virtual void vtkGenericGlyph3DFilter::ClampingOn (  )  [virtual]

Turn on/off clamping of "scalar" values to range. (Scalar value may be vector magnitude if ScaleByVector() is enabled.)

virtual void vtkGenericGlyph3DFilter::ClampingOff (  )  [virtual]

Turn on/off clamping of "scalar" values to range. (Scalar value may be vector magnitude if ScaleByVector() is enabled.)

virtual int vtkGenericGlyph3DFilter::GetClamping (  )  [virtual]

Turn on/off clamping of "scalar" values to range. (Scalar value may be vector magnitude if ScaleByVector() is enabled.)

virtual void vtkGenericGlyph3DFilter::SetVectorMode ( int   )  [virtual]

Specify whether to use vector or normal to perform vector operations.

virtual int vtkGenericGlyph3DFilter::GetVectorMode (  )  [virtual]

Specify whether to use vector or normal to perform vector operations.

void vtkGenericGlyph3DFilter::SetVectorModeToUseVector (  )  [inline]

Specify whether to use vector or normal to perform vector operations.

Definition at line 190 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetVectorModeToUseNormal (  )  [inline]

Specify whether to use vector or normal to perform vector operations.

Definition at line 191 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetVectorModeToVectorRotationOff (  )  [inline]

Specify whether to use vector or normal to perform vector operations.

Definition at line 192 of file vtkGenericGlyph3DFilter.h.

const char * vtkGenericGlyph3DFilter::GetVectorModeAsString (  )  [inline]

Return the vector mode as a character string.

Definition at line 328 of file vtkGenericGlyph3DFilter.h.

virtual void vtkGenericGlyph3DFilter::SetIndexMode ( int   )  [virtual]

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

virtual int vtkGenericGlyph3DFilter::GetIndexMode (  )  [virtual]

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

void vtkGenericGlyph3DFilter::SetIndexModeToScalar (  )  [inline]

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

Definition at line 203 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetIndexModeToVector (  )  [inline]

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

Definition at line 204 of file vtkGenericGlyph3DFilter.h.

void vtkGenericGlyph3DFilter::SetIndexModeToOff (  )  [inline]

Index into table of sources by scalar, by vector/normal magnitude, or no indexing. If indexing is turned off, then the first source glyph in the table of glyphs is used.

Definition at line 205 of file vtkGenericGlyph3DFilter.h.

const char * vtkGenericGlyph3DFilter::GetIndexModeAsString (  )  [inline]

Return the index mode as a character string.

Definition at line 347 of file vtkGenericGlyph3DFilter.h.

virtual void vtkGenericGlyph3DFilter::SetGeneratePointIds ( int   )  [virtual]

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual int vtkGenericGlyph3DFilter::GetGeneratePointIds (  )  [virtual]

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGenericGlyph3DFilter::GeneratePointIdsOn (  )  [virtual]

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGenericGlyph3DFilter::GeneratePointIdsOff (  )  [virtual]

Enable/disable the generation of point ids as part of the output. The point ids are the id of the input generating point. The point ids are stored in the output point field data and named "InputPointIds". Point generation is useful for debugging and pick operations.

virtual void vtkGenericGlyph3DFilter::SetPointIdsName ( const char *   )  [virtual]

Set/Get the name of the PointIds array if generated. By default the Ids are named "InputPointIds", but this can be changed with this function.

virtual char* vtkGenericGlyph3DFilter::GetPointIdsName (  )  [virtual]

Set/Get the name of the PointIds array if generated. By default the Ids are named "InputPointIds", but this can be changed with this function.

virtual char* vtkGenericGlyph3DFilter::GetInputScalarsSelection (  )  [virtual]

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.

void vtkGenericGlyph3DFilter::SelectInputScalars ( const char *  fieldName  )  [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.

Definition at line 232 of file vtkGenericGlyph3DFilter.h.

virtual char* vtkGenericGlyph3DFilter::GetInputVectorsSelection (  )  [virtual]

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.

void vtkGenericGlyph3DFilter::SelectInputVectors ( const char *  fieldName  )  [inline]

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.

Definition at line 241 of file vtkGenericGlyph3DFilter.h.

virtual char* vtkGenericGlyph3DFilter::GetInputNormalsSelection (  )  [virtual]

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.

void vtkGenericGlyph3DFilter::SelectInputNormals ( const char *  fieldName  )  [inline]

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 250 of file vtkGenericGlyph3DFilter.h.

int vtkGenericGlyph3DFilter::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkPolyDataAlgorithm.

int vtkGenericGlyph3DFilter::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

int vtkGenericGlyph3DFilter::RequestInformation ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

Reimplemented from vtkPolyDataAlgorithm.

int vtkGenericGlyph3DFilter::RequestUpdateExtent ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

virtual void vtkGenericGlyph3DFilter::SetInputScalarsSelection ( const char *   )  [protected, virtual]

virtual void vtkGenericGlyph3DFilter::SetInputVectorsSelection ( const char *   )  [protected, virtual]

virtual void vtkGenericGlyph3DFilter::SetInputNormalsSelection ( const char *   )  [protected, virtual]


Member Data Documentation

Definition at line 263 of file vtkGenericGlyph3DFilter.h.

Definition at line 264 of file vtkGenericGlyph3DFilter.h.

Definition at line 265 of file vtkGenericGlyph3DFilter.h.

Definition at line 266 of file vtkGenericGlyph3DFilter.h.

Definition at line 267 of file vtkGenericGlyph3DFilter.h.

double vtkGenericGlyph3DFilter::Range[2] [protected]

Definition at line 268 of file vtkGenericGlyph3DFilter.h.

Definition at line 269 of file vtkGenericGlyph3DFilter.h.

Definition at line 270 of file vtkGenericGlyph3DFilter.h.

Definition at line 271 of file vtkGenericGlyph3DFilter.h.

Definition at line 272 of file vtkGenericGlyph3DFilter.h.

Definition at line 273 of file vtkGenericGlyph3DFilter.h.

Definition at line 274 of file vtkGenericGlyph3DFilter.h.

Definition at line 276 of file vtkGenericGlyph3DFilter.h.

Definition at line 277 of file vtkGenericGlyph3DFilter.h.

Definition at line 278 of file vtkGenericGlyph3DFilter.h.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:37:25 2011 for VTK by  doxygen 1.5.6