]> Creatis software - clitk.git/commitdiff
Add GetForwardAffineMatrix wrapper
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 18 Apr 2012 14:26:40 +0000 (16:26 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 18 Apr 2012 14:26:40 +0000 (16:26 +0200)
common/clitkTransformUtilities.cxx
common/clitkTransformUtilities.h

index 1228197755910be7479558efe37762f0cc24af84..ef210d70ae3318c5dbb778557787d9d86b51677e 100644 (file)
 namespace clitk
 {
 
+//--------------------------------------------------------------------
+template < >
+itk::Matrix<double, 3, 3>
+GetForwardAffineMatrix<2>(itk::Array<double> transformParameters)
+{
+  return GetForwardAffineMatrix2D(transformParameters);
+}
+
+//--------------------------------------------------------------------
+template < >
+itk::Matrix<double, 4, 4>
+GetForwardAffineMatrix<3>(itk::Array<double> transformParameters)
+{
+  return GetForwardAffineMatrix3D(transformParameters);
+}
+
 //--------------------------------------------------------------------
 template < >
 itk::Matrix<double, 3, 3>
@@ -37,12 +53,14 @@ GetBackwardAffineMatrix<3>(itk::Array<double> transformParameters)
   return GetBackwardAffineMatrix3D(transformParameters);
 }
 
+//--------------------------------------------------------------------
 template <>
 itk::Matrix<double, 2, 2> GetRotationMatrix<2>(itk::Array<double> rotationParameters)
 {
   return GetRotationMatrix2D(rotationParameters);
 }
 
+//--------------------------------------------------------------------
 template <>
 itk::Matrix<double, 3, 3> GetRotationMatrix<3>(itk::Array<double> rotationParameters)
 {
index b9a540a672a23602a33a8b919ed208eba4156823..3bdf22026ee0ab969a5fe8f6274db3a0fd4fa2e3 100644 (file)
@@ -32,6 +32,7 @@ namespace clitk
   //============================================================================
   itk::Matrix<double, 3, 3> GetForwardAffineMatrix2D(itk::Array<double> transformParameters);
   itk::Matrix<double, 4, 4> GetForwardAffineMatrix3D(itk::Array<double> transformParameters);
+  template <unsigned int Dimension > itk::Matrix<double, Dimension+1, Dimension+1> GetForwardAffineMatrix(itk::Array<double> transformParameters);
 
   itk::Matrix<double, 3, 3> GetBackwardAffineMatrix2D(itk::Array<double> transformParameters);
   itk::Matrix<double, 4, 4> GetBackwardAffineMatrix3D(itk::Array<double> transformParameters);