VTK  9.1.0
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 =========================================================================*/
80 #ifndef vtkProgrammableGlyphFilter_h
81 #define vtkProgrammableGlyphFilter_h
82 
83 #define VTK_COLOR_BY_INPUT 0
84 #define VTK_COLOR_BY_SOURCE 1
85 
86 #include "vtkFiltersProgrammableModule.h" // For export macro
87 #include "vtkPolyDataAlgorithm.h"
88 
89 class vtkPointData;
90 
91 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableGlyphFilter : public vtkPolyDataAlgorithm
92 {
93 public:
95  void PrintSelf(ostream& os, vtkIndent indent) override;
96 
102 
109 
111 
119 
128  typedef void (*ProgrammableMethodCallbackType)(void* arg);
129 
133  void SetGlyphMethod(void (*f)(void*), void* arg);
134 
139  void SetGlyphMethodArgDelete(void (*f)(void*));
140 
142 
146  vtkGetMacro(PointId, vtkIdType);
148 
150 
154  vtkGetVector3Macro(Point, double);
156 
158 
163  vtkGetObjectMacro(PointData, vtkPointData);
165 
167 
170  vtkSetMacro(ColorMode, int);
171  vtkGetMacro(ColorMode, int);
172  void SetColorModeToColorByInput() { this->SetColorMode(VTK_COLOR_BY_INPUT); }
173  void SetColorModeToColorBySource() { this->SetColorMode(VTK_COLOR_BY_SOURCE); }
174  const char* GetColorModeAsString();
176 
177 protected:
180 
183 
184  double Point[3]; // Coordinates of point
185  vtkIdType PointId; // Current point id during processing
188 
189  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
190  ProgrammableMethodCallbackType GlyphMethodArgDelete;
192 
193 private:
195  void operator=(const vtkProgrammableGlyphFilter&) = delete;
196 };
197 
198 #endif
vtkProgrammableGlyphFilter::GlyphMethod
ProgrammableMethodCallbackType GlyphMethod
Definition: vtkProgrammableGlyphFilter.h:189
vtkProgrammableGlyphFilter::PointId
vtkIdType PointId
Definition: vtkProgrammableGlyphFilter.h:185
vtkProgrammableGlyphFilter::New
static vtkProgrammableGlyphFilter * New()
Construct object with nullptr GlyphMethod() and no source object.
vtkProgrammableGlyphFilter::SetSourceData
void SetSourceData(vtkPolyData *source)
Set/Get the source to use for this glyph.
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:142
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkProgrammableGlyphFilter::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkProgrammableGlyphFilter::vtkProgrammableGlyphFilter
vtkProgrammableGlyphFilter()
VTK_COLOR_BY_SOURCE
#define VTK_COLOR_BY_SOURCE
Definition: vtkProgrammableGlyphFilter.h:84
vtkProgrammableGlyphFilter::SetGlyphMethodArgDelete
void SetGlyphMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkProgrammableGlyphFilter
control the generation and placement of glyphs at input points
Definition: vtkProgrammableGlyphFilter.h:92
vtkProgrammableGlyphFilter::GlyphMethodArgDelete
ProgrammableMethodCallbackType GlyphMethodArgDelete
Definition: vtkProgrammableGlyphFilter.h:190
vtkPolyDataAlgorithm.h
vtkProgrammableGlyphFilter::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *output)
Setup a connection for the source to use as the glyph.
VTK_COLOR_BY_INPUT
#define VTK_COLOR_BY_INPUT
Definition: vtkProgrammableGlyphFilter.h:83
vtkProgrammableGlyphFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProgrammableGlyphFilter::GetColorModeAsString
const char * GetColorModeAsString()
Either color by the input or source scalar data.
vtkProgrammableGlyphFilter::~vtkProgrammableGlyphFilter
~vtkProgrammableGlyphFilter() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkProgrammableGlyphFilter::ColorMode
int ColorMode
Definition: vtkProgrammableGlyphFilter.h:187
vtkProgrammableGlyphFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkProgrammableGlyphFilter::PointData
vtkPointData * PointData
Definition: vtkProgrammableGlyphFilter.h:186
vtkProgrammableGlyphFilter::SetColorModeToColorByInput
void SetColorModeToColorByInput()
Either color by the input or source scalar data.
Definition: vtkProgrammableGlyphFilter.h:172
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:998
vtkProgrammableGlyphFilter::GetSource
vtkPolyData * GetSource()
Set/Get the source to use for this glyph.
vtkProgrammableGlyphFilter::SetGlyphMethod
void SetGlyphMethod(void(*f)(void *), void *arg)
Specify function to be called for each input point.
vtkProgrammableGlyphFilter::SetColorModeToColorBySource
void SetColorModeToColorBySource()
Either color by the input or source scalar data.
Definition: vtkProgrammableGlyphFilter.h:173
vtkProgrammableGlyphFilter::GlyphMethodArg
void * GlyphMethodArg
Definition: vtkProgrammableGlyphFilter.h:191
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151