VTK
vtkContourGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContourGrid.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 vtkContourGrid_h
53 #define vtkContourGrid_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 vtkEdgeTable;
61 class vtkScalarTree;
63 
64 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
69 
74  static vtkContourGrid *New();
75 
77 
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 
93  vtkMTimeType GetMTime() VTK_OVERRIDE;
94 
96 
102  vtkSetMacro(ComputeNormals,int);
103  vtkGetMacro(ComputeNormals,int);
104  vtkBooleanMacro(ComputeNormals,int);
106 
108 
118  vtkSetMacro(ComputeGradients,int);
119  vtkGetMacro(ComputeGradients,int);
120  vtkBooleanMacro(ComputeGradients,int);
122 
124 
127  vtkSetMacro(ComputeScalars,int);
128  vtkGetMacro(ComputeScalars,int);
129  vtkBooleanMacro(ComputeScalars,int);
131 
133 
136  vtkSetMacro(UseScalarTree,int);
137  vtkGetMacro(UseScalarTree,int);
138  vtkBooleanMacro(UseScalarTree,int);
140 
142 
146  void SetScalarTree(vtkScalarTree *sTree);
147  vtkGetObjectMacro(ScalarTree,vtkScalarTree);
149 
151 
155  void SetLocator(vtkIncrementalPointLocator *locator);
156  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
158 
160 
167  vtkSetMacro(GenerateTriangles,int);
168  vtkGetMacro(GenerateTriangles,int);
169  vtkBooleanMacro(GenerateTriangles,int);
171 
176  void CreateDefaultLocator();
177 
179 
184  void SetOutputPointsPrecision(int precision);
185  int GetOutputPointsPrecision() const;
187 
188 protected:
189  vtkContourGrid();
190  ~vtkContourGrid() VTK_OVERRIDE;
191 
192  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
193  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
194 
195  vtkContourValues *ContourValues;
196  int ComputeNormals;
197  int ComputeGradients;
198  int ComputeScalars;
199  int GenerateTriangles;
200 
201  vtkIncrementalPointLocator *Locator;
202 
203  int UseScalarTree;
204  vtkScalarTree *ScalarTree;
205 
206  int OutputPointsPrecision;
207  vtkEdgeTable *EdgeTable;
208 
209 private:
210  vtkContourGrid(const vtkContourGrid&) VTK_DELETE_FUNCTION;
211  void operator=(const vtkContourGrid&) VTK_DELETE_FUNCTION;
212 };
213 
218 inline void vtkContourGrid::SetValue(int i, double value)
219 {this->ContourValues->SetValue(i,value);}
220 
224 inline double vtkContourGrid::GetValue(int i)
225 {return this->ContourValues->GetValue(i);}
226 
232 {return this->ContourValues->GetValues();}
233 
239 inline void vtkContourGrid::GetValues(double *contourValues)
240 {this->ContourValues->GetValues(contourValues);}
241 
247 inline void vtkContourGrid::SetNumberOfContours(int number)
248 {this->ContourValues->SetNumberOfContours(number);}
249 
254 {return this->ContourValues->GetNumberOfContours();}
255 
260 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
261 {this->ContourValues->GenerateValues(numContours, range);}
262 
267 inline void vtkContourGrid::GenerateValues(int numContours, double
268  rangeStart, double rangeEnd)
269 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
270 
271 
272 #endif
273 
274 
helper object to manage setting and generating contour values
generate isosurfaces/isolines from scalar values (specialized for unstructured grids) ...
Store vtkAlgorithm input/output information.
Abstract class in support of both point location and point insertion.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:40
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
double * GetValues()
Get a pointer to an array of contour values.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double GetValue(int i)
Get the ith contour value.
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:54
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetValue(int i, double value)
Set the ith contour value.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.