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 "vtkPolyDataAlgorithm.h"
45 
46 #include "vtkContourValues.h" // Passes calls to vtkContourValues
47 
48 class vtkImageData;
50 
52 {
53 public:
54  static vtkMarchingSquares *New();
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
63  vtkSetVectorMacro(ImageRange,int,6);
64  vtkGetVectorMacro(ImageRange,int,6);
65  void SetImageRange(int imin, int imax, int jmin, int jmax,
66  int kmin, int kmax);
68 
70 
71  void SetValue(int i, double value);
72  double GetValue(int i);
73  double *GetValues();
74  void GetValues(double *contourValues);
75  void SetNumberOfContours(int number);
76  int GetNumberOfContours();
77  void GenerateValues(int numContours, double range[2]);
78  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
80 
82  unsigned long int GetMTime();
83 
84  void SetLocator(vtkIncrementalPointLocator *locator);
85  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
86 
89  void CreateDefaultLocator();
90 
91 protected:
94 
97 
99  int ImageRange[6];
101 
102 private:
103  vtkMarchingSquares(const vtkMarchingSquares&); // Not implemented.
104  void operator=(const vtkMarchingSquares&); // Not implemented.
105 };
106 
108 
110 inline void vtkMarchingSquares::SetValue(int i, double value)
111 {this->ContourValues->SetValue(i,value);}
113 
115 
116 inline double vtkMarchingSquares::GetValue(int i)
117 {return this->ContourValues->GetValue(i);}
119 
121 
124 {return this->ContourValues->GetValues();}
126 
128 
131 inline void vtkMarchingSquares::GetValues(double *contourValues)
132 {this->ContourValues->GetValues(contourValues);}
134 
136 
140 {this->ContourValues->SetNumberOfContours(number);}
142 
144 
146 {return this->ContourValues->GetNumberOfContours();}
148 
150 
152 inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2])
153 {this->ContourValues->GenerateValues(numContours, range);}
155 
157 
159 inline void vtkMarchingSquares::GenerateValues(int numContours, double
160  rangeStart, double rangeEnd)
161 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
163 
164 #endif
helper object to manage setting and generating contour values
#define VTK_GRAPHICS_EXPORT
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)
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:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
void SetNumberOfContours(int number)
vtkContourValues * ContourValues
Store zero or more vtkInformation instances.
int GetNumberOfContours()
void SetValue(int i, double value)