VTK
vtkMarchingCubes.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMarchingCubes.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 =========================================================================*/
38 #ifndef vtkMarchingCubes_h
39 #define vtkMarchingCubes_h
40 
41 #include "vtkFiltersCoreModule.h" // For export macro
42 #include "vtkPolyDataAlgorithm.h"
43 
44 #include "vtkContourValues.h" // Needed for direct access to ContourValues
45 
47 
49 {
50 public:
51  static vtkMarchingCubes *New();
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
55  // Methods to set contour values
56  void SetValue(int i, double value);
57  double GetValue(int i);
58  double *GetValues();
59  void GetValues(double *contourValues);
60  void SetNumberOfContours(int number);
61  int GetNumberOfContours();
62  void GenerateValues(int numContours, double range[2]);
63  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
64 
65  // Because we delegate to vtkContourValues
66  unsigned long int GetMTime();
67 
69 
73  vtkSetMacro(ComputeNormals,int);
74  vtkGetMacro(ComputeNormals,int);
75  vtkBooleanMacro(ComputeNormals,int);
77 
79 
85  vtkSetMacro(ComputeGradients,int);
86  vtkGetMacro(ComputeGradients,int);
87  vtkBooleanMacro(ComputeGradients,int);
89 
91 
92  vtkSetMacro(ComputeScalars,int);
93  vtkGetMacro(ComputeScalars,int);
94  vtkBooleanMacro(ComputeScalars,int);
96 
98 
103 
107 
108 protected:
111 
114 
120 private:
121  vtkMarchingCubes(const vtkMarchingCubes&); // Not implemented.
122  void operator=(const vtkMarchingCubes&); // Not implemented.
123 };
124 
126 
128 inline void vtkMarchingCubes::SetValue(int i, double value)
129 {this->ContourValues->SetValue(i,value);}
131 
133 
134 inline double vtkMarchingCubes::GetValue(int i)
135 {return this->ContourValues->GetValue(i);}
137 
139 
142 {return this->ContourValues->GetValues();}
144 
146 
149 inline void vtkMarchingCubes::GetValues(double *contourValues)
150 {this->ContourValues->GetValues(contourValues);}
152 
154 
158 {this->ContourValues->SetNumberOfContours(number);}
160 
162 
164 {return this->ContourValues->GetNumberOfContours();}
166 
168 
170 inline void vtkMarchingCubes::GenerateValues(int numContours, double range[2])
171 {this->ContourValues->GenerateValues(numContours, range);}
173 
175 
177 inline void vtkMarchingCubes::GenerateValues(int numContours, double
178  rangeStart, double rangeEnd)
179 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
181 
182 #endif
vtkMarchingCubes
generate isosurface(s) from volume
Definition: vtkMarchingCubes.h:49
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkContourValues::GetValues
double * GetValues()
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
vtkMarchingCubes::~vtkMarchingCubes
~vtkMarchingCubes()
vtkMarchingCubes::GetValue
double GetValue(int i)
Definition: vtkMarchingCubes.h:134
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkMarchingCubes::GetNumberOfContours
int GetNumberOfContours()
Definition: vtkMarchingCubes.h:163
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkMarchingCubes::New
static vtkMarchingCubes * New()
vtkMarchingCubes::ContourValues
vtkContourValues * ContourValues
Definition: vtkMarchingCubes.h:115
vtkMarchingCubes::SetNumberOfContours
void SetNumberOfContours(int number)
Definition: vtkMarchingCubes.h:157
vtkMarchingCubes::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkMarchingCubes.h:119
vtkMarchingCubes::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::range
GLenum GLint * range
Definition: vtkgl.h:14180
vtkMarchingCubes::SetValue
void SetValue(int i, double value)
Definition: vtkMarchingCubes.h:128
vtkMarchingCubes::GenerateValues
void GenerateValues(int numContours, double range[2])
Definition: vtkMarchingCubes.h:170
vtkMarchingCubes::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkFiltersCoreModule.h
vtkPolyDataAlgorithm.h
vtkMarchingCubes::GetMTime
unsigned long int GetMTime()
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkMarchingCubes::CreateDefaultLocator
void CreateDefaultLocator()
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
VTKFILTERSCORE_EXPORT
#define VTKFILTERSCORE_EXPORT
Definition: vtkFiltersCoreModule.h:15
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
vtkContourValues::GetValue
double GetValue(int i)
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkContourValues::SetValue
void SetValue(int i, double value)
vtkMarchingCubes::ComputeScalars
int ComputeScalars
Definition: vtkMarchingCubes.h:118
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkMarchingCubes::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkMarchingCubes::vtkMarchingCubes
vtkMarchingCubes()
vtkContourValues.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkMarchingCubes::GetValues
double * GetValues()
Definition: vtkMarchingCubes.h:141
vtkMarchingCubes::ComputeGradients
int ComputeGradients
Definition: vtkMarchingCubes.h:117
vtkMarchingCubes::ComputeNormals
int ComputeNormals
Definition: vtkMarchingCubes.h:116
vtkMarchingCubes::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44