VTK  9.2.6
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=========================================================================*/
55
56#ifndef vtkContourGrid_h
57#define vtkContourGrid_h
58
59#include "vtkFiltersCoreModule.h" // For export macro
61
62#include "vtkContourValues.h" // Needed for inline methods
63
64class vtkEdgeTable;
65class vtkScalarTree;
67
68class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
69{
70public:
72 void PrintSelf(ostream& os, vtkIndent indent) override;
73
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);
90 void GenerateValues(int numContours, double range[2]);
91 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
93
98
100
108 vtkBooleanMacro(ComputeNormals, vtkTypeBool);
110
112
117 vtkBooleanMacro(ComputeScalars, vtkTypeBool);
119
121
126 vtkBooleanMacro(UseScalarTree, vtkTypeBool);
128
130
135 vtkGetObjectMacro(ScalarTree, vtkScalarTree);
137
139
146
148
159
165
167
172 void SetOutputPointsPrecision(int precision);
175
176protected:
178 ~vtkContourGrid() override;
179
181 int FillInputPortInformation(int port, vtkInformation* info) override;
182
187
189
192
195
196private:
197 vtkContourGrid(const vtkContourGrid&) = delete;
198 void operator=(const vtkContourGrid&) = delete;
199};
200
205inline void vtkContourGrid::SetValue(int i, double value)
206{
207 this->ContourValues->SetValue(i, value);
208}
209
213inline double vtkContourGrid::GetValue(int i)
214{
215 return this->ContourValues->GetValue(i);
216}
217
223{
224 return this->ContourValues->GetValues();
225}
226
232inline void vtkContourGrid::GetValues(double* contourValues)
233{
234 this->ContourValues->GetValues(contourValues);
235}
236
243{
244 this->ContourValues->SetNumberOfContours(number);
245}
246
251{
252 return this->ContourValues->GetNumberOfContours();
253}
254
259inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
260{
261 this->ContourValues->GenerateValues(numContours, range);
262}
263
268inline void vtkContourGrid::GenerateValues(int numContours, double rangeStart, double rangeEnd)
269{
270 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
271}
272
273#endif
double * GetValues()
Get a pointer to an array of contour values.
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkIncrementalPointLocator * Locator
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.
vtkEdgeTable * EdgeTable
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourValues * ContourValues
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
~vtkContourGrid() override
void SetValue(int i, double value)
Methods to set / get contour values.
void SetScalarTree(vtkScalarTree *sTree)
Specify the instance of vtkScalarTree to use.
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
vtkTypeBool ComputeNormals
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to vtkContourValues.
vtkTypeBool GenerateTriangles
void CreateDefaultLocator()
Create default locator.
vtkScalarTree * ScalarTree
int GetOutputPointsPrecision() const
Set/get the desired precision for the output types.
double GetValue(int i)
Get the ith contour value.
vtkTypeBool UseScalarTree
vtkTypeBool ComputeScalars
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output types.
helper object to manage setting and generating contour values
keep track of edges (edge is pair of integer id's)
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.
organize data according to scalar values (used to accelerate contouring operations)
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287