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
60 #ifndef vtkSignedDistance_h
61 #define vtkSignedDistance_h
62 
63 #include "vtkFiltersPointsModule.h" // For export macro
64 #include "vtkImageAlgorithm.h"
65 
66 VTK_ABI_NAMESPACE_BEGIN
67 class vtkPolyData;
69 
70 class VTKFILTERSPOINTS_EXPORT vtkSignedDistance : public vtkImageAlgorithm
71 {
72 public:
74 
78  static vtkSignedDistance* New();
80  void PrintSelf(ostream& os, vtkIndent indent) override;
82 
84 
87  vtkGetVectorMacro(Dimensions, int, 3);
88  void SetDimensions(int i, int j, int k);
89  void SetDimensions(const int dim[3]);
91 
93 
97  vtkSetVector6Macro(Bounds, double);
98  vtkGetVectorMacro(Bounds, double, 6);
100 
102 
108  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
109  vtkGetMacro(Radius, double);
111 
113 
118  void SetLocator(vtkAbstractPointLocator* locator);
119  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
121 
128  void StartAppend();
129 
137  void Append(vtkPolyData* input);
138 
142  void EndAppend();
143 
144  // See the vtkAlgorithm for a description of what these do
147 
148 protected:
150  ~vtkSignedDistance() override;
151 
152  int Dimensions[3];
153  double Bounds[6];
154  double Radius;
156 
157  // Flag tracks whether process needs initialization
159 
162  int FillInputPortInformation(int, vtkInformation*) override;
163 
164 private:
165  vtkSignedDistance(const vtkSignedDistance&) = delete;
166  void operator=(const vtkSignedDistance&) = delete;
167 };
168 
169 VTK_ABI_NAMESPACE_END
170 #endif
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
compute signed distances from an input point cloud
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FLOAT_MAX
Definition: vtkType.h:152
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract class to quickly locate points in 3-space
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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