VTK
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);
143  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
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 
174  void SetOutputPointsPrecision(int precision);
175  int GetOutputPointsPrecision() const;
177 
178 protected:
180  ~vtkContourFilter();
181 
182  virtual void ReportReferences(vtkGarbageCollector*);
183 
184  virtual int RequestData(vtkInformation* request,
185  vtkInformationVector** inputVector,
186  vtkInformationVector* outputVector);
187  virtual int RequestUpdateExtent(vtkInformation*,
191 
201 
207 
208  static void InternalProgressCallbackFunction(vtkObject *caller,
209  unsigned long eid,
210  void *clientData,
211  void *callData);
212 
213 private:
214  vtkContourFilter(const vtkContourFilter&); // Not implemented.
215  void operator=(const vtkContourFilter&); // Not implemented.
216 };
217 
219 
221 inline void vtkContourFilter::SetValue(int i, double value)
222 {this->ContourValues->SetValue(i,value);}
224 
226 
227 inline double vtkContourFilter::GetValue(int i)
228 {return this->ContourValues->GetValue(i);}
230 
232 
235 {return this->ContourValues->GetValues();}
237 
239 
242 inline void vtkContourFilter::GetValues(double *contourValues)
243 {this->ContourValues->GetValues(contourValues);}
245 
247 
251 {this->ContourValues->SetNumberOfContours(number);}
253 
255 
257 {return this->ContourValues->GetNumberOfContours();}
259 
261 
263 inline void vtkContourFilter::GenerateValues(int numContours, double range[2])
264 {this->ContourValues->GenerateValues(numContours, range);}
266 
268 
270 inline void vtkContourFilter::GenerateValues(int numContours, double
271  rangeStart, double rangeEnd)
272 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
274 
275 
276 #endif
277 
278 
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
void SetNumberOfContours(int number)
Abstract class in support of both point location and point insertion.
vtkCallbackCommand * InternalProgressCallbackCommand
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
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)
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
vtkSynchronizedTemplates3D * SynchronizedTemplates3D
generate isosurface from rectilinear grid
vtkSynchronizedTemplates2D * SynchronizedTemplates2D
double GetValue(int i)
vtkGridSynchronizedTemplates3D * GridSynchronizedTemplates
Store zero or more vtkInformation instances.
int GetNumberOfContours()
vtkRectilinearSynchronizedTemplates * RectilinearSynchronizedTemplates
generate isoline(s) from a structured points set
void SetValue(int i, double value)