VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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;
50 class vtkIncrementalPointLocator;
51 
52 class VTKFILTERSCORE_EXPORT vtkMarchingSquares : public vtkPolyDataAlgorithm
53 {
54 public:
55  static vtkMarchingSquares *New();
56  vtkTypeMacro(vtkMarchingSquares,vtkPolyDataAlgorithm);
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 
96  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
97  virtual int FillInputPortInformation(int port, vtkInformation *info);
98 
99  vtkContourValues *ContourValues;
100  int ImageRange[6];
101  vtkIncrementalPointLocator *Locator;
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
vtkIncrementalPointLocator * Locator
generate isoline(s) from structured points set
void GenerateValues(int numContours, double range[2])
void SetValue(int i, double value)
void SetNumberOfContours(int number)
vtkContourValues * ContourValues