VTK: Filters/Core/vtkRectilinearSynchronizedTemplates.h Source File

| VTK 9.3.1

vtkRectilinearSynchronizedTemplates.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkRectilinearSynchronizedTemplates_h
23 #define vtkRectilinearSynchronizedTemplates_h
24
25 #include "vtkContourValues.h" // Passes calls through
26 #include "vtkFiltersCoreModule.h" // For export macro
27 #include "vtkPolyDataAlgorithm.h"
28
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkRectilinearGrid;
31 class vtkDataArray;
32
33 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm
34 {
35 public:
36 static vtkRectilinearSynchronizedTemplates* New();
37
38 vtkTypeMacro(vtkRectilinearSynchronizedTemplates, vtkPolyDataAlgorithm);
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 vtkMTimeType GetMTime() override;
45
47
53 vtkSetMacro(ComputeNormals, vtkTypeBool);
54 vtkGetMacro(ComputeNormals, vtkTypeBool);
55 vtkBooleanMacro(ComputeNormals, vtkTypeBool);
57
59
67 vtkSetMacro(ComputeGradients, vtkTypeBool);
68 vtkGetMacro(ComputeGradients, vtkTypeBool);
69 vtkBooleanMacro(ComputeGradients, vtkTypeBool);
71
73
76 vtkSetMacro(ComputeScalars, vtkTypeBool);
77 vtkGetMacro(ComputeScalars, vtkTypeBool);
78 vtkBooleanMacro(ComputeScalars, vtkTypeBool);
80
85 void SetValue(int i, double value) { this->ContourValues->SetValue(i, value); }
86
90 double GetValue(int i) { return this->ContourValues->GetValue(i); }
91
96 double* GetValues() { return this->ContourValues->GetValues(); }
97
103 void GetValues(double* contourValues) { this->ContourValues->GetValues(contourValues); }
104
110 void SetNumberOfContours(int number) { this->ContourValues->SetNumberOfContours(number); }
111
115 vtkIdType GetNumberOfContours() { return this->ContourValues->GetNumberOfContours(); }
116
121 void GenerateValues(int numContours, double range[2])
122 {
123 this->ContourValues->GenerateValues(numContours, range);
124 }
125
130 void GenerateValues(int numContours, double rangeStart, double rangeEnd)
131 {
132 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
133 }
134
136
139 vtkSetMacro(ArrayComponent, int);
140 vtkGetMacro(ArrayComponent, int);
142
144
148 vtkSetMacro(GenerateTriangles, vtkTypeBool);
149 vtkGetMacro(GenerateTriangles, vtkTypeBool);
150 vtkBooleanMacro(GenerateTriangles, vtkTypeBool);
152
157 void ComputeSpacing(
158 vtkRectilinearGrid* data, int i, int j, int k, int extent[6], double spacing[6]);
159
160 protected:
161 vtkRectilinearSynchronizedTemplates();
162 ~vtkRectilinearSynchronizedTemplates() override;
163
164 vtkTypeBool ComputeNormals;
165 vtkTypeBool ComputeGradients;
166 vtkTypeBool ComputeScalars;
167 vtkTypeBool GenerateTriangles;
168
169 vtkContourValues* ContourValues;
170
171 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
172 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
173 int FillInputPortInformation(int port, vtkInformation* info) override;
174
175 int ArrayComponent;
176
177 void* GetScalarsForExtent(vtkDataArray* array, int extent[6], vtkRectilinearGrid* input);
178
179 private:
180 vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&) = delete;
181 void operator=(const vtkRectilinearSynchronizedTemplates&) = delete;
182 };
183
184 // template table.
185
186 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[];
187 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[];
188
189 VTK_ABI_NAMESPACE_END
190 #endif
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:34
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkRectilinearSynchronizedTemplates
generate isosurface from rectilinear grid
Definition: vtkRectilinearSynchronizedTemplates.h:34
vtkRectilinearSynchronizedTemplates::ContourValues
vtkContourValues * ContourValues
Definition: vtkRectilinearSynchronizedTemplates.h:169
vtkRectilinearSynchronizedTemplates::GetMTime
vtkMTimeType GetMTime() override
Because we delegate to vtkContourValues.
vtkRectilinearSynchronizedTemplates::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkRectilinearSynchronizedTemplates::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:130
vtkRectilinearSynchronizedTemplates::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkRectilinearSynchronizedTemplates.h:167
vtkRectilinearSynchronizedTemplates::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkRectilinearSynchronizedTemplates.h:90
vtkRectilinearSynchronizedTemplates::GetNumberOfContours
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:115
vtkRectilinearSynchronizedTemplates::vtkRectilinearSynchronizedTemplates
vtkRectilinearSynchronizedTemplates()
vtkRectilinearSynchronizedTemplates::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkRectilinearSynchronizedTemplates::ArrayComponent
int ArrayComponent
Definition: vtkRectilinearSynchronizedTemplates.h:175
vtkRectilinearSynchronizedTemplates::GetScalarsForExtent
void * GetScalarsForExtent(vtkDataArray *array, int extent[6], vtkRectilinearGrid *input)
vtkRectilinearSynchronizedTemplates::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRectilinearSynchronizedTemplates::~vtkRectilinearSynchronizedTemplates
~vtkRectilinearSynchronizedTemplates() override
vtkRectilinearSynchronizedTemplates::GetValues
void GetValues(double *contourValues)
Fill a supplied list with contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:103
vtkRectilinearSynchronizedTemplates::SetValue
void SetValue(int i, double value)
Set a particular contour value at contour number i.
Definition: vtkRectilinearSynchronizedTemplates.h:85
vtkRectilinearSynchronizedTemplates::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkRectilinearSynchronizedTemplates.h:165
vtkRectilinearSynchronizedTemplates::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkRectilinearSynchronizedTemplates.h:110
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:121
vtkRectilinearSynchronizedTemplates::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkRectilinearSynchronizedTemplates.h:164
vtkRectilinearSynchronizedTemplates::ComputeSpacing
void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k, int extent[6], double spacing[6])
Compute the spacing between this point and its 6 neighbors.
vtkRectilinearSynchronizedTemplates::New
static vtkRectilinearSynchronizedTemplates * New()
vtkRectilinearSynchronizedTemplates::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkRectilinearSynchronizedTemplates.h:166
vtkRectilinearSynchronizedTemplates::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:96
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:481
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkContourValues.h
vtkPolyDataAlgorithm.h
VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]
VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270