VTK  9.1.0
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 =========================================================================*/
85 #ifndef vtkUnsignedDistance_h
86 #define vtkUnsignedDistance_h
87 
88 #include "vtkFiltersPointsModule.h" // For export macro
89 #include "vtkImageAlgorithm.h"
90 
91 class vtkPolyData;
93 
94 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
95 {
96 public:
98 
104  void PrintSelf(ostream& os, vtkIndent indent) override;
106 
108 
111  vtkGetVectorMacro(Dimensions, int, 3);
112  void SetDimensions(int i, int j, int k);
113  void SetDimensions(const int dim[3]);
115 
117 
121  vtkSetVector6Macro(Bounds, double);
122  vtkGetVectorMacro(Bounds, double, 6);
124 
126 
132  vtkSetMacro(AdjustBounds, vtkTypeBool);
133  vtkGetMacro(AdjustBounds, vtkTypeBool);
134  vtkBooleanMacro(AdjustBounds, vtkTypeBool);
136 
138 
143  vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
144  vtkGetMacro(AdjustDistance, double);
146 
148 
152  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
153  vtkGetMacro(Radius, double);
155 
157 
163  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
165 
167 
172  vtkSetMacro(Capping, vtkTypeBool);
173  vtkGetMacro(Capping, vtkTypeBool);
174  vtkBooleanMacro(Capping, vtkTypeBool);
176 
178 
183  vtkSetMacro(CapValue, double);
184  vtkGetMacro(CapValue, double);
186 
188 
192  vtkSetMacro(OutputScalarType, int);
193  vtkGetMacro(OutputScalarType, int);
194  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
195  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
197 
204  void StartAppend();
205 
213  void Append(vtkPolyData* input);
214 
218  void EndAppend();
219 
220  // See the vtkAlgorithm for a description of what these do
223 
224 protected:
227 
228  int Dimensions[3];
229  double Bounds[6];
232  double Radius;
235  double CapValue;
237 
238  // Flag tracks whether process needs initialization
240 
244 
245 private:
246  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
247  void operator=(const vtkUnsignedDistance&) = delete;
248 };
249 
250 #endif
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkUnsignedDistance::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkUnsignedDistance::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
Definition: vtkUnsignedDistance.h:195
vtkUnsignedDistance::EndAppend
void EndAppend()
Method completes the append process.
vtkImageAlgorithm.h
vtkUnsignedDistance::SetDimensions
void SetDimensions(int i, int j, int k)
Set/Get the i-j-k dimensions on which to computer the distance function.
vtkUnsignedDistance::Append
void Append(vtkPolyData *input)
Append a data set to the existing output.
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:57
vtkUnsignedDistance::OutputScalarType
int OutputScalarType
Definition: vtkUnsignedDistance.h:236
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:54
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:55
vtkUnsignedDistance::~vtkUnsignedDistance
~vtkUnsignedDistance() override
vtkUnsignedDistance::New
static vtkUnsignedDistance * New()
Standard methods for instantiating the class, providing type information, and printing.
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
vtkUnsignedDistance::StartAppend
void StartAppend()
Initialize the filter for appending data.
vtkUnsignedDistance::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
Definition: vtkUnsignedDistance.h:194
vtkUnsignedDistance::Initialized
int Initialized
Definition: vtkUnsignedDistance.h:239
vtkUnsignedDistance::Radius
double Radius
Definition: vtkUnsignedDistance.h:232
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkUnsignedDistance::AdjustBounds
vtkTypeBool AdjustBounds
Definition: vtkUnsignedDistance.h:230
vtkUnsignedDistance::AdjustDistance
double AdjustDistance
Definition: vtkUnsignedDistance.h:231
vtkUnsignedDistance::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating the class, providing type information, and printing.
vtkUnsignedDistance::SetDimensions
void SetDimensions(const int dim[3])
Set/Get the i-j-k dimensions on which to computer the distance function.
vtkUnsignedDistance::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkUnsignedDistance::vtkUnsignedDistance
vtkUnsignedDistance()
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:39
vtkUnsignedDistance::CapValue
double CapValue
Definition: vtkUnsignedDistance.h:235
vtkUnsignedDistance::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkUnsignedDistance::SetLocator
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
vtkUnsignedDistance::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkUnsignedDistance::Capping
vtkTypeBool Capping
Definition: vtkUnsignedDistance.h:234
vtkUnsignedDistance
compute unsigned (i.e., non-negative) distances from an input point cloud
Definition: vtkUnsignedDistance.h:95
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkUnsignedDistance::Locator
vtkAbstractPointLocator * Locator
Definition: vtkUnsignedDistance.h:233