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 =========================================================================*/
49 #ifndef vtkContourGrid_h
50 #define vtkContourGrid_h
51 
52 #include "vtkFiltersCoreModule.h" // For export macro
53 #include "vtkPolyDataAlgorithm.h"
54 
55 #include "vtkContourValues.h" // Needed for inline methods
56 
57 class vtkEdgeTable;
58 class vtkScalarTree;
60 
61 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
62 {
63 public:
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
71  static vtkContourGrid *New();
72 
74 
77  void SetValue(int i, double value);
78  double GetValue(int i);
79  double *GetValues();
80  void GetValues(double *contourValues);
81  void SetNumberOfContours(int number);
82  int GetNumberOfContours();
83  void GenerateValues(int numContours, double range[2]);
84  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
86 
90  vtkMTimeType GetMTime() override;
91 
93 
99  vtkSetMacro(ComputeNormals,vtkTypeBool);
100  vtkGetMacro(ComputeNormals,vtkTypeBool);
101  vtkBooleanMacro(ComputeNormals,vtkTypeBool);
103 
105 
115  vtkSetMacro(ComputeGradients,vtkTypeBool);
116  vtkGetMacro(ComputeGradients,vtkTypeBool);
117  vtkBooleanMacro(ComputeGradients,vtkTypeBool);
119 
121 
124  vtkSetMacro(ComputeScalars,vtkTypeBool);
125  vtkGetMacro(ComputeScalars,vtkTypeBool);
126  vtkBooleanMacro(ComputeScalars,vtkTypeBool);
128 
130 
133  vtkSetMacro(UseScalarTree,vtkTypeBool);
134  vtkGetMacro(UseScalarTree,vtkTypeBool);
135  vtkBooleanMacro(UseScalarTree,vtkTypeBool);
137 
139 
143  void SetScalarTree(vtkScalarTree *sTree);
144  vtkGetObjectMacro(ScalarTree,vtkScalarTree);
146 
148 
152  void SetLocator(vtkIncrementalPointLocator *locator);
153  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
155 
157 
164  vtkSetMacro(GenerateTriangles,vtkTypeBool);
165  vtkGetMacro(GenerateTriangles,vtkTypeBool);
166  vtkBooleanMacro(GenerateTriangles,vtkTypeBool);
168 
173  void CreateDefaultLocator();
174 
176 
181  void SetOutputPointsPrecision(int precision);
182  int GetOutputPointsPrecision() const;
184 
185 protected:
186  vtkContourGrid();
187  ~vtkContourGrid() override;
188 
190  int FillInputPortInformation(int port, vtkInformation *info) override;
191 
197 
199 
202 
205 
206 private:
207  vtkContourGrid(const vtkContourGrid&) = delete;
208  void operator=(const vtkContourGrid&) = delete;
209 };
210 
215 inline void vtkContourGrid::SetValue(int i, double value)
216 {this->ContourValues->SetValue(i,value);}
217 
221 inline double vtkContourGrid::GetValue(int i)
222 {return this->ContourValues->GetValue(i);}
223 
229 {return this->ContourValues->GetValues();}
230 
236 inline void vtkContourGrid::GetValues(double *contourValues)
237 {this->ContourValues->GetValues(contourValues);}
238 
244 inline void vtkContourGrid::SetNumberOfContours(int number)
245 {this->ContourValues->SetNumberOfContours(number);}
246 
251 {return this->ContourValues->GetNumberOfContours();}
252 
257 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
258 {this->ContourValues->GenerateValues(numContours, range);}
259 
264 inline void vtkContourGrid::GenerateValues(int numContours, double
265  rangeStart, double rangeEnd)
266 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
267 
268 
269 #endif
270 
271 
vtkContourGrid::UseScalarTree
vtkTypeBool UseScalarTree
Definition: vtkContourGrid.h:200
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContourGrid::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkContourGrid.h:257
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkX3D::value
Definition: vtkX3D.h:220
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkX3D::range
Definition: vtkX3D.h:238
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkContourGrid::SetValue
void SetValue(int i, double value)
Methods to set / get contour values.
Definition: vtkContourGrid.h:215
vtkEdgeTable
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:40
vtkContourGrid::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkContourGrid.h:228
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkContourGrid::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkContourGrid.h:195
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkContourGrid::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkContourGrid.h:250
vtkContourGrid::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkContourGrid.h:196
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkContourValues::GetValue
double GetValue(int i)
Get the ith contour value.
vtkContourGrid::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkContourGrid.h:244
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkContourGrid::EdgeTable
vtkEdgeTable * EdgeTable
Definition: vtkContourGrid.h:204
vtkContourGrid::ContourValues
vtkContourValues * ContourValues
Definition: vtkContourGrid.h:192
vtkContourGrid::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkContourGrid.h:194
vtkContourGrid::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkContourGrid.h:193
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourGrid
generate isosurfaces/isolines from scalar values (specialized for unstructured grids)
Definition: vtkContourGrid.h:61
vtkContourGrid::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkContourGrid.h:198
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkContourGrid::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkContourGrid.h:221
vtkContourGrid::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkContourGrid.h:203
vtkScalarTree
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:54
vtkContourGrid::ScalarTree
vtkScalarTree * ScalarTree
Definition: vtkContourGrid.h:201
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41