VTK  9.2.6
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 =========================================================================*/
34 #ifndef vtkRectilinearSynchronizedTemplates_h
35 #define vtkRectilinearSynchronizedTemplates_h
36 
37 #include "vtkContourValues.h" // Passes calls through
38 #include "vtkFiltersCoreModule.h" // For export macro
39 #include "vtkPolyDataAlgorithm.h"
40 
41 class vtkRectilinearGrid;
42 class vtkDataArray;
43 
44 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm
45 {
46 public:
48 
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
55  vtkMTimeType GetMTime() override;
56 
58 
64  vtkSetMacro(ComputeNormals, vtkTypeBool);
65  vtkGetMacro(ComputeNormals, vtkTypeBool);
66  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
68 
70 
78  vtkSetMacro(ComputeGradients, vtkTypeBool);
79  vtkGetMacro(ComputeGradients, vtkTypeBool);
80  vtkBooleanMacro(ComputeGradients, vtkTypeBool);
82 
84 
87  vtkSetMacro(ComputeScalars, vtkTypeBool);
88  vtkGetMacro(ComputeScalars, vtkTypeBool);
89  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
91 
96  void SetValue(int i, double value) { this->ContourValues->SetValue(i, value); }
97 
101  double GetValue(int i) { return this->ContourValues->GetValue(i); }
102 
107  double* GetValues() { return this->ContourValues->GetValues(); }
108 
114  void GetValues(double* contourValues) { this->ContourValues->GetValues(contourValues); }
115 
121  void SetNumberOfContours(int number) { this->ContourValues->SetNumberOfContours(number); }
122 
126  vtkIdType GetNumberOfContours() { return this->ContourValues->GetNumberOfContours(); }
127 
132  void GenerateValues(int numContours, double range[2])
133  {
134  this->ContourValues->GenerateValues(numContours, range);
135  }
136 
141  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
142  {
143  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
144  }
145 
147 
150  vtkSetMacro(ArrayComponent, int);
151  vtkGetMacro(ArrayComponent, int);
153 
155 
159  vtkSetMacro(GenerateTriangles, vtkTypeBool);
160  vtkGetMacro(GenerateTriangles, vtkTypeBool);
161  vtkBooleanMacro(GenerateTriangles, vtkTypeBool);
163 
168  void ComputeSpacing(
169  vtkRectilinearGrid* data, int i, int j, int k, int extent[6], double spacing[6]);
170 
171 protected:
174 
179 
181 
184  int FillInputPortInformation(int port, vtkInformation* info) override;
185 
187 
188  void* GetScalarsForExtent(vtkDataArray* array, int extent[6], vtkRectilinearGrid* input);
189 
190 private:
192  void operator=(const vtkRectilinearSynchronizedTemplates&) = delete;
193 };
194 
195 // template table.
196 
199 
200 #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:287
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:332
void GetValues(double *contourValues)
Fill a supplied list with contour values.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
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.
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.