VTK  9.0.1
vtkRectilinearSynchronizedTemplates.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRectilinearSynchronizedTemplates.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 =========================================================================*/
31 #ifndef vtkRectilinearSynchronizedTemplates_h
32 #define vtkRectilinearSynchronizedTemplates_h
33 
34 #include "vtkContourValues.h" // Passes calls through
35 #include "vtkFiltersCoreModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 class vtkRectilinearGrid;
39 class vtkDataArray;
40 
41 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm
42 {
43 public:
45 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  vtkMTimeType GetMTime() override;
53 
55 
61  vtkSetMacro(ComputeNormals, vtkTypeBool);
62  vtkGetMacro(ComputeNormals, vtkTypeBool);
63  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
65 
67 
75  vtkSetMacro(ComputeGradients, vtkTypeBool);
76  vtkGetMacro(ComputeGradients, vtkTypeBool);
77  vtkBooleanMacro(ComputeGradients, vtkTypeBool);
79 
81 
84  vtkSetMacro(ComputeScalars, vtkTypeBool);
85  vtkGetMacro(ComputeScalars, vtkTypeBool);
86  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
88 
93  void SetValue(int i, double value) { this->ContourValues->SetValue(i, value); }
94 
98  double GetValue(int i) { return this->ContourValues->GetValue(i); }
99 
104  double* GetValues() { return this->ContourValues->GetValues(); }
105 
111  void GetValues(double* contourValues) { this->ContourValues->GetValues(contourValues); }
112 
118  void SetNumberOfContours(int number) { this->ContourValues->SetNumberOfContours(number); }
119 
123  vtkIdType GetNumberOfContours() { return this->ContourValues->GetNumberOfContours(); }
124 
129  void GenerateValues(int numContours, double range[2])
130  {
131  this->ContourValues->GenerateValues(numContours, range);
132  }
133 
138  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
139  {
140  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
141  }
142 
144 
147  vtkSetMacro(ArrayComponent, int);
148  vtkGetMacro(ArrayComponent, int);
150 
152 
156  vtkSetMacro(GenerateTriangles, vtkTypeBool);
157  vtkGetMacro(GenerateTriangles, vtkTypeBool);
158  vtkBooleanMacro(GenerateTriangles, vtkTypeBool);
160 
165  void ComputeSpacing(
166  vtkRectilinearGrid* data, int i, int j, int k, int extent[6], double spacing[6]);
167 
168 protected:
171 
176 
178 
181  int FillInputPortInformation(int port, vtkInformation* info) override;
182 
184 
185  void* GetScalarsForExtent(vtkDataArray* array, int extent[6], vtkRectilinearGrid* input);
186 
187 private:
189  void operator=(const vtkRectilinearSynchronizedTemplates&) = delete;
190 };
191 
192 // template table.
193 
196 
197 #endif
vtkRectilinearSynchronizedTemplates::GetNumberOfContours
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:123
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:129
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:138
vtkRectilinearSynchronizedTemplates::SetValue
void SetValue(int i, double value)
Set a particular contour value at contour number i.
Definition: vtkRectilinearSynchronizedTemplates.h:93
vtkRectilinearSynchronizedTemplates::ContourValues
vtkContourValues * ContourValues
Definition: vtkRectilinearSynchronizedTemplates.h:177
vtkRectilinearSynchronizedTemplates::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkRectilinearSynchronizedTemplates.h:174
vtkRectilinearSynchronizedTemplates::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkRectilinearSynchronizedTemplates.h:98
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkRectilinearSynchronizedTemplates::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkRectilinearSynchronizedTemplates.h:173
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:51
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkRectilinearSynchronizedTemplates::GetValues
void GetValues(double *contourValues)
Fill a supplied list with contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:111
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRectilinearSynchronizedTemplates::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkRectilinearSynchronizedTemplates.h:172
VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
vtkPolyDataAlgorithm.h
vtkRectilinearSynchronizedTemplates
generate isosurface from rectilinear grid
Definition: vtkRectilinearSynchronizedTemplates.h:41
vtkX3D::port
@ port
Definition: vtkX3D.h:453
VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]
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
vtkRectilinearSynchronizedTemplates::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:104
vtkRectilinearSynchronizedTemplates::ArrayComponent
int ArrayComponent
Definition: vtkRectilinearSynchronizedTemplates.h:183
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkRectilinearSynchronizedTemplates::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkRectilinearSynchronizedTemplates.h:175
vtkRectilinearSynchronizedTemplates::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkRectilinearSynchronizedTemplates.h:118
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourValues.h
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41