NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
mitkPivotCalibration.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 mitkPivotCalibration_h
16 #define mitkPivotCalibration_h
17 
18 #include "niftkOpenCVExports.h"
19 #include <string>
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
22 #include <mitkCommon.h>
23 #include <mitkVector.h>
24 #include <cv.h>
25 #include <vtkMatrix4x4.h>
26 
27 namespace mitk {
28 
37 class NIFTKOPENCV_EXPORT PivotCalibration : public itk::Object
38 {
39 
40 public:
41 
42  mitkClassMacroItkParent(PivotCalibration, itk::Object)
43  itkNewMacro(PivotCalibration)
44 
45  itkSetMacro(SingularValueThreshold, double);
46  itkGetMacro(SingularValueThreshold, double);
47 
62  void CalibrateUsingFilesInDirectories(
63  const std::string& matrixDirectory,
64  double &residualError,
65  vtkMatrix4x4& outputMatrix,
66  const int& percentage = 100,
67  const int& reruns = 100
68  );
69 
79  void Calibrate(
80  const std::vector< cv::Mat >& matrices,
81  cv::Matx44d& outputMatrix,
82  double& residualError,
83  const int& percentage = 100,
84  const int& reruns = 100
85  );
86 
87 protected:
88 
90  virtual ~PivotCalibration();
91 
92  PivotCalibration(const PivotCalibration&); // Purposefully not implemented.
93  PivotCalibration& operator=(const PivotCalibration&); // Purposefully not implemented.
94 
95 private:
96 
97  void DoCalibration(
98  const std::vector< cv::Mat >& matrices,
99  cv::Matx44d& outputMatrix,
100  double& residualError
101  );
102 
103  double m_SingularValueThreshold;
104 
105 }; // end class
106 
107 } // end namespace
108 
109 #endif
Definition: ReceptorMemberCommandTest.cxx:25
Does a pivot calibration from a vector of 4x4 matrices, such as might be used to calibrate an image g...
Definition: mitkPivotCalibration.h:37
#define NIFTKOPENCV_EXPORT
Definition: niftkSequentialCpuQds.h:27
GLsizei const GLcharARB ** string
Definition: glew.h:5194