VTK
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 =========================================================================*/
30 #ifndef vtkGridSynchronizedTemplates3D_h
31 #define vtkGridSynchronizedTemplates3D_h
32 
33 #include "vtkFiltersCoreModule.h" // For export macro
34 #include "vtkPolyDataAlgorithm.h"
35 #include "vtkContourValues.h" // Because it passes all the calls to it
36 
37 class vtkStructuredGrid;
38 
39 class VTKFILTERSCORE_EXPORT vtkGridSynchronizedTemplates3D : public vtkPolyDataAlgorithm
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
49  vtkMTimeType GetMTime() VTK_OVERRIDE;
50 
52 
58  vtkSetMacro(ComputeNormals,int);
59  vtkGetMacro(ComputeNormals,int);
60  vtkBooleanMacro(ComputeNormals,int);
62 
64 
72  vtkSetMacro(ComputeGradients,int);
73  vtkGetMacro(ComputeGradients,int);
74  vtkBooleanMacro(ComputeGradients,int);
76 
78 
81  vtkSetMacro(ComputeScalars,int);
82  vtkGetMacro(ComputeScalars,int);
83  vtkBooleanMacro(ComputeScalars,int);
85 
87 
91  vtkSetMacro(GenerateTriangles,int);
92  vtkGetMacro(GenerateTriangles,int);
93  vtkBooleanMacro(GenerateTriangles,int);
95 
100  void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
101 
105  double GetValue(int i) {return this->ContourValues->GetValue(i);}
106 
111  double *GetValues() {return this->ContourValues->GetValues();}
112 
118  void GetValues(double *contourValues) {
119  this->ContourValues->GetValues(contourValues);}
120 
126  void SetNumberOfContours(int number) {
127  this->ContourValues->SetNumberOfContours(number);}
128 
133  return this->ContourValues->GetNumberOfContours();}
134 
139  void GenerateValues(int numContours, double range[2]) {
140  this->ContourValues->GenerateValues(numContours, range);}
141 
146  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
147  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
148 
152  void ThreadedExecute(vtkStructuredGrid *input,
153  vtkInformationVector **inVec,
154  vtkInformation *outInfo);
155 
160  void SetInputMemoryLimit(long limit);
161 
163 
168  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
169  vtkGetMacro(OutputPointsPrecision, int);
171 
172 protected:
174  ~vtkGridSynchronizedTemplates3D() VTK_OVERRIDE;
175 
176  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
177  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
178  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
179 
180  int ComputeNormals;
181  int ComputeGradients;
182  int ComputeScalars;
183  int GenerateTriangles;
184 
185  vtkContourValues *ContourValues;
186 
187  int MinimumPieceSize[3];
188  int OutputPointsPrecision;
189 
190 private:
192  void operator=(const vtkGridSynchronizedTemplates3D&) VTK_DELETE_FUNCTION;
193 };
194 
195 
196 #endif
vtkX3D::value
Definition: vtkX3D.h:220
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkX3D::range
Definition: vtkX3D.h:238
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:63
vtkGridSynchronizedTemplates3D::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkGridSynchronizedTemplates3D.h:111
vtkGridSynchronizedTemplates3D::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkGridSynchronizedTemplates3D.h:132
vtkGridSynchronizedTemplates3D
generate isosurface from structured grids
Definition: vtkGridSynchronizedTemplates3D.h:39
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGridSynchronizedTemplates3D::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkGridSynchronizedTemplates3D.h:139
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkGridSynchronizedTemplates3D::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkGridSynchronizedTemplates3D.h:105
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkGridSynchronizedTemplates3D::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkGridSynchronizedTemplates3D.h:126
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
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkContourValues.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
Definition: vtkX3D.h:376
vtkGridSynchronizedTemplates3D::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
Definition: vtkGridSynchronizedTemplates3D.h:146
vtkGridSynchronizedTemplates3D::GetValues
void GetValues(double *contourValues)
Fill a supplied list with contour values.
Definition: vtkGridSynchronizedTemplates3D.h:118
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44