VTK
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 =========================================================================*/
55 #ifndef vtkPCANormalEstimation_h
56 #define vtkPCANormalEstimation_h
57 
58 #include "vtkFiltersPointsModule.h" // For export macro
59 #include "vtkPolyDataAlgorithm.h"
60 
62 class vtkIdList;
63 
64 
65 class VTKFILTERSPOINTS_EXPORT vtkPCANormalEstimation : public vtkPolyDataAlgorithm
66 {
67 public:
69 
73  static vtkPCANormalEstimation *New();
75  void PrintSelf(ostream& os, vtkIndent indent) override;
77 
79 
85  vtkSetClampMacro(SampleSize,int,1,VTK_INT_MAX);
86  vtkGetMacro(SampleSize,int);
88 
92  enum Style
93  {
94  AS_COMPUTED=0,
95  POINT=1,
96  GRAPH_TRAVERSAL=3
97  };
98 
100 
112  vtkSetMacro(NormalOrientation,int);
113  vtkGetMacro(NormalOrientation,int);
115  { this->SetNormalOrientation(AS_COMPUTED); }
117  { this->SetNormalOrientation(POINT); }
119  { this->SetNormalOrientation(GRAPH_TRAVERSAL); }
121 
123 
129  vtkSetVector3Macro(OrientationPoint,double);
130  vtkGetVectorMacro(OrientationPoint,double,3);
132 
134 
137  vtkSetMacro(FlipNormals,bool);
138  vtkGetMacro(FlipNormals,bool);
139  vtkBooleanMacro(FlipNormals,bool);
141 
143 
148  void SetLocator(vtkAbstractPointLocator *locator);
149  vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
151 
152 protected:
154  ~vtkPCANormalEstimation() override;
155 
156  // IVars
160  double OrientationPoint[3];
162 
163  // Methods used to produce consistent normal orientations
164  void TraverseAndFlip (vtkPoints *inPts, float *normals, char *pointMap,
165  vtkIdList *wave, vtkIdList *wave2);
166 
167  // Pipeline management
169  vtkInformationVector *) override;
170  int FillInputPortInformation(int port, vtkInformation *info) override;
171 
172 private:
174  void operator=(const vtkPCANormalEstimation&) = delete;
175 
176 };
177 
178 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPCANormalEstimation::SetNormalOrientationToPoint
void SetNormalOrientationToPoint()
Definition: vtkPCANormalEstimation.h:116
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPCANormalEstimation::FlipNormals
bool FlipNormals
Definition: vtkPCANormalEstimation.h:161
vtkPolyDataAlgorithm.h
vtkPCANormalEstimation::SetNormalOrientationToGraphTraversal
void SetNormalOrientationToGraphTraversal()
Definition: vtkPCANormalEstimation.h:118
vtkPCANormalEstimation::SampleSize
int SampleSize
Definition: vtkPCANormalEstimation.h:157
vtkX3D::port
Definition: vtkX3D.h:447
vtkPCANormalEstimation::NormalOrientation
int NormalOrientation
Definition: vtkPCANormalEstimation.h:159
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkPCANormalEstimation
generate point normals using local tangent planes
Definition: vtkPCANormalEstimation.h:65
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkPCANormalEstimation::SetNormalOrientationToAsComputed
void SetNormalOrientationToAsComputed()
Definition: vtkPCANormalEstimation.h:114
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:38
vtkPCANormalEstimation::Style
Style
This enum is used to control how normals oriented is controlled.
Definition: vtkPCANormalEstimation.h:92
vtkPCANormalEstimation::Locator
vtkAbstractPointLocator * Locator
Definition: vtkPCANormalEstimation.h:158
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41