From 04c6115880edf1a2f5511debafe7667cf9d0531c Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Wed, 18 Apr 2012 16:26:40 +0200 Subject: [PATCH] Add GetForwardAffineMatrix wrapper --- common/clitkTransformUtilities.cxx | 18 ++++++++++++++++++ common/clitkTransformUtilities.h | 1 + 2 files changed, 19 insertions(+) diff --git a/common/clitkTransformUtilities.cxx b/common/clitkTransformUtilities.cxx index 1228197..ef210d7 100644 --- a/common/clitkTransformUtilities.cxx +++ b/common/clitkTransformUtilities.cxx @@ -21,6 +21,22 @@ namespace clitk { +//-------------------------------------------------------------------- +template < > +itk::Matrix +GetForwardAffineMatrix<2>(itk::Array transformParameters) +{ + return GetForwardAffineMatrix2D(transformParameters); +} + +//-------------------------------------------------------------------- +template < > +itk::Matrix +GetForwardAffineMatrix<3>(itk::Array transformParameters) +{ + return GetForwardAffineMatrix3D(transformParameters); +} + //-------------------------------------------------------------------- template < > itk::Matrix @@ -37,12 +53,14 @@ GetBackwardAffineMatrix<3>(itk::Array transformParameters) return GetBackwardAffineMatrix3D(transformParameters); } +//-------------------------------------------------------------------- template <> itk::Matrix GetRotationMatrix<2>(itk::Array rotationParameters) { return GetRotationMatrix2D(rotationParameters); } +//-------------------------------------------------------------------- template <> itk::Matrix GetRotationMatrix<3>(itk::Array rotationParameters) { diff --git a/common/clitkTransformUtilities.h b/common/clitkTransformUtilities.h index b9a540a..3bdf220 100644 --- a/common/clitkTransformUtilities.h +++ b/common/clitkTransformUtilities.h @@ -32,6 +32,7 @@ namespace clitk //============================================================================ itk::Matrix GetForwardAffineMatrix2D(itk::Array transformParameters); itk::Matrix GetForwardAffineMatrix3D(itk::Array transformParameters); + template itk::Matrix GetForwardAffineMatrix(itk::Array transformParameters); itk::Matrix GetBackwardAffineMatrix2D(itk::Array transformParameters); itk::Matrix GetBackwardAffineMatrix3D(itk::Array transformParameters); -- 2.47.1