VTK  9.2.6
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=========================================================================*/
67#ifndef vtkPCANormalEstimation_h
68#define vtkPCANormalEstimation_h
69
70#include "vtkFiltersPointsModule.h" // For export macro
72
74class vtkIdList;
75
76class VTKFILTERSPOINTS_EXPORT vtkPCANormalEstimation : public vtkPolyDataAlgorithm
77{
78public:
80
86 void PrintSelf(ostream& os, vtkIndent indent) override;
88
90
96 vtkSetClampMacro(SampleSize, int, 1, VTK_INT_MAX);
97 vtkGetMacro(SampleSize, int);
99
103 enum Style
104 {
105 AS_COMPUTED = 0,
106 POINT = 1,
107 GRAPH_TRAVERSAL = 3
108 };
109
111
123 vtkSetMacro(NormalOrientation, int);
124 vtkGetMacro(NormalOrientation, int);
125 void SetNormalOrientationToAsComputed() { this->SetNormalOrientation(AS_COMPUTED); }
126 void SetNormalOrientationToPoint() { this->SetNormalOrientation(POINT); }
127 void SetNormalOrientationToGraphTraversal() { this->SetNormalOrientation(GRAPH_TRAVERSAL); }
129
131
137 vtkSetVector3Macro(OrientationPoint, double);
138 vtkGetVectorMacro(OrientationPoint, double, 3);
140
142
145 vtkSetMacro(FlipNormals, bool);
146 vtkGetMacro(FlipNormals, bool);
147 vtkBooleanMacro(FlipNormals, bool);
149
151
157 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
159
160protected:
163
164 // IVars
168 double OrientationPoint[3];
170
171 // Methods used to produce consistent normal orientations
173 vtkPoints* inPts, float* normals, char* pointMap, vtkIdList* wave, vtkIdList* wave2);
174
175 // Pipeline management
177 int FillInputPortInformation(int port, vtkInformation* info) override;
178
179private:
181 void operator=(const vtkPCANormalEstimation&) = delete;
182};
183
184#endif
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition vtkIdList.h:43
a simple class to control print indentation
Definition vtkIndent.h:49
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:49
Superclass for algorithms that produce only polydata as output.
#define VTK_INT_MAX
Definition vtkType.h:155