VTK  9.7.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 "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0
27 #include "vtkFiltersCoreModule.h" // For export macro
28 #include "vtkPolyDataAlgorithm.h"
29 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkRectilinearGrid;
33 class vtkDataArray;
34 
36  : public vtkPolyDataAlgorithm
37 {
38 public:
40 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
47  vtkMTimeType GetMTime() override;
48 
50 
56  vtkSetMacro(ComputeNormals, vtkTypeBool);
57  vtkGetMacro(ComputeNormals, vtkTypeBool);
58  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
60 
62 
70  vtkSetMacro(ComputeGradients, vtkTypeBool);
71  vtkGetMacro(ComputeGradients, vtkTypeBool);
72  vtkBooleanMacro(ComputeGradients, vtkTypeBool);
74 
76 
79  vtkSetMacro(ComputeScalars, vtkTypeBool);
80  vtkGetMacro(ComputeScalars, vtkTypeBool);
81  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
83 
88  void SetValue(int i, double value) { this->ContourValues->SetValue(i, value); }
89 
93  double GetValue(int i) { return this->ContourValues->GetValue(i); }
94 
99  double* GetValues() { return this->ContourValues->GetValues(); }
100 
106  void GetValues(double* contourValues) { this->ContourValues->GetValues(contourValues); }
107 
113  void SetNumberOfContours(int number) { this->ContourValues->SetNumberOfContours(number); }
114 
118  vtkIdType GetNumberOfContours() { return this->ContourValues->GetNumberOfContours(); }
119 
124  void GenerateValues(int numContours, double range[2])
125  {
126  this->ContourValues->GenerateValues(numContours, range);
127  }
128 
133  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
134  {
135  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
136  }
137 
139 
142  vtkSetMacro(ArrayComponent, int);
143  vtkGetMacro(ArrayComponent, int);
145 
147 
151  vtkSetMacro(GenerateTriangles, vtkTypeBool);
152  vtkGetMacro(GenerateTriangles, vtkTypeBool);
153  vtkBooleanMacro(GenerateTriangles, vtkTypeBool);
155 
160  void ComputeSpacing(
161  vtkRectilinearGrid* data, int i, int j, int k, int extent[6], double spacing[6]);
162 
163 protected:
166 
171 
173 
176  int FillInputPortInformation(int port, vtkInformation* info) override;
177 
179 
180  VTK_DEPRECATED_IN_9_6_0("GetScalarsForExtent is no longer used.")
181  void* GetScalarsForExtent(vtkDataArray*, int[6], vtkRectilinearGrid*);
182 
183 private:
185  void operator=(const vtkRectilinearSynchronizedTemplates&) = delete;
186 };
187 
188 // template table.
189 
192 
193 VTK_ABI_NAMESPACE_END
194 #endif
helper object to manage setting and generating contour values
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]
Store vtkAlgorithm input/output information.
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
double GetValue(int i)
Get the ith contour value.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
void SetValue(int i, double value)
Set a particular contour value at contour number i.
int vtkIdType
Definition: vtkType.h:363
void GetValues(double *contourValues)
Fill a supplied list with contour values.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
#define VTK_DEPRECATED_IN_9_6_0(reason)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
double * GetValues()
Get a pointer to an array of contour values.
generate isosurface from rectilinear grid
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.