VTK
vtkMarchingSquares.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMarchingSquares.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 =========================================================================*/
41 #ifndef vtkMarchingSquares_h
42 #define vtkMarchingSquares_h
43 
44 #include "vtkFiltersCoreModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 #include "vtkContourValues.h" // Passes calls to vtkContourValues
48 
49 class vtkImageData;
51 
53 {
54 public:
55  static vtkMarchingSquares *New();
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
64  vtkSetVectorMacro(ImageRange,int,6);
65  vtkGetVectorMacro(ImageRange,int,6);
66  void SetImageRange(int imin, int imax, int jmin, int jmax,
67  int kmin, int kmax);
69 
71 
72  void SetValue(int i, double value);
73  double GetValue(int i);
74  double *GetValues();
75  void GetValues(double *contourValues);
76  void SetNumberOfContours(int number);
77  int GetNumberOfContours();
78  void GenerateValues(int numContours, double range[2]);
79  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
81 
83  unsigned long int GetMTime();
84 
85  void SetLocator(vtkIncrementalPointLocator *locator);
86  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
87 
90  void CreateDefaultLocator();
91 
92 protected:
95 
98 
100  int ImageRange[6];
102 
103 private:
104  vtkMarchingSquares(const vtkMarchingSquares&); // Not implemented.
105  void operator=(const vtkMarchingSquares&); // Not implemented.
106 };
107 
109 
111 inline void vtkMarchingSquares::SetValue(int i, double value)
112 {this->ContourValues->SetValue(i,value);}
114 
116 
117 inline double vtkMarchingSquares::GetValue(int i)
118 {return this->ContourValues->GetValue(i);}
120 
122 
125 {return this->ContourValues->GetValues();}
127 
129 
132 inline void vtkMarchingSquares::GetValues(double *contourValues)
133 {this->ContourValues->GetValues(contourValues);}
135 
137 
141 {this->ContourValues->SetNumberOfContours(number);}
143 
145 
147 {return this->ContourValues->GetNumberOfContours();}
149 
151 
153 inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2])
154 {this->ContourValues->GenerateValues(numContours, range);}
156 
158 
160 inline void vtkMarchingSquares::GenerateValues(int numContours, double
161  rangeStart, double rangeEnd)
162 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
164 
165 #endif
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkIncrementalPointLocator * Locator
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.
generate isoline(s) from structured points set
void GenerateValues(int numContours, double range[2])
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
double * GetValues()
void SetValue(int i, double value)
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void SetNumberOfContours(int number)
vtkContourValues * ContourValues
Store zero or more vtkInformation instances.
int GetNumberOfContours()
void SetValue(int i, double value)