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 =========================================================================*/
58 #ifndef vtkPCANormalEstimation_h
59 #define vtkPCANormalEstimation_h
60 
61 #include "vtkFiltersPointsModule.h" // For export macro
62 #include "vtkPolyDataAlgorithm.h"
63 
65 class vtkIdList;
66 
67 class VTKFILTERSPOINTS_EXPORT vtkPCANormalEstimation : public vtkPolyDataAlgorithm
68 {
69 public:
71 
75  static vtkPCANormalEstimation* New();
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
87  vtkSetClampMacro(SampleSize, int, 1, VTK_INT_MAX);
88  vtkGetMacro(SampleSize, int);
90 
94  enum Style
95  {
96  AS_COMPUTED = 0,
97  POINT = 1,
98  GRAPH_TRAVERSAL = 3
99  };
100 
102 
114  vtkSetMacro(NormalOrientation, int);
115  vtkGetMacro(NormalOrientation, int);
116  void SetNormalOrientationToAsComputed() { this->SetNormalOrientation(AS_COMPUTED); }
117  void SetNormalOrientationToPoint() { this->SetNormalOrientation(POINT); }
118  void SetNormalOrientationToGraphTraversal() { this->SetNormalOrientation(GRAPH_TRAVERSAL); }
120 
122 
128  vtkSetVector3Macro(OrientationPoint, double);
129  vtkGetVectorMacro(OrientationPoint, double, 3);
131 
133 
136  vtkSetMacro(FlipNormals, bool);
137  vtkGetMacro(FlipNormals, bool);
138  vtkBooleanMacro(FlipNormals, bool);
140 
142 
147  void SetLocator(vtkAbstractPointLocator* locator);
148  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
150 
151 protected:
153  ~vtkPCANormalEstimation() override;
154 
155  // IVars
159  double OrientationPoint[3];
161 
162  // Methods used to produce consistent normal orientations
163  void TraverseAndFlip(
164  vtkPoints* inPts, float* normals, char* pointMap, vtkIdList* wave, vtkIdList* wave2);
165 
166  // Pipeline management
168  int FillInputPortInformation(int port, vtkInformation* info) override;
169 
170 private:
172  void operator=(const vtkPCANormalEstimation&) = delete;
173 };
174 
175 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:155
void SetNormalOrientationToPoint()
Configure how the filter addresses consistency in normal oreientation.
static vtkPolyDataAlgorithm * New()
void SetNormalOrientationToGraphTraversal()
Configure how the filter addresses consistency in normal oreientation.
Superclass for algorithms that produce only polydata as output.
generate point normals using local tangent planes
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:33
void SetNormalOrientationToAsComputed()
Configure how the filter addresses consistency in normal oreientation.
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.
Store zero or more vtkInformation instances.
vtkAbstractPointLocator * Locator
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.