VTK  9.2.5
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 =========================================================================*/
83 #ifndef vtkProgrammableGlyphFilter_h
84 #define vtkProgrammableGlyphFilter_h
85 
86 #define VTK_COLOR_BY_INPUT 0
87 #define VTK_COLOR_BY_SOURCE 1
88 
89 #include "vtkFiltersProgrammableModule.h" // For export macro
90 #include "vtkPolyDataAlgorithm.h"
91 
92 class vtkPointData;
93 
94 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
95 {
96 public:
98  void PrintSelf(ostream& os, vtkIndent indent) override;
99 
105 
112 
114 
122 
131  typedef void (*ProgrammableMethodCallbackType)(void* arg);
132 
136  void SetGlyphMethod(void (*f)(void*), void* arg);
137 
142  void SetGlyphMethodArgDelete(void (*f)(void*));
143 
145 
149  vtkGetMacro(PointId, vtkIdType);
151 
153 
157  vtkGetVector3Macro(Point, double);
159 
161 
166  vtkGetObjectMacro(PointData, vtkPointData);
168 
170 
173  vtkSetMacro(ColorMode, int);
174  vtkGetMacro(ColorMode, int);
175  void SetColorModeToColorByInput() { this->SetColorMode(VTK_COLOR_BY_INPUT); }
176  void SetColorModeToColorBySource() { this->SetColorMode(VTK_COLOR_BY_SOURCE); }
177  const char* GetColorModeAsString();
179 
180 protected:
183 
186 
187  double Point[3]; // Coordinates of point
188  vtkIdType PointId; // Current point id during processing
191 
192  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
193  ProgrammableMethodCallbackType GlyphMethodArgDelete;
195 
196 private:
198  void operator=(const vtkProgrammableGlyphFilter&) = delete;
199 };
200 
201 #endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:151
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
control the generation and placement of glyphs at input points
static vtkProgrammableGlyphFilter * New()
Construct object with nullptr GlyphMethod() and no source object.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
const char * GetColorModeAsString()
Either color by the input or source scalar data.
void SetColorModeToColorByInput()
Either color by the input or source scalar data.
~vtkProgrammableGlyphFilter() override
void SetColorModeToColorBySource()
Either color by the input or source scalar data.
ProgrammableMethodCallbackType GlyphMethodArgDelete
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetSourceConnection(vtkAlgorithmOutput *output)
Setup a connection for the source to use as the glyph.
void SetGlyphMethodArgDelete(void(*f)(void *))
Set the arg delete method.
void SetSourceData(vtkPolyData *source)
Set/Get the source to use for this glyph.
void SetGlyphMethod(void(*f)(void *), void *arg)
Specify function to be called for each input point.
ProgrammableMethodCallbackType GlyphMethod
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * GetSource()
Set/Get the source to use for this glyph.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_COLOR_BY_SOURCE
#define VTK_COLOR_BY_INPUT
int vtkIdType
Definition: vtkType.h:332