VTK  9.3.20240329
vtkUnsignedDistance.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
76 #ifndef vtkUnsignedDistance_h
77 #define vtkUnsignedDistance_h
78 
79 #include "vtkFiltersPointsModule.h" // For export macro
80 #include "vtkImageAlgorithm.h"
81 
82 VTK_ABI_NAMESPACE_BEGIN
83 class vtkPolyData;
85 
86 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
87 {
88 public:
90 
96  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
100 
103  vtkGetVectorMacro(Dimensions, int, 3);
104  void SetDimensions(int i, int j, int k);
105  void SetDimensions(const int dim[3]);
107 
109 
113  vtkSetVector6Macro(Bounds, double);
114  vtkGetVectorMacro(Bounds, double, 6);
116 
118 
124  vtkSetMacro(AdjustBounds, vtkTypeBool);
125  vtkGetMacro(AdjustBounds, vtkTypeBool);
126  vtkBooleanMacro(AdjustBounds, vtkTypeBool);
128 
130 
135  vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
136  vtkGetMacro(AdjustDistance, double);
138 
140 
144  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
145  vtkGetMacro(Radius, double);
147 
149 
155  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
157 
159 
164  vtkSetMacro(Capping, vtkTypeBool);
165  vtkGetMacro(Capping, vtkTypeBool);
166  vtkBooleanMacro(Capping, vtkTypeBool);
168 
170 
175  vtkSetMacro(CapValue, double);
176  vtkGetMacro(CapValue, double);
178 
180 
184  vtkSetMacro(OutputScalarType, int);
185  vtkGetMacro(OutputScalarType, int);
186  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
187  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
189 
196  void StartAppend();
197 
205  void Append(vtkPolyData* input);
206 
210  void EndAppend();
211 
212  // See the vtkAlgorithm for a description of what these do
215 
216 protected:
219 
220  int Dimensions[3];
221  double Bounds[6];
224  double Radius;
227  double CapValue;
229 
230  // Flag tracks whether process needs initialization
232 
236 
237 private:
238  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
239  void operator=(const vtkUnsignedDistance&) = delete;
240 };
241 
242 VTK_ABI_NAMESPACE_END
243 #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:181
compute unsigned (i.e., non-negative) distances from an input point cloud
~vtkUnsignedDistance() override
void StartAppend()
Initialize the filter for appending data.
static vtkUnsignedDistance * New()
Standard methods for instantiating the class, providing type information, and printing.
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkAbstractPointLocator * Locator
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating the class, providing type information, and printing.
void Append(vtkPolyData *input)
Append a data set to the existing output.
void EndAppend()
Method completes the append process.
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.
int FillInputPortInformation(int, vtkInformation *) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetDimensions(int i, int j, int k)
Set/Get the i-j-k dimensions on which to computer the distance function.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_DOUBLE
Definition: vtkType.h:43
#define VTK_FLOAT
Definition: vtkType.h:42
#define VTK_FLOAT_MAX
Definition: vtkType.h:152