NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkPointRegMaths.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 niftkPointRegMaths_h
16 #define niftkPointRegMaths_h
17 
18 #include "niftkPointRegExports.h"
19 #include <cv.h>
20 #include <mitkPointSet.h>
21 #include <vtkMatrix4x4.h>
22 
27 namespace niftk {
28 
35 extern "C++" NIFTKPOINTREG_EXPORT
36 cv::Matx33d CalculateCrossCovarianceH(
37  const std::vector<cv::Point3d>& q,
38  const std::vector<cv::Point3d>& qPrime);
39 
40 
45 extern "C++" NIFTKPOINTREG_EXPORT
47  const std::vector<cv::Point3d>& fixedPoints,
48  const std::vector<cv::Point3d>& movingPoints,
49  cv::Matx33d& H,
50  cv::Point3d &p,
51  cv::Point3d& pPrime,
52  cv::Matx44d& outputMatrix);
53 
54 
59 extern "C++" NIFTKPOINTREG_EXPORT
61  const std::vector<cv::Point3d>& fixedPoints,
62  const std::vector<cv::Point3d>& movingPoints,
63  const cv::Matx44d& matrix);
64 
65 
70 extern "C++" NIFTKPOINTREG_EXPORT
72  const mitk::PointSet::Pointer& fixedPointSet,
73  const mitk::PointSet::Pointer& movingPointSet,
74  vtkMatrix4x4& vtkMatrix);
75 
76 } // end namespace
77 
78 #endif
double DoSVDPointBasedRegistration(const std::vector< cv::Point3d > &fixedPoints, const std::vector< cv::Point3d > &movingPoints, cv::Matx33d &H, cv::Point3d &p, cv::Point3d &pPrime, cv::Matx44d &outputMatrix)
Does the main SVD bit of the point based registration, and handles the degenerate conditions mentione...
Definition: niftkPointRegMaths.cxx:45
GLdouble GLdouble GLdouble GLdouble q
Definition: glew.h:1398
GLfloat GLfloat p
Definition: glew.h:14169
GLuint GLenum matrix
Definition: glew.h:12775
double CalculateFiducialRegistrationError(const std::vector< cv::Point3d > &fixedPoints, const std::vector< cv::Point3d > &movingPoints, const cv::Matx44d &matrix)
Calculates Fiducial Registration Error by multiplying the movingPoints by the matrix, and comparing with fixedPoints.
Definition: niftkPointRegMaths.cxx:128
cv::Matx33d CalculateCrossCovarianceH(const std::vector< cv::Point3d > &q, const std::vector< cv::Point3d > &qPrime)
Calculates 1/N Sum (q_i * qPrime_i^t) where q_i and qPrime_i are column vectors, so the product is a ...
Definition: niftkPointRegMaths.cxx:23
Definition: niftkExceptionObject.h:21