VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContourFilter.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 =========================================================================*/
52 #ifndef __vtkContourFilter_h
53 #define __vtkContourFilter_h
54 
55 #include "vtkFiltersCoreModule.h" // For export macro
56 #include "vtkPolyDataAlgorithm.h"
57 
58 #include "vtkContourValues.h" // Needed for inline methods
59 
61 class vtkScalarTree;
66 class vtkCallbackCommand;
67 
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
76  static vtkContourFilter *New();
77 
79 
80  void SetValue(int i, double value);
81  double GetValue(int i);
82  double *GetValues();
83  void GetValues(double *contourValues);
84  void SetNumberOfContours(int number);
85  int GetNumberOfContours();
86  void GenerateValues(int numContours, double range[2]);
87  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
89 
91  unsigned long GetMTime();
92 
94 
102  vtkSetMacro(ComputeNormals,int);
103  vtkGetMacro(ComputeNormals,int);
104  vtkBooleanMacro(ComputeNormals,int);
106 
108 
114  vtkSetMacro(ComputeGradients,int);
115  vtkGetMacro(ComputeGradients,int);
116  vtkBooleanMacro(ComputeGradients,int);
118 
120 
121  vtkSetMacro(ComputeScalars,int);
122  vtkGetMacro(ComputeScalars,int);
123  vtkBooleanMacro(ComputeScalars,int);
125 
127 
128  vtkSetMacro(UseScalarTree,int);
129  vtkGetMacro(UseScalarTree,int);
130  vtkBooleanMacro(UseScalarTree,int);
132 
134 
135  virtual void SetScalarTree(vtkScalarTree*);
136  vtkGetObjectMacro(ScalarTree,vtkScalarTree);
138 
140 
142  void SetLocator(vtkIncrementalPointLocator *locator);
145 
148  void CreateDefaultLocator();
149 
151 
154  void SetArrayComponent( int );
155  int GetArrayComponent();
157 
158 
160 
165  vtkSetMacro(GenerateTriangles,int);
166  vtkGetMacro(GenerateTriangles,int);
167  vtkBooleanMacro(GenerateTriangles,int);
169 
171 
172  virtual int ProcessRequest(vtkInformation*,
176 
178 
181  void SetOutputPointsPrecision(int precision);
182  int GetOutputPointsPrecision() const;
184 
185 protected:
187  ~vtkContourFilter();
188 
189  virtual void ReportReferences(vtkGarbageCollector*);
190 
191  virtual int RequestData(vtkInformation* request,
192  vtkInformationVector** inputVector,
193  vtkInformationVector* outputVector);
194  virtual int RequestUpdateExtent(vtkInformation*,
198 
208 
214 
215  static void InternalProgressCallbackFunction(vtkObject *caller,
216  unsigned long eid,
217  void *clientData,
218  void *callData);
219 
220 private:
221  vtkContourFilter(const vtkContourFilter&); // Not implemented.
222  void operator=(const vtkContourFilter&); // Not implemented.
223 };
224 
226 
228 inline void vtkContourFilter::SetValue(int i, double value)
229 {this->ContourValues->SetValue(i,value);}
231 
233 
234 inline double vtkContourFilter::GetValue(int i)
235 {return this->ContourValues->GetValue(i);}
237 
239 
242 {return this->ContourValues->GetValues();}
244 
246 
249 inline void vtkContourFilter::GetValues(double *contourValues)
250 {this->ContourValues->GetValues(contourValues);}
252 
254 
258 {this->ContourValues->SetNumberOfContours(number);}
260 
262 
264 {return this->ContourValues->GetNumberOfContours();}
266 
268 
270 inline void vtkContourFilter::GenerateValues(int numContours, double range[2])
271 {this->ContourValues->GenerateValues(numContours, range);}
273 
275 
277 inline void vtkContourFilter::GenerateValues(int numContours, double
278  rangeStart, double rangeEnd)
279 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
281 
282 
283 #endif
284 
285 
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkContourValues * ContourValues
vtkIncrementalPointLocator * Locator
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
generate isosurface from structured grids
void SetNumberOfContours(const int number)
#define VTKFILTERSCORE_EXPORT
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
void SetNumberOfContours(int number)
Abstract class in support of both point location and point insertion.
vtkCallbackCommand * InternalProgressCallbackCommand
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Detect and break reference loops.
generate isosurface from structured points
static vtkPolyDataAlgorithm * New()
virtual void ReportReferences(vtkGarbageCollector *)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void SetValue(int i, double value)
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
double * GetValues()
supports function callbacks
Superclass for algorithms that produce only polydata as output.
void GenerateValues(int numContours, double range[2])
generate isosurfaces/isolines from scalar values
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkScalarTree * ScalarTree
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:46
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
vtkSynchronizedTemplates3D * SynchronizedTemplates3D
generate isosurface from rectilinear grid
vtkSynchronizedTemplates2D * SynchronizedTemplates2D
double GetValue(int i)
vtkGridSynchronizedTemplates3D * GridSynchronizedTemplates
Store zero or more vtkInformation instances.
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
int GetNumberOfContours()
vtkRectilinearSynchronizedTemplates * RectilinearSynchronizedTemplates
GLenum GLint * range
Definition: vtkgl.h:14180
generate isoline(s) from a structured points set
void SetValue(int i, double value)
GLenum GLint GLint * precision
Definition: vtkgl.h:14180
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69