VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
33 #ifndef __vtkRectilinearSynchronizedTemplates_h
34 #define __vtkRectilinearSynchronizedTemplates_h
35 
36 #include "vtkFiltersCoreModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 #include "vtkContourValues.h" // Passes calls through
39 
40 class vtkRectilinearGrid;
41 class vtkKitwareContourFilter;
42 class vtkDataArray;
43 
44 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm
45 {
46 public:
48 
49  vtkTypeMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataAlgorithm);
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53  unsigned long int GetMTime();
54 
56 
60  vtkSetMacro(ComputeNormals,int);
61  vtkGetMacro(ComputeNormals,int);
62  vtkBooleanMacro(ComputeNormals,int);
64 
66 
72  vtkSetMacro(ComputeGradients,int);
73  vtkGetMacro(ComputeGradients,int);
74  vtkBooleanMacro(ComputeGradients,int);
76 
78 
79  vtkSetMacro(ComputeScalars,int);
80  vtkGetMacro(ComputeScalars,int);
81  vtkBooleanMacro(ComputeScalars,int);
83 
86  void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
87 
89  double GetValue(int i) {return this->ContourValues->GetValue(i);}
90 
93  double *GetValues() {return this->ContourValues->GetValues();}
94 
96 
99  void GetValues(double *contourValues) {
100  this->ContourValues->GetValues(contourValues);}
102 
104 
107  void SetNumberOfContours(int number) {
108  this->ContourValues->SetNumberOfContours(number);}
110 
112 
114  return this->ContourValues->GetNumberOfContours();}
116 
118 
120  void GenerateValues(int numContours, double range[2]) {
121  this->ContourValues->GenerateValues(numContours, range);}
123 
125 
127  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
128  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
130 
132  int *GetExecuteExtent() {return this->ExecuteExtent;}
133 
135 
137  vtkSetMacro(ArrayComponent, int);
138  vtkGetMacro(ArrayComponent, int);
140 
142 
144  vtkSetMacro(GenerateTriangles,int);
145  vtkGetMacro(GenerateTriangles,int);
146  vtkBooleanMacro(GenerateTriangles,int);
148 
150 
153  void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
154  int extent[6], double spacing[6]);
156 
157 protected:
160 
165 
166  vtkContourValues *ContourValues;
167 
168  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
169  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
170  virtual int FillInputPortInformation(int port, vtkInformation *info);
171 
172  int ExecuteExtent[6];
173 
175 
176  void* GetScalarsForExtent(vtkDataArray *array, int extent[6],
177  vtkRectilinearGrid *input);
178 
179 private:
181  void operator=(const vtkRectilinearSynchronizedTemplates&); // Not implemented.
182 };
183 
184 // template table.
185 //BTX
186 
189 
190 //ETX
191 
192 #endif
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]
int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
generate isosurface from rectilinear grid
void GenerateValues(int numContours, double range[2])