VTK
|
control the generation and placement of glyphs at input points More...
#include <vtkProgrammableGlyphFilter.h>
Inherits vtkPolyDataAlgorithm.
Public Types | |
typedef vtkPolyDataAlgorithm | Superclass |
typedef void(* | ProgrammableMethodCallbackType )(void *arg) |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkProgrammableGlyphFilter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetSourceConnection (vtkAlgorithmOutput *output) |
void | SetGlyphMethod (void(*f)(void *), void *arg) |
void | SetGlyphMethodArgDelete (void(*f)(void *)) |
void | SetSourceData (vtkPolyData *source) |
vtkPolyData * | GetSource () |
virtual vtkIdType | GetPointId () |
virtual double * | GetPoint () |
virtual void | GetPoint (double &, double &, double &) |
virtual void | GetPoint (double[3]) |
virtual vtkPointData * | GetPointData () |
virtual void | SetColorMode (int) |
virtual int | GetColorMode () |
void | SetColorModeToColorByInput () |
void | SetColorModeToColorBySource () |
const char * | GetColorModeAsString () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkProgrammableGlyphFilter * | SafeDownCast (vtkObjectBase *o) |
static vtkProgrammableGlyphFilter * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkProgrammableGlyphFilter () | |
~vtkProgrammableGlyphFilter () | |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
virtual int | FillInputPortInformation (int, vtkInformation *) |
Protected Attributes | |
double | Point [3] |
vtkIdType | PointId |
vtkPointData * | PointData |
int | ColorMode |
ProgrammableMethodCallbackType | GlyphMethod |
ProgrammableMethodCallbackType | GlyphMethodArgDelete |
void * | GlyphMethodArg |
control the generation and placement of glyphs at input points
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.
Definition at line 74 of file vtkProgrammableGlyphFilter.h.
typedef vtkPolyDataAlgorithm vtkProgrammableGlyphFilter::Superclass |
Definition at line 77 of file vtkProgrammableGlyphFilter.h.
typedef void(* vtkProgrammableGlyphFilter::ProgrammableMethodCallbackType)(void *arg) |
Signature definition for programmable method callbacks. Methods passed to SetGlyphMethod or SetGlyphMethodArgDelete must conform to this signature. The presence of this typedef is useful for reference and for external analysis tools, but it cannot be used in the method signatures in these header files themselves because it prevents the internal VTK wrapper generators from wrapping these methods.
Definition at line 102 of file vtkProgrammableGlyphFilter.h.
|
protected |
|
protected |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
vtkProgrammableGlyphFilter* vtkProgrammableGlyphFilter::NewInstance | ( | ) | const |
void vtkProgrammableGlyphFilter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
static |
Construct object with NULL GlyphMethod() and no source object. The ColorMode is set to color by the input.
void vtkProgrammableGlyphFilter::SetSourceConnection | ( | vtkAlgorithmOutput * | output | ) |
Setup a connection for the source to use as the glyph. Note: you can change the source during execution of this filter. This is equivalent to SetInputConnection(1, output);
void vtkProgrammableGlyphFilter::SetSourceData | ( | vtkPolyData * | source | ) |
Set/Get the source to use for this glyph. Note that SetSourceData() does not set a pipeline connection but directly uses the polydata.
vtkPolyData* vtkProgrammableGlyphFilter::GetSource | ( | ) |
Set/Get the source to use for this glyph. Note that SetSourceData() does not set a pipeline connection but directly uses the polydata.
void vtkProgrammableGlyphFilter::SetGlyphMethod | ( | void(*)(void *) | f, |
void * | arg | ||
) |
Specify function to be called for each input point.
void vtkProgrammableGlyphFilter::SetGlyphMethodArgDelete | ( | void(*)(void *) | f | ) |
Set the arg delete method. This is used to free user memory that might be associated with the GlyphMethod().
|
virtual |
Get the current point id during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().)
|
virtual |
Get the current point coordinates during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().)
|
virtual |
Get the current point coordinates during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().)
|
virtual |
Get the current point coordinates during processing. Value only valid during the Execute() method of this filter. (Meant to be called by the GlyphMethod().)
|
virtual |
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.
|
virtual |
Either color by the input or source scalar data.
|
virtual |
Either color by the input or source scalar data.
|
inline |
Either color by the input or source scalar data.
Definition at line 136 of file vtkProgrammableGlyphFilter.h.
|
inline |
Either color by the input or source scalar data.
Definition at line 138 of file vtkProgrammableGlyphFilter.h.
const char* vtkProgrammableGlyphFilter::GetColorModeAsString | ( | ) |
Either color by the input or source scalar data.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Definition at line 150 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 151 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 152 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 153 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 155 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 156 of file vtkProgrammableGlyphFilter.h.
|
protected |
Definition at line 157 of file vtkProgrammableGlyphFilter.h.