VTK  9.1.0
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 =========================================================================*/
53 #ifndef vtkContourGrid_h
54 #define vtkContourGrid_h
55 
56 #include "vtkFiltersCoreModule.h" // For export macro
57 #include "vtkPolyDataAlgorithm.h"
58 
59 #include "vtkContourValues.h" // Needed for inline methods
60 
61 class vtkEdgeTable;
62 class vtkScalarTree;
64 
65 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
75  static vtkContourGrid* New();
76 
78 
81  void SetValue(int i, double value);
82  double GetValue(int i);
83  double* GetValues();
84  void GetValues(double* contourValues);
85  void SetNumberOfContours(int number);
86  vtkIdType GetNumberOfContours();
87  void GenerateValues(int numContours, double range[2]);
88  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
90 
94  vtkMTimeType GetMTime() override;
95 
97 
103  vtkSetMacro(ComputeNormals, vtkTypeBool);
104  vtkGetMacro(ComputeNormals, vtkTypeBool);
105  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
107 
109 
112  vtkSetMacro(ComputeScalars, vtkTypeBool);
113  vtkGetMacro(ComputeScalars, vtkTypeBool);
114  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
116 
118 
121  vtkSetMacro(UseScalarTree, vtkTypeBool);
122  vtkGetMacro(UseScalarTree, vtkTypeBool);
123  vtkBooleanMacro(UseScalarTree, vtkTypeBool);
125 
127 
132  vtkGetObjectMacro(ScalarTree, vtkScalarTree);
134 
136 
141  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
143 
145 
152  vtkSetMacro(GenerateTriangles, vtkTypeBool);
153  vtkGetMacro(GenerateTriangles, vtkTypeBool);
154  vtkBooleanMacro(GenerateTriangles, vtkTypeBool);
156 
162 
164 
169  void SetOutputPointsPrecision(int precision);
172 
173 protected:
175  ~vtkContourGrid() override;
176 
179 
184 
186 
189 
192 
193 private:
194  vtkContourGrid(const vtkContourGrid&) = delete;
195  void operator=(const vtkContourGrid&) = delete;
196 };
197 
202 inline void vtkContourGrid::SetValue(int i, double value)
203 {
204  this->ContourValues->SetValue(i, value);
205 }
206 
210 inline double vtkContourGrid::GetValue(int i)
211 {
212  return this->ContourValues->GetValue(i);
213 }
214 
220 {
221  return this->ContourValues->GetValues();
222 }
223 
229 inline void vtkContourGrid::GetValues(double* contourValues)
230 {
231  this->ContourValues->GetValues(contourValues);
232 }
233 
239 inline void vtkContourGrid::SetNumberOfContours(int number)
240 {
241  this->ContourValues->SetNumberOfContours(number);
242 }
243 
248 {
249  return this->ContourValues->GetNumberOfContours();
250 }
251 
256 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
257 {
258  this->ContourValues->GenerateValues(numContours, range);
259 }
260 
265 inline void vtkContourGrid::GenerateValues(int numContours, double rangeStart, double rangeEnd)
266 {
267  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
268 }
269 
270 #endif
vtkContourGrid::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkContourGrid::UseScalarTree
vtkTypeBool UseScalarTree
Definition: vtkContourGrid.h:187
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:256
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkContourGrid::SetValue
void SetValue(int i, double value)
Methods to set / get contour values.
Definition: vtkContourGrid.h:202
vtkEdgeTable
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:41
vtkContourGrid::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkContourGrid.h:219
vtkContourGrid::SetScalarTree
void SetScalarTree(vtkScalarTree *sTree)
Specify the instance of vtkScalarTree to use.
vtkPolyDataAlgorithm.h
vtkContourGrid::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkContourGrid::New
static vtkContourGrid * New()
Construct object with initial range (0,1) and single contour value of 0.0.
vtkContourGrid::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkContourGrid.h:182
vtkContourGrid::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:55
vtkContourGrid::~vtkContourGrid
~vtkContourGrid() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkContourGrid::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkContourGrid::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkContourGrid.h:183
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:239
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkContourGrid::EdgeTable
vtkEdgeTable * EdgeTable
Definition: vtkContourGrid.h:191
vtkContourGrid::ContourValues
vtkContourValues * ContourValues
Definition: vtkContourGrid.h:180
vtkContourGrid::SetOutputPointsPrecision
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output types.
vtkContourGrid::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkContourGrid.h:181
vtkContourGrid
generate isosurfaces/isolines from scalar values (specialized for unstructured grids)
Definition: vtkContourGrid.h:66
vtkContourGrid::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkContourGrid.h:185
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkContourGrid::GetMTime
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to vtkContourValues.
vtkContourGrid::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkContourGrid.h:210
vtkContourGrid::vtkContourGrid
vtkContourGrid()
vtkContourGrid::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkContourGrid.h:190
vtkScalarTree
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:55
vtkContourGrid::ScalarTree
vtkScalarTree * ScalarTree
Definition: vtkContourGrid.h:188
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkContourGrid::GetNumberOfContours
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkContourGrid.h:247
vtkContourGrid::GetOutputPointsPrecision
int GetOutputPointsPrecision() const
Set/get the desired precision for the output types.
vtkContourGrid::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151