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 
100  void SetLocator(vtkIncrementalPointLocator *locator);
101  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
103 
106  void CreateDefaultLocator();
107 
108 protected:
110  ~vtkMarchingCubes();
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
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
void SetValue(int i, double value)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetNumberOfContours(const int number)
#define VTKFILTERSCORE_EXPORT
Abstract class in support of both point location and point insertion.
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
double * GetValues()
vtkIncrementalPointLocator * Locator
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
generate isosurface(s) from volume
void SetNumberOfContours(int number)
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
Store zero or more vtkInformation instances.
int GetNumberOfContours()
void SetValue(int i, double value)
vtkContourValues * ContourValues