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) VTK_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() VTK_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 *) VTK_OVERRIDE;
170  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
171 
172 private:
173  vtkPCANormalEstimation(const vtkPCANormalEstimation&) VTK_DELETE_FUNCTION;
174  void operator=(const vtkPCANormalEstimation&) VTK_DELETE_FUNCTION;
175 
176 };
177 
178 #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:157
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:33
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:30
void SetNormalOrientationToAsComputed()
Configure how the filter addresses consistency in normal oreientation.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkAbstractPointLocator * Locator
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.