#include <vtkProgrammableGlyphFilter.h>
Inheritance diagram for vtkProgrammableGlyphFilter:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetSource (vtkPolyData *source) |
vtkPolyData * | GetSource () |
void | SetGlyphMethod (void(*f)(void *), void *arg) |
void | SetGlyphMethodArgDelete (void(*f)(void *)) |
virtual int | GetPointId () |
virtual float * | GetPoint () |
virtual void | GetPoint (float &, float &, float &) |
virtual void | GetPoint (float[3]) |
virtual vtkPointData * | GetPointData () |
virtual void | SetColorMode (int) |
virtual int | GetColorMode () |
void | SetColorModeToColorByInput () |
void | SetColorModeToColorBySource () |
const char * | GetColorModeAsString () |
Static Public Methods | |
int | IsTypeOf (const char *type) |
vtkProgrammableGlyphFilter * | SafeDownCast (vtkObject *o) |
vtkProgrammableGlyphFilter * | New () |
Protected Methods | |
vtkProgrammableGlyphFilter () | |
~vtkProgrammableGlyphFilter () | |
vtkProgrammableGlyphFilter (const vtkProgrammableGlyphFilter &) | |
void | operator= (const vtkProgrammableGlyphFilter &) |
void | Execute () |
Protected Attributes | |
float | Point [3] |
int | PointId |
vtkPointData * | PointData |
int | ColorMode |
void(* | GlyphMethod )(void *) |
void(* | GlyphMethodArgDelete )(void *) |
void * | GlyphMethodArg |
vtkProgrammableGlyphFilter is a filter that allows you to place a glyph at each input point in the dataset. In addition, the filter is programmable which means the user has control over the generation of the glyph. The glyphs can be controlled via the point data attributes (e.g., scalars, vectors, etc.) or any other information in the input dataset.
This is the way the filter works. You must define an input dataset which at a minimum contains points with associated attribute values. Also, the Source instance variable must be set which is of type vtkPolyData. Then, for each point in the input, the PointId is set to the current point id, and a user-defined function is called (i.e., GlyphMethod). In this method you can manipulate the Source data (including changing to a different Source object). After the GlyphMethod is called, vtkProgrammableGlyphFilter will invoke an Update() on its Source object, and then copy its data to the output of the vtkProgrammableGlyphFilter. Therefore the output of this filter is of type vtkPolyData.
Another option to this filter is the way you color the glyphs. You can use the scalar data from the input or the source. The instance variable ColorMode controls this behavior.
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToPolyDataFilter. |
|
Get the current point coordinates during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().) |
|
Get the set of point data attributes for the input. A convenience to the programmer to be used in the GlyphMethod(). Only valid during the Execute() method of this filter. |
|
Get the current point id during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().) |
|
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 vtkDataSetToPolyDataFilter. |
|
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 vtkDataSetToPolyDataFilter. |
|
Construct object with NULL GlyphMethod() and no source object. The ColorMode is set to color by the input. Reimplemented from vtkPolyDataSource. |
|
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 vtkSource. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToPolyDataFilter. |
|
Either color by the input or source scalar data. |
|
Specify function to be called for each input point. |
|
Set the arg delete method. This is used to free user memory that might be associated with the GlyphMethod(). |
|
Set/Get the source to use for this glyph. Note: you can change the source during execution of this filter. |