VTK
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 
79 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
80 {
81 public:
83 
87  static vtkUnsignedDistance *New();
89  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
93 
96  vtkGetVectorMacro(Dimensions,int,3);
97  void SetDimensions(int i, int j, int k);
98  void SetDimensions(const int dim[3]);
100 
102 
106  vtkSetVector6Macro(Bounds,double);
107  vtkGetVectorMacro(Bounds,double,6);
109 
111 
117  vtkSetMacro(AdjustBounds,vtkTypeBool);
118  vtkGetMacro(AdjustBounds,vtkTypeBool);
119  vtkBooleanMacro(AdjustBounds,vtkTypeBool);
121 
123 
128  vtkSetClampMacro(AdjustDistance,double,-1.0,1.0);
129  vtkGetMacro(AdjustDistance,double);
131 
133 
137  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
138  vtkGetMacro(Radius,double);
140 
142 
147  void SetLocator(vtkAbstractPointLocator *locator);
148  vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
150 
152 
157  vtkSetMacro(Capping,vtkTypeBool);
158  vtkGetMacro(Capping,vtkTypeBool);
159  vtkBooleanMacro(Capping,vtkTypeBool);
161 
163 
168  vtkSetMacro(CapValue,double);
169  vtkGetMacro(CapValue,double);
171 
173 
177  vtkSetMacro(OutputScalarType,int);
178  vtkGetMacro(OutputScalarType,int);
179  void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
180  void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
182 
189  void StartAppend();
190 
198  void Append(vtkPolyData *input);
199 
203  void EndAppend();
204 
205  // See the vtkAlgorithm for a description of what these do
208  vtkInformationVector*) override;
209 
210 protected:
212  ~vtkUnsignedDistance() override;
213 
214  int Dimensions[3];
215  double Bounds[6];
218  double Radius;
221  double CapValue;
223 
224  // Flag tracks whether process needs initialization
226 
229  vtkInformationVector *) override;
232  int FillInputPortInformation(int, vtkInformation*) override;
233 
234 private:
235  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
236  void operator=(const vtkUnsignedDistance&) = delete;
237 
238 };
239 
240 #endif
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_FLOAT_MAX
Definition: vtkType.h:167
a simple class to control print indentation
Definition: vtkIndent.h:39
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
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.
vtkAbstractPointLocator * Locator