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 =========================================================================*/
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 
76 class VTKFILTERSPOINTS_EXPORT vtkUnsignedDistance : public vtkImageAlgorithm
77 {
78 public:
80 
84  static vtkUnsignedDistance *New();
86  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
88 
90 
93  vtkGetVectorMacro(Dimensions,int,3);
94  void SetDimensions(int i, int j, int k);
95  void SetDimensions(int dim[3]);
97 
99 
103  vtkSetVector6Macro(Bounds,double);
104  vtkGetVectorMacro(Bounds,double,6);
106 
108 
114  vtkSetMacro(AdjustBounds,int);
115  vtkGetMacro(AdjustBounds,int);
116  vtkBooleanMacro(AdjustBounds,int);
118 
120 
125  vtkSetClampMacro(AdjustDistance,double,-1.0,1.0);
126  vtkGetMacro(AdjustDistance,double);
128 
130 
134  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
135  vtkGetMacro(Radius,double);
137 
139 
144  void SetLocator(vtkAbstractPointLocator *locator);
145  vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
147 
149 
154  vtkSetMacro(Capping,int);
155  vtkGetMacro(Capping,int);
156  vtkBooleanMacro(Capping,int);
158 
160 
165  vtkSetMacro(CapValue,double);
166  vtkGetMacro(CapValue,double);
168 
170 
174  vtkSetMacro(OutputScalarType,int);
175  vtkGetMacro(OutputScalarType,int);
176  void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
177  void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
179 
186  void StartAppend();
187 
195  void Append(vtkPolyData *input);
196 
200  void EndAppend();
201 
202  // See the vtkAlgorithm for a desciption of what these do
205  vtkInformationVector*) VTK_OVERRIDE;
206 
207 protected:
210 
211  int Dimensions[3];
212  double Bounds[6];
215  double Radius;
217  int Capping;
218  double CapValue;
220 
221  // Flag tracks whether process needs initialization
223 
224  virtual int RequestInformation (vtkInformation *,
226  vtkInformationVector *) VTK_OVERRIDE;
227  virtual int RequestData (vtkInformation *,
228  vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
229  virtual int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
230 
231 private:
232  vtkUnsignedDistance(const vtkUnsignedDistance&) VTK_DELETE_FUNCTION;
233  void operator=(const vtkUnsignedDistance&) VTK_DELETE_FUNCTION;
234 
235 };
236 
237 #endif
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_FLOAT_MAX
Definition: vtkType.h:165
a simple class to control print indentation
Definition: vtkIndent.h:33
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...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkAbstractPointLocator * Locator