VTK: Filters/Points/vtkSignedDistance.h Source File

| VTK 9.3.1

vtkSignedDistance.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-CLAUSE
69 #ifndef vtkSignedDistance_h
70 #define vtkSignedDistance_h
71
72 #include "vtkFiltersPointsModule.h" // For export macro
73 #include "vtkImageAlgorithm.h"
74
75 VTK_ABI_NAMESPACE_BEGIN
76 class vtkPolyData;
77 class vtkAbstractPointLocator;
78
79 class VTKFILTERSPOINTS_EXPORT vtkSignedDistance : public vtkImageAlgorithm
80 {
81 public:
83
87 static vtkSignedDistance* New();
88 vtkTypeMacro(vtkSignedDistance, vtkImageAlgorithm);
89 void PrintSelf(ostream& os, vtkIndent indent) override;
91
93
96 vtkGetVectorMacro(Dimensions, int, 3);
97 void SetDimensions(int i, int j, int k);
98 void SetDimensions(const int dim[3]);
100
102
106 vtkSetVector6Macro(Bounds, double);
107 vtkGetVectorMacro(Bounds, double, 6);
109
111
117 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
118 vtkGetMacro(Radius, double);
120
122
127 void SetLocator(vtkAbstractPointLocator* locator);
128 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
130
137 void StartAppend();
138
146 void Append(vtkPolyData* input);
147
151 void EndAppend();
152
153 // See the vtkAlgorithm for a description of what these do
154 vtkTypeBool ProcessRequest(
155 vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
156
157 protected:
158 vtkSignedDistance();
159 ~vtkSignedDistance() override;
160
161 int Dimensions[3];
162 double Bounds[6];
163 double Radius;
164 vtkAbstractPointLocator* Locator;
165
166 // Flag tracks whether process needs initialization
167 int Initialized;
168
169 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
170 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
171 int FillInputPortInformation(int, vtkInformation*) override;
172
173 private:
174 vtkSignedDistance(const vtkSignedDistance&) = delete;
175 void operator=(const vtkSignedDistance&) = delete;
176 };
177
178 VTK_ABI_NAMESPACE_END
179 #endif
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:31
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkSignedDistance
compute signed distances from an input point cloud
Definition: vtkSignedDistance.h:80
vtkSignedDistance::Radius
double Radius
Definition: vtkSignedDistance.h:163
vtkSignedDistance::Append
void Append(vtkPolyData *input)
Append a data set to the existing output.
vtkSignedDistance::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkSignedDistance::SetLocator
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
vtkSignedDistance::SetDimensions
void SetDimensions(const int dim[3])
Set/Get the i-j-k dimensions on which to computer the distance function.
vtkSignedDistance::StartAppend
void StartAppend()
Initialize the filter for appending data.
vtkSignedDistance::Locator
vtkAbstractPointLocator * Locator
Definition: vtkSignedDistance.h:164
vtkSignedDistance::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkSignedDistance::Initialized
int Initialized
Definition: vtkSignedDistance.h:167
vtkSignedDistance::New
static vtkSignedDistance * New()
Standard methods for instantiating the class, providing type information, and printing.
vtkSignedDistance::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkSignedDistance::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating the class, providing type information, and printing.
vtkSignedDistance::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkSignedDistance::~vtkSignedDistance
~vtkSignedDistance() override
vtkSignedDistance::SetDimensions
void SetDimensions(int i, int j, int k)
Set/Get the i-j-k dimensions on which to computer the distance function.
vtkSignedDistance::vtkSignedDistance
vtkSignedDistance()
vtkSignedDistance::EndAppend
void EndAppend()
Method completes the append process.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkImageAlgorithm.h
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:152