VTK  9.0.1
vtkSignedDistance.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSignedDistance.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 vtkSignedDistance_h
70 #define vtkSignedDistance_h
71 
72 #include "vtkFiltersPointsModule.h" // For export macro
73 #include "vtkImageAlgorithm.h"
74 
75 class vtkPolyData;
77 
78 class VTKFILTERSPOINTS_EXPORT vtkSignedDistance : public vtkImageAlgorithm
79 {
80 public:
82 
86  static vtkSignedDistance* New();
88  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
92 
95  vtkGetVectorMacro(Dimensions, int, 3);
96  void SetDimensions(int i, int j, int k);
97  void SetDimensions(const int dim[3]);
99 
101 
105  vtkSetVector6Macro(Bounds, double);
106  vtkGetVectorMacro(Bounds, double, 6);
108 
110 
116  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
117  vtkGetMacro(Radius, double);
119 
121 
126  void SetLocator(vtkAbstractPointLocator* locator);
127  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
129 
136  void StartAppend();
137 
145  void Append(vtkPolyData* input);
146 
150  void EndAppend();
151 
152  // See the vtkAlgorithm for a description of what these do
155 
156 protected:
158  ~vtkSignedDistance() override;
159 
160  int Dimensions[3];
161  double Bounds[6];
162  double Radius;
164 
165  // Flag tracks whether process needs initialization
167 
170  int FillInputPortInformation(int, vtkInformation*) override;
171 
172 private:
173  vtkSignedDistance(const vtkSignedDistance&) = delete;
174  void operator=(const vtkSignedDistance&) = delete;
175 };
176 
177 #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.
vtkSignedDistance
compute signed distances from an input point cloud
Definition: vtkSignedDistance.h:78
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
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_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
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()
vtkSignedDistance::Initialized
int Initialized
Definition: vtkSignedDistance.h:166
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
vtkSignedDistance::Locator
vtkAbstractPointLocator * Locator
Definition: vtkSignedDistance.h:163
vtkImageAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkSignedDistance::Radius
double Radius
Definition: vtkSignedDistance.h:162
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69