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 =========================================================================*/
63 #ifndef vtkProgrammableGlyphFilter_h
64 #define vtkProgrammableGlyphFilter_h
65 
66 #define VTK_COLOR_BY_INPUT 0
67 #define VTK_COLOR_BY_SOURCE 1
68 
69 #include "vtkFiltersProgrammableModule.h" // For export macro
70 #include "vtkPolyDataAlgorithm.h"
71 
72 class vtkPointData;
73 
75 {
76 public:
78  void PrintSelf(ostream& os, vtkIndent indent);
79 
83 
87  void SetSourceConnection(vtkAlgorithmOutput* output);
88 
90 
92  void SetSourceData(vtkPolyData *source);
93  vtkPolyData *GetSource();
95 
102  typedef void (*ProgrammableMethodCallbackType)(void *arg);
103 
105  void SetGlyphMethod(void (*f)(void *), void *arg);
106 
109  void SetGlyphMethodArgDelete(void (*f)(void *));
110 
112 
115  vtkGetMacro(PointId, vtkIdType);
117 
119 
122  vtkGetVector3Macro(Point,double);
124 
126 
129  vtkGetObjectMacro(PointData,vtkPointData);
131 
133 
134  vtkSetMacro(ColorMode,int);
135  vtkGetMacro(ColorMode,int);
137  {this->SetColorMode(VTK_COLOR_BY_INPUT);};
139  {this->SetColorMode(VTK_COLOR_BY_SOURCE);};
140  const char *GetColorModeAsString();
142 
143 protected:
146 
148  virtual int FillInputPortInformation(int, vtkInformation *);
149 
150  double Point[3]; // Coordinates of point
151  vtkIdType PointId; // Current point id during processing
154 
155  ProgrammableMethodCallbackType GlyphMethod; // Support GlyphMethod
156  ProgrammableMethodCallbackType GlyphMethodArgDelete;
158 
159 private:
160  vtkProgrammableGlyphFilter(const vtkProgrammableGlyphFilter&); // Not implemented.
161  void operator=(const vtkProgrammableGlyphFilter&); // Not implemented.
162 };
163 
164 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
represent and manipulate point attribute data
Definition: vtkPointData.h:36
#define VTK_COLOR_BY_SOURCE
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
control the generation and placement of glyphs at input points
ProgrammableMethodCallbackType GlyphMethodArgDelete
#define VTKFILTERSPROGRAMMABLE_EXPORT
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_COLOR_BY_INPUT
ProgrammableMethodCallbackType GlyphMethod
Store zero or more vtkInformation instances.