Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkProgrammableGlyphFilter Class Reference

#include <vtkProgrammableGlyphFilter.h>

Inheritance diagram for vtkProgrammableGlyphFilter:

Inheritance graph
[legend]
Collaboration diagram for vtkProgrammableGlyphFilter:

Collaboration graph
[legend]
List of all members.

Detailed Description

control the generation and placement of glyphs at input points

Date:
2002/09/26 12:07:14
Revision:
1.20

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.

Warning:
This filter operates on point data attributes. If you want to use cell data attributes, use a filter like vtkCellCenters to generate points at the centers of cells, and then use these points.
Warning:
Note that the data attributes (cell and point) are passed to the output of this filter from the Source object. This works well as long as you are not changing the class of the Source object during execution. However, if the class of the Source object changes, then the potential exists that the data attributes might change during execution (e.g., scalars available from one source and not the next), possibly fouling up the copying of data attributes to the output. In this case, you may have to manually set the output's copy flags (e.g., CopyScalarsOn/Off(), CopyVectorsOn/Off(), etc.) to control what's being copied.
See also:
vtkGlyph3D vtkTensorGlyph vtkCellCenters
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (71%)
  • Lorensen, Bill (15%)
  • Geveci, Berk (5%)
CVS logs (CVSweb):
  • .h (/Graphics/vtkProgrammableGlyphFilter.h)
  • .cxx (/Graphics/vtkProgrammableGlyphFilter.cxx)
Tests:
vtkProgrammableGlyphFilter (Tests)

Definition at line 89 of file vtkProgrammableGlyphFilter.h.

Public Types

typedef vtkDataSetToPolyDataFilter Superclass

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetGlyphMethod (void(*f)(void *), void *arg)
void SetGlyphMethodArgDelete (void(*f)(void *))
void SetSource (vtkPolyData *source)
vtkPolyDataGetSource ()
virtual vtkIdType GetPointId ()
virtual float * GetPoint ()
virtual void GetPoint (float &, float &, float &)
virtual void GetPoint (float[3])
virtual vtkPointDataGetPointData ()
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 ()
void Execute ()

Protected Attributes

float Point [3]
vtkIdType PointId
vtkPointDataPointData
int ColorMode
void(* GlyphMethod )(void *)
void(* GlyphMethodArgDelete )(void *)
void * GlyphMethodArg


Member Typedef Documentation

typedef vtkDataSetToPolyDataFilter vtkProgrammableGlyphFilter::Superclass
 

Reimplemented from vtkDataSetToPolyDataFilter.

Definition at line 92 of file vtkProgrammableGlyphFilter.h.


Constructor & Destructor Documentation

vtkProgrammableGlyphFilter::vtkProgrammableGlyphFilter   [protected]
 

vtkProgrammableGlyphFilter::~vtkProgrammableGlyphFilter   [protected]
 


Member Function Documentation

virtual const char* vtkProgrammableGlyphFilter::GetClassName   [virtual]
 

Reimplemented from vtkDataSetToPolyDataFilter.

int vtkProgrammableGlyphFilter::IsTypeOf const char *    type [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToPolyDataFilter.

virtual int vtkProgrammableGlyphFilter::IsA const char *    type [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToPolyDataFilter.

vtkProgrammableGlyphFilter* vtkProgrammableGlyphFilter::SafeDownCast vtkObject   o [static]
 

Reimplemented from vtkDataSetToPolyDataFilter.

void vtkProgrammableGlyphFilter::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 vtkDataSetToPolyDataFilter.

vtkProgrammableGlyphFilter* vtkProgrammableGlyphFilter::New   [static]
 

Construct object with NULL GlyphMethod() and no source object. The ColorMode is set to color by the input.

Reimplemented from vtkObject.

void vtkProgrammableGlyphFilter::SetSource vtkPolyData   source
 

Set/Get the source to use for this glyph. Note: you can change the source during execution of this filter.

vtkPolyData* vtkProgrammableGlyphFilter::GetSource  
 

Set/Get the source to use for this glyph. Note: you can change the source during execution of this filter.

void vtkProgrammableGlyphFilter::SetGlyphMethod void(*    f)(void *),
void *    arg
 

Specify function to be called for each input point.

void vtkProgrammableGlyphFilter::SetGlyphMethodArgDelete void(*    f)(void *)
 

Set the arg delete method. This is used to free user memory that might be associated with the GlyphMethod().

virtual vtkIdType vtkProgrammableGlyphFilter::GetPointId   [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 float* vtkProgrammableGlyphFilter::GetPoint   [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 void vtkProgrammableGlyphFilter::GetPoint float &   ,
float &   ,
float &   
[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 void vtkProgrammableGlyphFilter::GetPoint float   [3] [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 vtkPointData* vtkProgrammableGlyphFilter::GetPointData   [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 void vtkProgrammableGlyphFilter::SetColorMode int    [virtual]
 

Either color by the input or source scalar data.

virtual int vtkProgrammableGlyphFilter::GetColorMode   [virtual]
 

Either color by the input or source scalar data.

void vtkProgrammableGlyphFilter::SetColorModeToColorByInput   [inline]
 

Either color by the input or source scalar data.

Definition at line 138 of file vtkProgrammableGlyphFilter.h.

References VTK_COLOR_BY_INPUT.

void vtkProgrammableGlyphFilter::SetColorModeToColorBySource   [inline]
 

Either color by the input or source scalar data.

Definition at line 140 of file vtkProgrammableGlyphFilter.h.

References VTK_COLOR_BY_SOURCE.

const char* vtkProgrammableGlyphFilter::GetColorModeAsString  
 

Either color by the input or source scalar data.

void vtkProgrammableGlyphFilter::Execute   [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.


Member Data Documentation

float vtkProgrammableGlyphFilter::Point[3] [protected]
 

Definition at line 151 of file vtkProgrammableGlyphFilter.h.

vtkIdType vtkProgrammableGlyphFilter::PointId [protected]
 

Definition at line 152 of file vtkProgrammableGlyphFilter.h.

vtkPointData* vtkProgrammableGlyphFilter::PointData [protected]
 

Definition at line 153 of file vtkProgrammableGlyphFilter.h.

int vtkProgrammableGlyphFilter::ColorMode [protected]
 

Definition at line 154 of file vtkProgrammableGlyphFilter.h.

void(* vtkProgrammableGlyphFilter::GlyphMethod)(void *) [protected]
 

void(* vtkProgrammableGlyphFilter::GlyphMethodArgDelete)(void *) [protected]
 

void* vtkProgrammableGlyphFilter::GlyphMethodArg [protected]
 

Definition at line 158 of file vtkProgrammableGlyphFilter.h.


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