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 =========================================================================*/
31 #ifndef vtkRectilinearSynchronizedTemplates_h
32 #define vtkRectilinearSynchronizedTemplates_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 #include "vtkContourValues.h" // Passes calls through
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) VTK_OVERRIDE;
48 
52  vtkMTimeType GetMTime() VTK_OVERRIDE;
53 
55 
61  vtkSetMacro(ComputeNormals,int);
62  vtkGetMacro(ComputeNormals,int);
63  vtkBooleanMacro(ComputeNormals,int);
65 
67 
75  vtkSetMacro(ComputeGradients,int);
76  vtkGetMacro(ComputeGradients,int);
77  vtkBooleanMacro(ComputeGradients,int);
79 
81 
84  vtkSetMacro(ComputeScalars,int);
85  vtkGetMacro(ComputeScalars,int);
86  vtkBooleanMacro(ComputeScalars,int);
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) {
112  this->ContourValues->GetValues(contourValues);}
113 
119  void SetNumberOfContours(int number) {
120  this->ContourValues->SetNumberOfContours(number);}
121 
126  return this->ContourValues->GetNumberOfContours();}
127 
132  void GenerateValues(int numContours, double range[2]) {
133  this->ContourValues->GenerateValues(numContours, range);}
134 
139  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
140  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
141 
143 
146  vtkSetMacro(ArrayComponent, int);
147  vtkGetMacro(ArrayComponent, int);
149 
151 
155  vtkSetMacro(GenerateTriangles,int);
156  vtkGetMacro(GenerateTriangles,int);
157  vtkBooleanMacro(GenerateTriangles,int);
159 
164  void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
165  int extent[6], double spacing[6]);
166 
167 protected:
169  ~vtkRectilinearSynchronizedTemplates() VTK_OVERRIDE;
170 
171  int ComputeNormals;
172  int ComputeGradients;
173  int ComputeScalars;
174  int GenerateTriangles;
175 
176  vtkContourValues *ContourValues;
177 
178  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
179  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
180  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
181 
182  int ArrayComponent;
183 
184  void* GetScalarsForExtent(vtkDataArray *array, int extent[6],
185  vtkRectilinearGrid *input);
186 
187 private:
189  void operator=(const vtkRectilinearSynchronizedTemplates&) VTK_DELETE_FUNCTION;
190 };
191 
192 // template table.
193 
196 
197 #endif
helper object to manage setting and generating contour values
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]
Store vtkAlgorithm input/output information.
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
double GetValue(int i)
Get the ith contour value.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
void GetValues(double *contourValues)
Fill a supplied list with contour values.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
int GetNumberOfContours()
Get the number of contours in the list of contour values.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.