VTK  9.2.6
vtkUnsignedDistance.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnsignedDistance.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See LICENSE file 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 =========================================================================*/
88 #ifndef vtkUnsignedDistance_h
89 #define vtkUnsignedDistance_h
90 
91 #include "vtkFiltersPointsModule.h" // For export macro
92 #include "vtkImageAlgorithm.h"
93 
94 class vtkPolyData;
96 
97 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
98 {
99 public:
101 
107  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
111 
114  vtkGetVectorMacro(Dimensions, int, 3);
115  void SetDimensions(int i, int j, int k);
116  void SetDimensions(const int dim[3]);
118 
120 
124  vtkSetVector6Macro(Bounds, double);
125  vtkGetVectorMacro(Bounds, double, 6);
127 
129 
135  vtkSetMacro(AdjustBounds, vtkTypeBool);
136  vtkGetMacro(AdjustBounds, vtkTypeBool);
137  vtkBooleanMacro(AdjustBounds, vtkTypeBool);
139 
141 
146  vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
147  vtkGetMacro(AdjustDistance, double);
149 
151 
155  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
156  vtkGetMacro(Radius, double);
158 
160 
166  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
168 
170 
175  vtkSetMacro(Capping, vtkTypeBool);
176  vtkGetMacro(Capping, vtkTypeBool);
177  vtkBooleanMacro(Capping, vtkTypeBool);
179 
181 
186  vtkSetMacro(CapValue, double);
187  vtkGetMacro(CapValue, double);
189 
191 
195  vtkSetMacro(OutputScalarType, int);
196  vtkGetMacro(OutputScalarType, int);
197  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
198  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
200 
207  void StartAppend();
208 
216  void Append(vtkPolyData* input);
217 
221  void EndAppend();
222 
223  // See the vtkAlgorithm for a description of what these do
226 
227 protected:
230 
231  int Dimensions[3];
232  double Bounds[6];
235  double Radius;
238  double CapValue;
240 
241  // Flag tracks whether process needs initialization
243 
247 
248 private:
249  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
250  void operator=(const vtkUnsignedDistance&) = delete;
251 };
252 
253 #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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
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:69
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54
#define VTK_FLOAT_MAX
Definition: vtkType.h:163