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 
60 class vtkIncrementalPointLocator;
61 class vtkScalarTree;
66 
67 class VTKFILTERSCORE_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm
68 {
69 public:
70  vtkTypeMacro(vtkContourFilter,vtkPolyDataAlgorithm);
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
75  static vtkContourFilter *New();
76 
78 
79  void SetValue(int i, double value);
80  double GetValue(int i);
81  double *GetValues();
82  void GetValues(double *contourValues);
83  void SetNumberOfContours(int number);
84  int GetNumberOfContours();
85  void GenerateValues(int numContours, double range[2]);
86  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
88 
90  unsigned long GetMTime();
91 
93 
97  vtkSetMacro(ComputeNormals,int);
98  vtkGetMacro(ComputeNormals,int);
99  vtkBooleanMacro(ComputeNormals,int);
101 
103 
109  vtkSetMacro(ComputeGradients,int);
110  vtkGetMacro(ComputeGradients,int);
111  vtkBooleanMacro(ComputeGradients,int);
113 
115 
116  vtkSetMacro(ComputeScalars,int);
117  vtkGetMacro(ComputeScalars,int);
118  vtkBooleanMacro(ComputeScalars,int);
120 
122 
123  vtkSetMacro(UseScalarTree,int);
124  vtkGetMacro(UseScalarTree,int);
125  vtkBooleanMacro(UseScalarTree,int);
127 
129 
130  virtual void SetScalarTree(vtkScalarTree*);
131  vtkGetObjectMacro(ScalarTree,vtkScalarTree);
133 
135 
137  void SetLocator(vtkIncrementalPointLocator *locator);
138  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
140 
143  void CreateDefaultLocator();
144 
146 
149  void SetArrayComponent( int );
150  int GetArrayComponent();
152 
153 
155 
160  vtkSetMacro(GenerateTriangles,int);
161  vtkGetMacro(GenerateTriangles,int);
162  vtkBooleanMacro(GenerateTriangles,int);
164 
166 
167  virtual int ProcessRequest(vtkInformation*,
168  vtkInformationVector**,
169  vtkInformationVector*);
171 
173 
176  void SetOutputPointsPrecision(int precision);
177  int GetOutputPointsPrecision() const;
179 
180 protected:
182  ~vtkContourFilter();
183 
184  virtual void ReportReferences(vtkGarbageCollector*);
185 
186  virtual int RequestData(vtkInformation* request,
187  vtkInformationVector** inputVector,
188  vtkInformationVector* outputVector);
189  virtual int RequestUpdateExtent(vtkInformation*,
190  vtkInformationVector**,
191  vtkInformationVector*);
192  virtual int FillInputPortInformation(int port, vtkInformation *info);
193 
194  vtkContourValues *ContourValues;
198  vtkIncrementalPointLocator *Locator;
200  vtkScalarTree *ScalarTree;
203 
208 
209 private:
210  vtkContourFilter(const vtkContourFilter&); // Not implemented.
211  void operator=(const vtkContourFilter&); // Not implemented.
212 };
213 
215 
217 inline void vtkContourFilter::SetValue(int i, double value)
218 {this->ContourValues->SetValue(i,value);}
220 
222 
223 inline double vtkContourFilter::GetValue(int i)
224 {return this->ContourValues->GetValue(i);}
226 
228 
231 {return this->ContourValues->GetValues();}
233 
235 
238 inline void vtkContourFilter::GetValues(double *contourValues)
239 {this->ContourValues->GetValues(contourValues);}
241 
243 
247 {this->ContourValues->SetNumberOfContours(number);}
249 
251 
253 {return this->ContourValues->GetNumberOfContours();}
255 
257 
259 inline void vtkContourFilter::GenerateValues(int numContours, double range[2])
260 {this->ContourValues->GenerateValues(numContours, range);}
262 
264 
266 inline void vtkContourFilter::GenerateValues(int numContours, double
267  rangeStart, double rangeEnd)
268 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
270 
271 
272 #endif
273 
274 
vtkContourValues * ContourValues
vtkIncrementalPointLocator * Locator
generate isosurface from structured grids
void SetNumberOfContours(int number)
generate isosurface from structured points
void SetValue(int i, double value)
void GenerateValues(int numContours, double range[2])
generate isosurfaces/isolines from scalar values
vtkScalarTree * ScalarTree
vtkSynchronizedTemplates3D * SynchronizedTemplates3D
generate isosurface from rectilinear grid
vtkSynchronizedTemplates2D * SynchronizedTemplates2D
double GetValue(int i)
vtkGridSynchronizedTemplates3D * GridSynchronizedTemplates
vtkRectilinearSynchronizedTemplates * RectilinearSynchronizedTemplates
generate isoline(s) from a structured points set