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)
+{
+ return GetRotationMatrix3D(rotationParameters);
+}
+
}
template <unsigned int Dimension > itk::Matrix<double, Dimension+1, Dimension+1> GetBackwardAffineMatrix(itk::Array<double> transformParameters);
itk::Matrix<double, 3, 3> GetRotationMatrix3D(itk::Array<double> rotationParameters);
+ itk::Matrix<double, 2, 2> GetRotationMatrix2D(itk::Array<double> rotationParameters);
+ template <unsigned int Dimension> itk::Matrix<double, Dimension, Dimension> GetRotationMatrix(itk::Array<double> rotationParameters);
itk::Point<double, 3> GetRotatedPoint3D(itk::Array<double> rotationParameters, itk::Point<double, 3> input);
itk::Matrix<double, 4, 4> GetCenteredRotationMatrix3D(itk::Array<double> rotationParameters,itk::Point<double,3> centerOfRotation);
// itk::Matrix<double, 4, 4> GetComposedMatrix3D(itk::Matrix<double, 4, 4> firstTransform, itk::Matrix<double, 4, 4> secondTransform);
matrix[2][2]= cos(rotationParameters[0])*cos(rotationParameters[1]);
return matrix;
}
-
-
-
+
+ inline itk::Matrix<double, 2, 2> GetRotationMatrix2D(itk::Array<double> rotationParameters)
+ {
+ itk::Matrix<double, 2, 2> matrix;
+ matrix[0][0] = cos(rotationParameters[0]);
+ matrix[1][0] = sin(rotationParameters[0]);
+ matrix[0][1] = -matrix[1][0];
+ matrix[1][1] = matrix[0][0];
+ return matrix;
+ }
+
//========================================================================================
inline itk::Point<double, 3> GetRotatedPoint3D(itk::Array<double> rotationParameters, itk::Point<double, 3> input)
{