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 =========================================================================*/
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 
68 class VTKFILTERSPOINTS_EXPORT vtkPCANormalEstimation : public vtkPolyDataAlgorithm
69 {
70 public:
72 
76  static vtkPCANormalEstimation *New();
78  void PrintSelf(ostream& os, vtkIndent indent);
80 
82 
88  vtkSetClampMacro(SampleSize,int,1,VTK_INT_MAX);
89  vtkGetMacro(SampleSize,int);
91 
95  enum Style
96  {
97  AS_COMPUTED=0,
98  POINT=1,
99  GRAPH_TRAVERSAL=3
100  };
101 
103 
115  vtkSetMacro(NormalOrientation,int);
116  vtkGetMacro(NormalOrientation,int);
118  { this->SetNormalOrientation(AS_COMPUTED); }
120  { this->SetNormalOrientation(POINT); }
122  { this->SetNormalOrientation(GRAPH_TRAVERSAL); }
124 
126 
132  vtkSetVector3Macro(OrientationPoint,double);
133  vtkGetVectorMacro(OrientationPoint,double,3);
135 
137 
140  vtkSetMacro(FlipNormals,bool);
141  vtkGetMacro(FlipNormals,bool);
142  vtkBooleanMacro(FlipNormals,bool);
144 
146 
151  void SetLocator(vtkAbstractPointLocator *locator);
152  vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
154 
155 protected:
158 
159  // IVars
163  double OrientationPoint[3];
165 
166  // Methods used to produce consistent normal orientations
167  void TraverseAndFlip (vtkPoints *inPts, float *normals, char *pointMap,
168  vtkIdList *wave, vtkIdList *wave2);
169 
170  // Pipeline management
174 
175 private:
176  vtkPCANormalEstimation(const vtkPCANormalEstimation&) VTK_DELETE_FUNCTION;
177  void operator=(const vtkPCANormalEstimation&) VTK_DELETE_FUNCTION;
178 
179 };
180 
181 #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:153
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:36
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:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.