NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkFitPlaneToPointCloudWrapper.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkPlaneToPointCloudWrapper_h
16 #define niftkPlaneToPointCloudWrapper_h
17 
18 #include "niftkPCLExports.h"
19 #include <string>
20 #include <ostream>
21 #include <mitkCommon.h>
22 #include <mitkPointSet.h>
23 #include <itkObject.h>
24 #include <itkObjectFactory.h>
25 #include <itkObjectFactoryBase.h>
26 
27 // forward declaration to avoid pulling in truckloads of pcl headers.
28 namespace pcl
29 {
30 struct ModelCoefficients;
31 }
32 
33 namespace niftk
34 {
35 
36 // i dont think this should be called ...Wrapper. suggestions for a better name?
37 class NIFTKPCL_EXPORT FitPlaneToPointCloudWrapper : public itk::Object
38 {
39 public:
40  mitkClassMacroItkParent(FitPlaneToPointCloudWrapper, itk::Object)
41  itkNewMacro(FitPlaneToPointCloudWrapper)
42 
43 
44 protected:
48  virtual ~FitPlaneToPointCloudWrapper();
49 
54 
55 
56 public:
63  void FitPlane(const std::string& filename);
64 
69  void FitPlane(const mitk::PointSet::Pointer& pointset);
70  void PrintOutput(std::ostream& log) const;
71 
75  void GetParameters(float& a, float& b, float& c, float& d) const;
76 
77 
78 private:
79  pcl::ModelCoefficients* m_PlaneCoefficients;
80  float m_MinPlaneDistance;
81  float m_MaxPlaneDistance;
82  float m_AvgPlaneDistance;
83  float m_RmsPlaneDistance;
84 };
85 
86 } // end namespace
87 
88 #endif
Definition: niftkFitPlaneToPointCloudWrapper.h:28
const GLfloat * c
Definition: glew.h:14144
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8272
Definition: niftkFitPlaneToPointCloudWrapper.h:37
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194