VTK
vtkSynchronizedTemplates3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSynchronizedTemplates3D.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 vtkSynchronizedTemplates3D_h
35 #define vtkSynchronizedTemplates3D_h
36 
37 #include "vtkFiltersCoreModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 #include "vtkContourValues.h" // Passes calls through
40 
41 class vtkImageData;
42 
43 class VTKFILTERSCORE_EXPORT vtkSynchronizedTemplates3D : public vtkPolyDataAlgorithm
44 {
45 public:
47 
49  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50 
54  vtkMTimeType GetMTime() VTK_OVERRIDE;
55 
57 
63  vtkSetMacro(ComputeNormals,int);
64  vtkGetMacro(ComputeNormals,int);
65  vtkBooleanMacro(ComputeNormals,int);
67 
69 
77  vtkSetMacro(ComputeGradients,int);
78  vtkGetMacro(ComputeGradients,int);
79  vtkBooleanMacro(ComputeGradients,int);
81 
83 
86  vtkSetMacro(ComputeScalars,int);
87  vtkGetMacro(ComputeScalars,int);
88  vtkBooleanMacro(ComputeScalars,int);
90 
92 
96  vtkSetMacro(GenerateTriangles,int);
97  vtkGetMacro(GenerateTriangles,int);
98  vtkBooleanMacro(GenerateTriangles,int);
100 
105  void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
106 
110  double GetValue(int i) {return this->ContourValues->GetValue(i);}
111 
116  double *GetValues() {return this->ContourValues->GetValues();}
117 
123  void GetValues(double *contourValues) {
124  this->ContourValues->GetValues(contourValues);}
125 
131  void SetNumberOfContours(int number) {
132  this->ContourValues->SetNumberOfContours(number);}
133 
138  return this->ContourValues->GetNumberOfContours();}
139 
144  void GenerateValues(int numContours, double range[2]) {
145  this->ContourValues->GenerateValues(numContours, range);}
146 
151  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
152  {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
153 
155  vtkInformation *inInfo,
156  vtkInformation *outInfo,
157  vtkDataArray *inScalars);
158 
160 
165  void SetInputMemoryLimit(unsigned long limit);
166  unsigned long GetInputMemoryLimit();
168 
170 
173  vtkSetMacro(ArrayComponent, int);
174  vtkGetMacro(ArrayComponent, int);
176 
177 protected:
180 
181  int ComputeNormals;
182  int ComputeGradients;
183  int ComputeScalars;
184  vtkContourValues *ContourValues;
185 
186  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
187  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
188  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
189 
190  int ArrayComponent;
191 
192  int GenerateTriangles;
193 
194 private:
195  vtkSynchronizedTemplates3D(const vtkSynchronizedTemplates3D&) VTK_DELETE_FUNCTION;
196  void operator=(const vtkSynchronizedTemplates3D&) VTK_DELETE_FUNCTION;
197 };
198 
199 
200 // template table.
201 
202 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_1[];
203 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_2[];
204 
205 #endif
206 
helper object to manage setting and generating contour values
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
generate isosurface from structured points
int GetNumberOfContours()
Get the number of contours in the list of contour values.
void SetInputMemoryLimit(unsigned long limit)
Determines the chunk size fro streaming.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void ThreadedExecute(vtkImageData *data, vtkInformation *inInfo, vtkInformation *outInfo, vtkDataArray *inScalars)
vtkMTimeType GetMTime() override
Because we delegate to vtkContourValues.
void GetValues(double *contourValues)
Fill a supplied list with contour values.
static vtkSynchronizedTemplates3D * New()
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
double GetValue(int i)
Get the ith contour value.
double * GetValues()
Get a pointer to an array of contour values.
unsigned long GetInputMemoryLimit()
~vtkSynchronizedTemplates3D() override
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ range
Definition: vtkX3D.h:238
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_2[]
int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_1[]
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248