VTK
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 "vtkFiltersCoreModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 #include "vtkContourValues.h" // Passes calls through
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) {
115  this->ContourValues->GetValues(contourValues);}
116 
122  void SetNumberOfContours(int number) {
123  this->ContourValues->SetNumberOfContours(number);}
124 
129  return this->ContourValues->GetNumberOfContours();}
130 
135  void GenerateValues(int numContours, double range[2]) {
136  this->ContourValues->GenerateValues(numContours, range);}
137 
142  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
143  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
144 
146 
149  vtkSetMacro(ArrayComponent, int);
150  vtkGetMacro(ArrayComponent, int);
152 
154 
158  vtkSetMacro(GenerateTriangles,vtkTypeBool);
159  vtkGetMacro(GenerateTriangles,vtkTypeBool);
160  vtkBooleanMacro(GenerateTriangles,vtkTypeBool);
162 
167  void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
168  int extent[6], double spacing[6]);
169 
170 protected:
173 
178 
180 
183  int FillInputPortInformation(int port, vtkInformation *info) override;
184 
186 
187  void* GetScalarsForExtent(vtkDataArray *array, int extent[6],
188  vtkRectilinearGrid *input);
189 
190 private:
192  void operator=(const vtkRectilinearSynchronizedTemplates&) = delete;
193 };
194 
195 // template table.
196 
199 
200 #endif
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:135
vtkRectilinearSynchronizedTemplates::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
Definition: vtkRectilinearSynchronizedTemplates.h:142
vtkRectilinearSynchronizedTemplates::SetValue
void SetValue(int i, double value)
Set a particular contour value at contour number i.
Definition: vtkRectilinearSynchronizedTemplates.h:96
vtkRectilinearSynchronizedTemplates::ContourValues
vtkContourValues * ContourValues
Definition: vtkRectilinearSynchronizedTemplates.h:179
vtkRectilinearSynchronizedTemplates::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkRectilinearSynchronizedTemplates.h:176
vtkRectilinearSynchronizedTemplates::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkRectilinearSynchronizedTemplates.h:101
vtkX3D::value
Definition: vtkX3D.h:220
vtkRectilinearSynchronizedTemplates::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkRectilinearSynchronizedTemplates.h:175
vtkX3D::data
Definition: vtkX3D.h:315
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
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:114
vtkX3D::range
Definition: vtkX3D.h:238
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
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:174
VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
vtkPolyDataAlgorithm.h
vtkRectilinearSynchronizedTemplates
generate isosurface from rectilinear grid
Definition: vtkRectilinearSynchronizedTemplates.h:44
vtkX3D::port
Definition: vtkX3D.h:447
vtkRectilinearSynchronizedTemplates::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkRectilinearSynchronizedTemplates.h:128
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:107
vtkRectilinearSynchronizedTemplates::ArrayComponent
int ArrayComponent
Definition: vtkRectilinearSynchronizedTemplates.h:185
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRectilinearSynchronizedTemplates::GenerateTriangles
vtkTypeBool GenerateTriangles
Definition: vtkRectilinearSynchronizedTemplates.h:177
vtkRectilinearSynchronizedTemplates::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkRectilinearSynchronizedTemplates.h:122
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourValues.h
vtkX3D::spacing
Definition: vtkX3D.h:481
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkX3D::extent
Definition: vtkX3D.h:345
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44