VTK
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 
79 class VTKFILTERSPOINTS_EXPORT vtkSignedDistance : public vtkImageAlgorithm
80 {
81 public:
83 
87  static vtkSignedDistance *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(int dim[3]);
100 
102 
106  vtkSetVector6Macro(Bounds,double);
107  vtkGetVectorMacro(Bounds,double,6);
109 
111 
117  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
118  vtkGetMacro(Radius,double);
120 
122 
127  void SetLocator(vtkAbstractPointLocator *locator);
128  vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
130 
137  void StartAppend();
138 
146  void Append(vtkPolyData *input);
147 
151  void EndAppend();
152 
153  // See the vtkAlgorithm for a description of what these do
156  vtkInformationVector*) override;
157 
158 protected:
160  ~vtkSignedDistance() override;
161 
162  int Dimensions[3];
163  double Bounds[6];
164  double Radius;
166 
167  // Flag tracks whether process needs initialization
169 
172  vtkInformationVector *) override;
175  int FillInputPortInformation(int, vtkInformation*) override;
176 
177 private:
178  vtkSignedDistance(const vtkSignedDistance&) = delete;
179  void operator=(const vtkSignedDistance&) = delete;
180 
181 };
182 
183 #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:79
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
vtkImageAlgorithm::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:167
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
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:168
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:38
vtkSignedDistance::Locator
vtkAbstractPointLocator * Locator
Definition: vtkSignedDistance.h:165
vtkSignedDistance::Radius
double Radius
Definition: vtkSignedDistance.h:164
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.