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 =========================================================================*/
69 #ifndef vtkUnsignedDistance_h
70 #define vtkUnsignedDistance_h
71 
72 #include "vtkFiltersPointsModule.h" // For export macro
73 #include "vtkImageAlgorithm.h"
74 
75 class vtkPolyData;
77 
78 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
79 {
80 public:
82 
86  static vtkUnsignedDistance* New();
88  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
92 
95  vtkGetVectorMacro(Dimensions, int, 3);
96  void SetDimensions(int i, int j, int k);
97  void SetDimensions(const int dim[3]);
99 
101 
105  vtkSetVector6Macro(Bounds, double);
106  vtkGetVectorMacro(Bounds, double, 6);
108 
110 
116  vtkSetMacro(AdjustBounds, vtkTypeBool);
117  vtkGetMacro(AdjustBounds, vtkTypeBool);
118  vtkBooleanMacro(AdjustBounds, vtkTypeBool);
120 
122 
127  vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
128  vtkGetMacro(AdjustDistance, double);
130 
132 
136  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
137  vtkGetMacro(Radius, double);
139 
141 
146  void SetLocator(vtkAbstractPointLocator* locator);
147  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
149 
151 
156  vtkSetMacro(Capping, vtkTypeBool);
157  vtkGetMacro(Capping, vtkTypeBool);
158  vtkBooleanMacro(Capping, vtkTypeBool);
160 
162 
167  vtkSetMacro(CapValue, double);
168  vtkGetMacro(CapValue, double);
170 
172 
176  vtkSetMacro(OutputScalarType, int);
177  vtkGetMacro(OutputScalarType, int);
178  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
179  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
181 
188  void StartAppend();
189 
197  void Append(vtkPolyData* input);
198 
202  void EndAppend();
203 
204  // See the vtkAlgorithm for a description of what these do
207 
208 protected:
210  ~vtkUnsignedDistance() override;
211 
212  int Dimensions[3];
213  double Bounds[6];
216  double Radius;
219  double CapValue;
221 
222  // Flag tracks whether process needs initialization
224 
227  int FillInputPortInformation(int, vtkInformation*) override;
228 
229 private:
230  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
231  void operator=(const vtkUnsignedDistance&) = delete;
232 };
233 
234 #endif
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
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
a simple class to control print indentation
Definition: vtkIndent.h:39
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...
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
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.
compute unsigned (i.e., non-negative) distances from an input point cloud
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