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 =========================================================================*/
56 #ifndef vtkContourGrid_h
57 #define vtkContourGrid_h
58 
59 #include "vtkFiltersCoreModule.h" // For export macro
60 #include "vtkPolyDataAlgorithm.h"
61 
62 #include "vtkContourValues.h" // Needed for inline methods
63 
64 class vtkEdgeTable;
65 class vtkScalarTree;
67 
68 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
78  static vtkContourGrid *New();
79 
81 
84  void SetValue(int i, double value);
85  double GetValue(int i);
86  double *GetValues();
87  void GetValues(double *contourValues);
88  void SetNumberOfContours(int number);
89  int GetNumberOfContours();
90  void GenerateValues(int numContours, double range[2]);
91  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
93 
97  vtkMTimeType GetMTime() override;
98 
100 
106  vtkSetMacro(ComputeNormals,vtkTypeBool);
107  vtkGetMacro(ComputeNormals,vtkTypeBool);
108  vtkBooleanMacro(ComputeNormals,vtkTypeBool);
110 
112 
122  vtkSetMacro(ComputeGradients,vtkTypeBool);
123  vtkGetMacro(ComputeGradients,vtkTypeBool);
124  vtkBooleanMacro(ComputeGradients,vtkTypeBool);
126 
128 
131  vtkSetMacro(ComputeScalars,vtkTypeBool);
132  vtkGetMacro(ComputeScalars,vtkTypeBool);
133  vtkBooleanMacro(ComputeScalars,vtkTypeBool);
135 
137 
140  vtkSetMacro(UseScalarTree,vtkTypeBool);
141  vtkGetMacro(UseScalarTree,vtkTypeBool);
142  vtkBooleanMacro(UseScalarTree,vtkTypeBool);
144 
146 
150  void SetScalarTree(vtkScalarTree *sTree);
151  vtkGetObjectMacro(ScalarTree,vtkScalarTree);
153 
155 
159  void SetLocator(vtkIncrementalPointLocator *locator);
160  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
162 
164 
171  vtkSetMacro(GenerateTriangles,vtkTypeBool);
172  vtkGetMacro(GenerateTriangles,vtkTypeBool);
173  vtkBooleanMacro(GenerateTriangles,vtkTypeBool);
175 
180  void CreateDefaultLocator();
181 
183 
188  void SetOutputPointsPrecision(int precision);
189  int GetOutputPointsPrecision() const;
191 
192 protected:
193  vtkContourGrid();
194  ~vtkContourGrid() override;
195 
197  int FillInputPortInformation(int port, vtkInformation *info) override;
198 
204 
206 
209 
212 
213 private:
214  vtkContourGrid(const vtkContourGrid&) = delete;
215  void operator=(const vtkContourGrid&) = delete;
216 };
217 
222 inline void vtkContourGrid::SetValue(int i, double value)
223 {this->ContourValues->SetValue(i,value);}
224 
228 inline double vtkContourGrid::GetValue(int i)
229 {return this->ContourValues->GetValue(i);}
230 
236 {return this->ContourValues->GetValues();}
237 
243 inline void vtkContourGrid::GetValues(double *contourValues)
244 {this->ContourValues->GetValues(contourValues);}
245 
251 inline void vtkContourGrid::SetNumberOfContours(int number)
252 {this->ContourValues->SetNumberOfContours(number);}
253 
258 {return this->ContourValues->GetNumberOfContours();}
259 
264 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
265 {this->ContourValues->GenerateValues(numContours, range);}
266 
271 inline void vtkContourGrid::GenerateValues(int numContours, double
272  rangeStart, double rangeEnd)
273 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
274 
275 
276 #endif
vtkContourGrid::UseScalarTree
vtkTypeBool UseScalarTree
Definition: vtkContourGrid.h:207
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:264
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:41
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:222
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:235
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkContourGrid::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkContourGrid.h:202
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:39
vtkContourGrid::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkContourGrid.h:257
vtkContourGrid::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkContourGrid.h:203
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:251
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:211
vtkContourGrid::ContourValues
vtkContourValues * ContourValues
Definition: vtkContourGrid.h:199
vtkContourGrid::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkContourGrid.h:201
vtkContourGrid::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkContourGrid.h:200
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:68
vtkContourGrid::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkContourGrid.h:205
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkContourGrid::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkContourGrid.h:228
vtkContourGrid::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkContourGrid.h:210
vtkScalarTree
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:54
vtkContourGrid::ScalarTree
vtkScalarTree * ScalarTree
Definition: vtkContourGrid.h:208
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:44