VTK  9.0.1
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) 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);
153  void SetColorModeToColorByInput() { this->SetColorMode(VTK_COLOR_BY_INPUT); }
154  void SetColorModeToColorBySource() { this->SetColorMode(VTK_COLOR_BY_SOURCE); }
155  const char* GetColorModeAsString();
157 
158 protected:
160  ~vtkProgrammableGlyphFilter() override;
161 
163  int FillInputPortInformation(int, vtkInformation*) override;
164 
165  double Point[3]; // Coordinates of point
166  vtkIdType PointId; // Current point id during processing
169 
170  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
171  ProgrammableMethodCallbackType GlyphMethodArgDelete;
173 
174 private:
176  void operator=(const vtkProgrammableGlyphFilter&) = delete;
177 };
178 
179 #endif
vtkProgrammableGlyphFilter::GlyphMethod
ProgrammableMethodCallbackType GlyphMethod
Definition: vtkProgrammableGlyphFilter.h:170
vtkProgrammableGlyphFilter::PointId
vtkIdType PointId
Definition: vtkProgrammableGlyphFilter.h:166
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
VTK_COLOR_BY_SOURCE
#define VTK_COLOR_BY_SOURCE
Definition: vtkProgrammableGlyphFilter.h:65
vtkProgrammableGlyphFilter
control the generation and placement of glyphs at input points
Definition: vtkProgrammableGlyphFilter.h:72
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProgrammableGlyphFilter::GlyphMethodArgDelete
ProgrammableMethodCallbackType GlyphMethodArgDelete
Definition: vtkProgrammableGlyphFilter.h:171
vtkPolyDataAlgorithm.h
VTK_COLOR_BY_INPUT
#define VTK_COLOR_BY_INPUT
Definition: vtkProgrammableGlyphFilter.h:64
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkProgrammableGlyphFilter::ColorMode
int ColorMode
Definition: vtkProgrammableGlyphFilter.h:168
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkProgrammableGlyphFilter::PointData
vtkPointData * PointData
Definition: vtkProgrammableGlyphFilter.h:167
vtkProgrammableGlyphFilter::SetColorModeToColorByInput
void SetColorModeToColorByInput()
Definition: vtkProgrammableGlyphFilter.h:153
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:959
vtkProgrammableGlyphFilter::SetColorModeToColorBySource
void SetColorModeToColorBySource()
Definition: vtkProgrammableGlyphFilter.h:154
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkProgrammableGlyphFilter::GlyphMethodArg
void * GlyphMethodArg
Definition: vtkProgrammableGlyphFilter.h:172
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41