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
57
58#include "vtkContourValues.h" // Needed for inline methods
59
60class vtkEdgeTable;
61class vtkScalarTree;
63
64class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
65{
66public:
68 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
69
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
188protected:
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
202
203 int UseScalarTree;
204 vtkScalarTree *ScalarTree;
205
206 int OutputPointsPrecision;
207 vtkEdgeTable *EdgeTable;
208
209private:
210 vtkContourGrid(const vtkContourGrid&) VTK_DELETE_FUNCTION;
211 void operator=(const vtkContourGrid&) VTK_DELETE_FUNCTION;
212};
213
218inline void vtkContourGrid::SetValue(int i, double value)
219{this->ContourValues->SetValue(i,value);}
220
224inline double vtkContourGrid::GetValue(int i)
225{return this->ContourValues->GetValue(i);}
226
232{return this->ContourValues->GetValues();}
233
239inline void vtkContourGrid::GetValues(double *contourValues)
240{this->ContourValues->GetValues(contourValues);}
241
248{this->ContourValues->SetNumberOfContours(number);}
249
254{return this->ContourValues->GetNumberOfContours();}
255
260inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
261{this->ContourValues->GenerateValues(numContours, range);}
262
267inline void vtkContourGrid::GenerateValues(int numContours, double
268 rangeStart, double rangeEnd)
269{this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
270
271
272#endif
273
274
generate isosurfaces/isolines from scalar values (specialized for unstructured grids)
double * GetValues()
Get a pointer to an array of contour values.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
static vtkContourGrid * New()
Construct object with initial range (0,1) and single contour value of 0.0.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to vtkContourValues.
double GetValue(int i)
Get the ith contour value.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
helper object to manage setting and generating contour values
void SetValue(int i, double value)
Set the ith contour value.
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:41
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:55
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ range
Definition: vtkX3D.h:238
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248