VTK
vtkMarchingContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMarchingContourFilter.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 =========================================================================*/
56 #ifndef vtkMarchingContourFilter_h
57 #define vtkMarchingContourFilter_h
58 
59 #include "vtkFiltersGeneralModule.h" // For export macro
60 #include "vtkPolyDataAlgorithm.h"
61 
62 #include "vtkContourValues.h" // Needed for direct access to ContourValues
63 
65 class vtkScalarTree;
66 
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
76 
78 
79  void SetValue(int i, double value);
80  double GetValue(int i);
81  double *GetValues();
82  void GetValues(double *contourValues);
83  void SetNumberOfContours(int number);
84  int GetNumberOfContours();
85  void GenerateValues(int numContours, double range[2]);
86  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
88 
90  unsigned long GetMTime();
91 
93 
97  vtkSetMacro(ComputeNormals,int);
98  vtkGetMacro(ComputeNormals,int);
99  vtkBooleanMacro(ComputeNormals,int);
101 
103 
109  vtkSetMacro(ComputeGradients,int);
110  vtkGetMacro(ComputeGradients,int);
111  vtkBooleanMacro(ComputeGradients,int);
113 
115 
116  vtkSetMacro(ComputeScalars,int);
117  vtkGetMacro(ComputeScalars,int);
118  vtkBooleanMacro(ComputeScalars,int);
120 
122 
123  vtkSetMacro(UseScalarTree,int);
124  vtkGetMacro(UseScalarTree,int);
125  vtkBooleanMacro(UseScalarTree,int);
127 
129 
134 
138 
139 protected:
142 
145 
153 
154  //special contouring for structured points
156  //special contouring for image data
157  void ImageContour(int dim, vtkDataSet *input, vtkPolyData *output);
158  //default if not structured data
160 private:
161  vtkMarchingContourFilter(const vtkMarchingContourFilter&); // Not implemented.
162  void operator=(const vtkMarchingContourFilter&); // Not implemented.
163 };
164 
166 
168 inline void vtkMarchingContourFilter::SetValue(int i, double value)
169 {
170  this->ContourValues->SetValue(i,value);
171 }
173 
175 
177 {
178  return this->ContourValues->GetValue(i);
179 }
181 
183 
186 {
187  return this->ContourValues->GetValues();
188 }
190 
192 
195 inline void vtkMarchingContourFilter::GetValues(double *contourValues)
196 {
197  this->ContourValues->GetValues(contourValues);
198 }
200 
202 
206 {
207  this->ContourValues->SetNumberOfContours(number);
208 }
210 
212 
214 {
215  return this->ContourValues->GetNumberOfContours();
216 }
218 
220 
222 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
223  double range[2])
224 {
225  this->ContourValues->GenerateValues(numContours, range);
226 }
228 
230 
232 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
233  double rangeStart,
234  double rangeEnd)
235 {
236  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
237 }
239 
240 #endif
vtkMarchingContourFilter::GenerateValues
void GenerateValues(int numContours, double range[2])
Definition: vtkMarchingContourFilter.h:222
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkMarchingContourFilter::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkMarchingContourFilter::SetValue
void SetValue(int i, double value)
Definition: vtkMarchingContourFilter.h:168
vtkContourValues::GetValues
double * GetValues()
vtkMarchingContourFilter::GetValue
double GetValue(int i)
Definition: vtkMarchingContourFilter.h:176
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
vtkMarchingContourFilter::StructuredPointsContour
void StructuredPointsContour(int dim, vtkDataSet *input, vtkPolyData *output)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkMarchingContourFilter::ContourValues
vtkContourValues * ContourValues
Definition: vtkMarchingContourFilter.h:146
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkMarchingContourFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkMarchingContourFilter::vtkMarchingContourFilter
vtkMarchingContourFilter()
vtkMarchingContourFilter::GetNumberOfContours
int GetNumberOfContours()
Definition: vtkMarchingContourFilter.h:213
vtkMarchingContourFilter::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
vtkMarchingContourFilter
generate isosurfaces/isolines from scalar values
Definition: vtkMarchingContourFilter.h:68
vtkMarchingContourFilter::GetMTime
unsigned long GetMTime()
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkgl::range
GLenum GLint * range
Definition: vtkgl.h:14180
vtkMarchingContourFilter::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPolyDataAlgorithm.h
vtkMarchingContourFilter::SetNumberOfContours
void SetNumberOfContours(int number)
Definition: vtkMarchingContourFilter.h:205
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkMarchingContourFilter::GetValues
double * GetValues()
Definition: vtkMarchingContourFilter.h:185
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkFiltersGeneralModule.h
vtkMarchingContourFilter::ComputeScalars
int ComputeScalars
Definition: vtkMarchingContourFilter.h:149
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkMarchingContourFilter::New
static vtkMarchingContourFilter * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMarchingContourFilter::DataSetContour
void DataSetContour(vtkDataSet *input, vtkPolyData *output)
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
vtkContourValues::GetValue
double GetValue(int i)
vtkMarchingContourFilter::ComputeGradients
int ComputeGradients
Definition: vtkMarchingContourFilter.h:148
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkContourValues::SetValue
void SetValue(int i, double value)
VTKFILTERSGENERAL_EXPORT
#define VTKFILTERSGENERAL_EXPORT
Definition: vtkFiltersGeneralModule.h:15
vtkMarchingContourFilter::CreateDefaultLocator
void CreateDefaultLocator()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkMarchingContourFilter::ScalarTree
vtkScalarTree * ScalarTree
Definition: vtkMarchingContourFilter.h:152
vtkContourValues.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkMarchingContourFilter::UseScalarTree
int UseScalarTree
Definition: vtkMarchingContourFilter.h:151
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkMarchingContourFilter::ComputeNormals
int ComputeNormals
Definition: vtkMarchingContourFilter.h:147
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkMarchingContourFilter::ImageContour
void ImageContour(int dim, vtkDataSet *input, vtkPolyData *output)
vtkMarchingContourFilter::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkMarchingContourFilter.h:150
vtkScalarTree
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:47
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
vtkMarchingContourFilter::~vtkMarchingContourFilter
~vtkMarchingContourFilter()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44