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 =========================================================================*/
42 #ifndef vtkMarchingSquares_h
43 #define vtkMarchingSquares_h
44 
45 #include "vtkFiltersCoreModule.h" // For export macro
46 #include "vtkPolyDataAlgorithm.h"
47 
48 #include "vtkContourValues.h" // Passes calls to vtkContourValues
49 
50 class vtkImageData;
52 
53 class VTKFILTERSCORE_EXPORT vtkMarchingSquares : public vtkPolyDataAlgorithm
54 {
55 public:
56  static vtkMarchingSquares *New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
67  vtkSetVectorMacro(ImageRange,int,6);
68  vtkGetVectorMacro(ImageRange,int,6);
69  void SetImageRange(int imin, int imax, int jmin, int jmax,
70  int kmin, int kmax);
72 
74 
77  void SetValue(int i, double value);
78  double GetValue(int i);
79  double *GetValues();
80  void GetValues(double *contourValues);
81  void SetNumberOfContours(int number);
82  int GetNumberOfContours();
83  void GenerateValues(int numContours, double range[2]);
84  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
86 
90  vtkMTimeType GetMTime() override;
91 
92  void SetLocator(vtkIncrementalPointLocator *locator);
93  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
94 
99  void CreateDefaultLocator();
100 
101 protected:
103  ~vtkMarchingSquares() override;
104 
106  int FillInputPortInformation(int port, vtkInformation *info) override;
107 
109  int ImageRange[6];
111 
112 private:
113  vtkMarchingSquares(const vtkMarchingSquares&) = delete;
114  void operator=(const vtkMarchingSquares&) = delete;
115 };
116 
121 inline void vtkMarchingSquares::SetValue(int i, double value)
122 {this->ContourValues->SetValue(i,value);}
123 
127 inline double vtkMarchingSquares::GetValue(int i)
128 {return this->ContourValues->GetValue(i);}
129 
135 {return this->ContourValues->GetValues();}
136 
142 inline void vtkMarchingSquares::GetValues(double *contourValues)
143 {this->ContourValues->GetValues(contourValues);}
144 
151 {this->ContourValues->SetNumberOfContours(number);}
152 
157 {return this->ContourValues->GetNumberOfContours();}
158 
163 inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2])
164 {this->ContourValues->GenerateValues(numContours, range);}
165 
170 inline void vtkMarchingSquares::GenerateValues(int numContours, double
171  rangeStart, double rangeEnd)
172 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
173 
174 #endif
vtkMarchingSquares::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkMarchingSquares.h:127
vtkMarchingSquares::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkMarchingSquares.h:150
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkMarchingSquares::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkMarchingSquares.h:163
vtkX3D::value
Definition: vtkX3D.h:220
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkX3D::range
Definition: vtkX3D.h:238
vtkMarchingSquares::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkMarchingSquares.h:134
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkMarchingSquares
generate isoline(s) from structured points set
Definition: vtkMarchingSquares.h:53
vtkX3D::port
Definition: vtkX3D.h:447
vtkMarchingSquares::ContourValues
vtkContourValues * ContourValues
Definition: vtkMarchingSquares.h:108
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkMarchingSquares::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkMarchingSquares.h:110
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkContourValues::GetValue
double GetValue(int i)
Get the ith contour value.
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourValues.h
vtkMarchingSquares::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkMarchingSquares.h:156
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkMarchingSquares::SetValue
void SetValue(int i, double value)
Methods to set contour values.
Definition: vtkMarchingSquares.h:121
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44