VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkGridSynchronizedTemplates3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGridSynchronizedTemplates3D.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 =========================================================================*/
29 #ifndef __vtkGridSynchronizedTemplates3D_h
30 #define __vtkGridSynchronizedTemplates3D_h
31 
32 #include "vtkFiltersCoreModule.h" // For export macro
33 #include "vtkPolyDataAlgorithm.h"
34 #include "vtkContourValues.h" // Because it passes all the calls to it
35 
36 class vtkKitwareContourFilter;
37 class vtkStructuredGrid;
38 
39 class VTKFILTERSCORE_EXPORT vtkGridSynchronizedTemplates3D : public vtkPolyDataAlgorithm
40 {
41 public:
42  static vtkGridSynchronizedTemplates3D *New();
43  vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkPolyDataAlgorithm);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47  unsigned long int GetMTime();
48 
50 
54  vtkSetMacro(ComputeNormals,int);
55  vtkGetMacro(ComputeNormals,int);
56  vtkBooleanMacro(ComputeNormals,int);
58 
60 
66  vtkSetMacro(ComputeGradients,int);
67  vtkGetMacro(ComputeGradients,int);
68  vtkBooleanMacro(ComputeGradients,int);
70 
72 
73  vtkSetMacro(ComputeScalars,int);
74  vtkGetMacro(ComputeScalars,int);
75  vtkBooleanMacro(ComputeScalars,int);
77 
79 
81  vtkSetMacro(GenerateTriangles,int);
82  vtkGetMacro(GenerateTriangles,int);
83  vtkBooleanMacro(GenerateTriangles,int);
85 
88  void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
89 
91  double GetValue(int i) {return this->ContourValues->GetValue(i);}
92 
95  double *GetValues() {return this->ContourValues->GetValues();}
96 
98 
101  void GetValues(double *contourValues) {
102  this->ContourValues->GetValues(contourValues);}
104 
106 
109  void SetNumberOfContours(int number) {
110  this->ContourValues->SetNumberOfContours(number);}
112 
114 
116  return this->ContourValues->GetNumberOfContours();}
118 
120 
122  void GenerateValues(int numContours, double range[2]) {
123  this->ContourValues->GenerateValues(numContours, range);}
125 
127 
129  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
130  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
132 
134 
135  int *GetExecuteExtent() {return this->ExecuteExtent;}
136  void ThreadedExecute(int *exExt, int threadId, vtkStructuredGrid *input,
137  vtkInformationVector **inVec,
138  vtkInformation *outInfo);
140 
143  void SetInputMemoryLimit(long limit);
144 
146 
149  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
150  vtkGetMacro(OutputPointsPrecision, int);
152 
153 protected:
156 
157  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
158  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
159  virtual int FillInputPortInformation(int port, vtkInformation *info);
160 
165 
166  vtkContourValues *ContourValues;
167 
168  int MinimumPieceSize[3];
169  int ExecuteExtent[6];
171 
172 private:
174  void operator=(const vtkGridSynchronizedTemplates3D&); // Not implemented.
175 };
176 
177 
178 #endif
void GenerateValues(int numContours, double range[2])
generate isosurface from structured grids
void GenerateValues(int numContours, double rangeStart, double rangeEnd)