VTK  9.1.0
vtkPCANormalEstimation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPCANormalEstimation.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=========================================================================*/
124#ifndef vtkPCANormalEstimation_h
125#define vtkPCANormalEstimation_h
126
127#include "vtkFiltersPointsModule.h" // For export macro
128#include "vtkPolyDataAlgorithm.h"
129
131class vtkIdList;
132
133class VTKFILTERSPOINTS_EXPORT vtkPCANormalEstimation : public vtkPolyDataAlgorithm
134{
135public:
137
143 void PrintSelf(ostream& os, vtkIndent indent) override;
145
147
153 vtkSetClampMacro(SampleSize, int, 1, VTK_INT_MAX);
154 vtkGetMacro(SampleSize, int);
156
160 enum Style
161 {
162 AS_COMPUTED = 0,
163 POINT = 1,
164 GRAPH_TRAVERSAL = 3
165 };
166
168
180 vtkSetMacro(NormalOrientation, int);
181 vtkGetMacro(NormalOrientation, int);
182 void SetNormalOrientationToAsComputed() { this->SetNormalOrientation(AS_COMPUTED); }
183 void SetNormalOrientationToPoint() { this->SetNormalOrientation(POINT); }
184 void SetNormalOrientationToGraphTraversal() { this->SetNormalOrientation(GRAPH_TRAVERSAL); }
186
188
194 vtkSetVector3Macro(OrientationPoint, double);
195 vtkGetVectorMacro(OrientationPoint, double, 3);
197
199
202 vtkSetMacro(FlipNormals, bool);
203 vtkGetMacro(FlipNormals, bool);
204 vtkBooleanMacro(FlipNormals, bool);
206
208
214 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
216
217protected:
220
221 // IVars
225 double OrientationPoint[3];
227
228 // Methods used to produce consistent normal orientations
230 vtkPoints* inPts, float* normals, char* pointMap, vtkIdList* wave, vtkIdList* wave2);
231
232 // Pipeline management
234 int FillInputPortInformation(int port, vtkInformation* info) override;
235
236private:
238 void operator=(const vtkPCANormalEstimation&) = delete;
239};
240
241#endif
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
generate point normals using local tangent planes
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
vtkAbstractPointLocator * Locator
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
~vtkPCANormalEstimation() override
void SetNormalOrientationToPoint()
Configure how the filter addresses consistency in normal oreientation.
void TraverseAndFlip(vtkPoints *inPts, float *normals, char *pointMap, vtkIdList *wave, vtkIdList *wave2)
void SetNormalOrientationToAsComputed()
Configure how the filter addresses consistency in normal oreientation.
static vtkPCANormalEstimation * New()
Standard methods for instantiating, obtaining type information, and printing information.
Style
This enum is used to control how normals oriented is controlled.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetNormalOrientationToGraphTraversal()
Configure how the filter addresses consistency in normal oreientation.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
represent and manipulate 3D points
Definition: vtkPoints.h:143
Superclass for algorithms that produce only polydata as output.
#define VTK_INT_MAX
Definition: vtkType.h:155