VTK  9.0.1
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 =========================================================================*/
66 #ifndef vtkUnsignedDistance_h
67 #define vtkUnsignedDistance_h
68 
69 #include "vtkFiltersPointsModule.h" // For export macro
70 #include "vtkImageAlgorithm.h"
71 
72 class vtkPolyData;
74 
75 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
76 {
77 public:
79 
83  static vtkUnsignedDistance* New();
85  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
89 
92  vtkGetVectorMacro(Dimensions, int, 3);
93  void SetDimensions(int i, int j, int k);
94  void SetDimensions(const int dim[3]);
96 
98 
102  vtkSetVector6Macro(Bounds, double);
103  vtkGetVectorMacro(Bounds, double, 6);
105 
107 
113  vtkSetMacro(AdjustBounds, vtkTypeBool);
114  vtkGetMacro(AdjustBounds, vtkTypeBool);
115  vtkBooleanMacro(AdjustBounds, vtkTypeBool);
117 
119 
124  vtkSetClampMacro(AdjustDistance, double, -1.0, 1.0);
125  vtkGetMacro(AdjustDistance, double);
127 
129 
133  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
134  vtkGetMacro(Radius, double);
136 
138 
143  void SetLocator(vtkAbstractPointLocator* locator);
144  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
146 
148 
153  vtkSetMacro(Capping, vtkTypeBool);
154  vtkGetMacro(Capping, vtkTypeBool);
155  vtkBooleanMacro(Capping, vtkTypeBool);
157 
159 
164  vtkSetMacro(CapValue, double);
165  vtkGetMacro(CapValue, double);
167 
169 
173  vtkSetMacro(OutputScalarType, int);
174  vtkGetMacro(OutputScalarType, int);
175  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
176  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
178 
185  void StartAppend();
186 
194  void Append(vtkPolyData* input);
195 
199  void EndAppend();
200 
201  // See the vtkAlgorithm for a description of what these do
204 
205 protected:
207  ~vtkUnsignedDistance() override;
208 
209  int Dimensions[3];
210  double Bounds[6];
213  double Radius;
216  double CapValue;
218 
219  // Flag tracks whether process needs initialization
221 
224  int FillInputPortInformation(int, vtkInformation*) override;
225 
226 private:
227  vtkUnsignedDistance(const vtkUnsignedDistance&) = delete;
228  void operator=(const vtkUnsignedDistance&) = delete;
229 };
230 
231 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkUnsignedDistance::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkUnsignedDistance.h:176
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkUnsignedDistance::OutputScalarType
int OutputScalarType
Definition: vtkUnsignedDistance.h:217
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:52
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:53
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
vtkUnsignedDistance::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkUnsignedDistance.h:175
vtkUnsignedDistance::Initialized
int Initialized
Definition: vtkUnsignedDistance.h:220
vtkUnsignedDistance::Radius
double Radius
Definition: vtkUnsignedDistance.h:213
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkUnsignedDistance::AdjustBounds
vtkTypeBool AdjustBounds
Definition: vtkUnsignedDistance.h:211
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkUnsignedDistance::AdjustDistance
double AdjustDistance
Definition: vtkUnsignedDistance.h:212
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:38
vtkImageAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkUnsignedDistance::CapValue
double CapValue
Definition: vtkUnsignedDistance.h:216
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkUnsignedDistance::Capping
vtkTypeBool Capping
Definition: vtkUnsignedDistance.h:215
vtkUnsignedDistance
compute unsigned (i.e., non-negative) distances from an input point cloud
Definition: vtkUnsignedDistance.h:75
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkUnsignedDistance::Locator
vtkAbstractPointLocator * Locator
Definition: vtkUnsignedDistance.h:214