VTK  9.2.6
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=========================================================================*/
38
39#ifndef vtkMarchingSquares_h
40#define vtkMarchingSquares_h
41
42#include "vtkFiltersCoreModule.h" // For export macro
44
45#include "vtkContourValues.h" // Passes calls to vtkContourValues
46
47class vtkImageData;
49
50class VTKFILTERSCORE_EXPORT vtkMarchingSquares : public vtkPolyDataAlgorithm
51{
52public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
64 vtkSetVectorMacro(ImageRange, int, 6);
65 vtkGetVectorMacro(ImageRange, int, 6);
66 void SetImageRange(int imin, int imax, int jmin, int jmax, int kmin, int kmax);
68
70
73 void SetValue(int i, double value);
74 double GetValue(int i);
75 double* GetValues();
76 void GetValues(double* contourValues);
77 void SetNumberOfContours(int number);
79 void GenerateValues(int numContours, double range[2]);
80 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
82
87
90
96
97protected:
100
102 int FillInputPortInformation(int port, vtkInformation* info) override;
103
107
108private:
109 vtkMarchingSquares(const vtkMarchingSquares&) = delete;
110 void operator=(const vtkMarchingSquares&) = delete;
111};
112
117inline void vtkMarchingSquares::SetValue(int i, double value)
118{
119 this->ContourValues->SetValue(i, value);
120}
121
126{
127 return this->ContourValues->GetValue(i);
128}
129
135{
136 return this->ContourValues->GetValues();
137}
138
144inline void vtkMarchingSquares::GetValues(double* contourValues)
145{
146 this->ContourValues->GetValues(contourValues);
147}
148
155{
156 this->ContourValues->SetNumberOfContours(number);
157}
158
163{
164 return this->ContourValues->GetNumberOfContours();
165}
166
171inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2])
172{
173 this->ContourValues->GenerateValues(numContours, range);
174}
175
180inline void vtkMarchingSquares::GenerateValues(int numContours, double rangeStart, double rangeEnd)
181{
182 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
183}
184
185#endif
helper object to manage setting and generating contour values
topologically and geometrically regular array of data
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetImageRange(int imin, int imax, int jmin, int jmax, int kmin, int kmax)
Set/Get the i-j-k index range which define a plane on which to generate contour lines.
vtkIncrementalPointLocator * Locator
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetLocator(vtkIncrementalPointLocator *locator)
double GetValue(int i)
Get the ith contour value.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
double * GetValues()
Get a pointer to an array of contour values.
vtkMTimeType GetMTime() override
Because we delegate to vtkContourValues.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetValue(int i, double value)
Methods to set contour values.
static vtkMarchingSquares * New()
vtkContourValues * ContourValues
void CreateDefaultLocator()
Create default locator.
~vtkMarchingSquares() override
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287