VTK  9.3.20240328
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
109 #ifndef vtkSignedDistance_h
110 #define vtkSignedDistance_h
111 
112 #include "vtkFiltersPointsModule.h" // For export macro
113 #include "vtkImageAlgorithm.h"
114 
115 VTK_ABI_NAMESPACE_BEGIN
116 class vtkPolyData;
118 
119 class VTKFILTERSPOINTS_EXPORT vtkSignedDistance : public vtkImageAlgorithm
120 {
121 public:
123 
129  void PrintSelf(ostream& os, vtkIndent indent) override;
131 
133 
136  vtkGetVectorMacro(Dimensions, int, 3);
137  void SetDimensions(int i, int j, int k);
138  void SetDimensions(const int dim[3]);
140 
142 
146  vtkSetVector6Macro(Bounds, double);
147  vtkGetVectorMacro(Bounds, double, 6);
149 
151 
157  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
158  vtkGetMacro(Radius, double);
160 
162 
168  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
170 
177  void StartAppend();
178 
186  void Append(vtkPolyData* input);
187 
191  void EndAppend();
192 
193  // See the vtkAlgorithm for a description of what these do
196 
197 protected:
199  ~vtkSignedDistance() override;
200 
201  int Dimensions[3];
202  double Bounds[6];
203  double Radius;
205 
206  // Flag tracks whether process needs initialization
208 
212 
213 private:
214  vtkSignedDistance(const vtkSignedDistance&) = delete;
215  void operator=(const vtkSignedDistance&) = delete;
216 };
217 
218 VTK_ABI_NAMESPACE_END
219 #endif
abstract class to quickly locate points in 3-space
Generic algorithm superclass for image algs.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
compute signed distances from an input point cloud
void Append(vtkPolyData *input)
Append a data set to the existing output.
int FillInputPortInformation(int, vtkInformation *) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
void SetDimensions(const int dim[3])
Set/Get the i-j-k dimensions on which to computer the distance function.
void StartAppend()
Initialize the filter for appending data.
vtkAbstractPointLocator * Locator
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
static vtkSignedDistance * New()
Standard methods for instantiating the class, providing type information, and printing.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating the class, providing type information, and printing.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
~vtkSignedDistance() override
void SetDimensions(int i, int j, int k)
Set/Get the i-j-k dimensions on which to computer the distance function.
void EndAppend()
Method completes the append process.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FLOAT_MAX
Definition: vtkType.h:152