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=========================================================================*/
78#ifndef vtkUnsignedDistance_h
79#define vtkUnsignedDistance_h
80
81#include "vtkFiltersPointsModule.h" // For export macro
82#include "vtkImageAlgorithm.h"
83
84class vtkPolyData;
86
87class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
88{
89public:
91
97 void PrintSelf(ostream& os, vtkIndent indent) override;
99
101
104 vtkGetVectorMacro(Dimensions, int, 3);
105 void SetDimensions(int i, int j, int k);
106 void SetDimensions(const int dim[3]);
108
110
114 vtkSetVector6Macro(Bounds, double);
115 vtkGetVectorMacro(Bounds, double, 6);
117
119
125 vtkSetMacro(AdjustBounds, vtkTypeBool);
126 vtkGetMacro(AdjustBounds, vtkTypeBool);
127 vtkBooleanMacro(AdjustBounds, vtkTypeBool);
129
131
136 vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
137 vtkGetMacro(AdjustDistance, double);
139
141
145 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
146 vtkGetMacro(Radius, double);
148
150
156 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
158
160
165 vtkSetMacro(Capping, vtkTypeBool);
166 vtkGetMacro(Capping, vtkTypeBool);
167 vtkBooleanMacro(Capping, vtkTypeBool);
169
171
176 vtkSetMacro(CapValue, double);
177 vtkGetMacro(CapValue, double);
179
181
185 vtkSetMacro(OutputScalarType, int);
186 vtkGetMacro(OutputScalarType, int);
187 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
188 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
190
198
206 void Append(vtkPolyData* input);
207
211 void EndAppend();
212
213 // See the vtkAlgorithm for a description of what these do
216
217protected:
220
221 int Dimensions[3];
222 double Bounds[6];
225 double Radius;
228 double CapValue;
230
231 // Flag tracks whether process needs initialization
233
237
238private:
240 void operator=(const vtkUnsignedDistance&) = delete;
241};
242
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:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
compute unsigned (i.e., non-negative) distances from an input point cloud
static vtkUnsignedDistance * New()
Standard methods for instantiating the class, providing type information, and printing.
~vtkUnsignedDistance() override
void StartAppend()
Initialize the filter for appending data.
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