VTK
vtkProgrammableGlyphFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgrammableGlyphFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
61 #ifndef vtkProgrammableGlyphFilter_h
62 #define vtkProgrammableGlyphFilter_h
63 
64 #define VTK_COLOR_BY_INPUT 0
65 #define VTK_COLOR_BY_SOURCE 1
66 
67 #include "vtkFiltersProgrammableModule.h" // For export macro
68 #include "vtkPolyDataAlgorithm.h"
69 
70 class vtkPointData;
71 
72 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
73 {
74 public:
76  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
77 
83 
89  void SetSourceConnection(vtkAlgorithmOutput* output);
90 
92 
97  void SetSourceData(vtkPolyData *source);
98  vtkPolyData *GetSource();
100 
109  typedef void (*ProgrammableMethodCallbackType)(void *arg);
110 
114  void SetGlyphMethod(void (*f)(void *), void *arg);
115 
120  void SetGlyphMethodArgDelete(void (*f)(void *));
121 
123 
127  vtkGetMacro(PointId, vtkIdType);
129 
131 
135  vtkGetVector3Macro(Point,double);
137 
139 
144  vtkGetObjectMacro(PointData,vtkPointData);
146 
148 
151  vtkSetMacro(ColorMode,int);
152  vtkGetMacro(ColorMode,int);
154  {this->SetColorMode(VTK_COLOR_BY_INPUT);};
156  {this->SetColorMode(VTK_COLOR_BY_SOURCE);};
157  const char *GetColorModeAsString();
159 
160 protected:
162  ~vtkProgrammableGlyphFilter() VTK_OVERRIDE;
163 
164  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
165  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
166 
167  double Point[3]; // Coordinates of point
168  vtkIdType PointId; // Current point id during processing
169  vtkPointData *PointData;
170  int ColorMode;
171 
172  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
173  ProgrammableMethodCallbackType GlyphMethodArgDelete;
174  void *GlyphMethodArg;
175 
176 private:
177  vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&) VTK_DELETE_FUNCTION;
178  void operator=(const vtkProgrammableGlyphFilter&) VTK_DELETE_FUNCTION;
179 };
180 
181 #endif
void SetColorModeToColorBySource()
Either color by the input or source scalar data.
represent and manipulate point attribute data
Definition: vtkPointData.h:31
#define VTK_COLOR_BY_SOURCE
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetColorModeToColorByInput()
Either color by the input or source scalar data.
control the generation and placement of glyphs at input points
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
boost::graph_traits< vtkGraph *>::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_COLOR_BY_INPUT
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.