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 
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 
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
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
generate point normals using local tangent planes
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
vtkAbstractPointLocator * Locator
void TraverseAndFlip(vtkPoints *inPts, float *normals, char *pointMap, vtkIdList *wave, vtkIdList *wave2)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
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.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_INT_MAX
Definition: vtkType.h:153