option "transX" x "1-3: Initial translation in mm along the X axis" float no default="0.0"
option "transY" y "1-3: Initial translation in mm along the Y axis" float no default="0.0"
option "transZ" z "1-3: Initial translation in mm along the Z axis" float no default="0.0"
-option "initMatrix" - "2-3: Initial matrix (reference to object space) filename " string no
-option "moment" - "2-3: Initialize translation by aligning the center of gravities for the respective intensities" flag off
+option "initMatrix" - "1-3: Initial matrix (reference to object space) filename " string no
+option "moment" - "1-3: Initialize translation by aligning the center of gravities for the respective intensities" flag off
section "Metric (optimized, threaded versions are available for *, compile ITK with REVIEW and OPT_REGISTRATION enabled)"
matrix[3][3] = 1.0;
}
} else {
-// matrix = clitk::GetBackwardAffineMatrix3D(finalParameters);
+ matrix = clitk::GetBackwardAffineMatrix<Dimension>(finalParameters);
}
std::cout << " Affine transform matrix =" << std::endl;
-/*=========================================================================
+ /*=========================================================================
Program: vv http://www.creatis.insa-lyon.fr/rio/vv
Authors belong to:
itk::MatrixOffsetTransformBase<double, 2, 2>::Pointer
clitk::GenericAffineTransform<args_info_clitkAffineRegistration, double, 2>::GetNewEulerTransform()
{
- itk::Euler2DTransform< double >::Pointer p = itk::Euler2DTransform< double >::New();
+ typedef itk::Euler2DTransform< double > Transform2DType;
+ Transform2DType::Pointer t2 = Transform2DType::New();
itk::MatrixOffsetTransformBase<double, 2, 2>::Pointer pp;
- pp = p;
+ pp = t2;
return pp;
}
itk::MatrixOffsetTransformBase<double, 3, 3>::Pointer
clitk::GenericAffineTransform<args_info_clitkAffineRegistration, double, 3>::GetNewEulerTransform()
{
- itk::Euler3DTransform< double >::Pointer p = itk::Euler3DTransform< double >::New();
+ typedef itk::Euler3DTransform < double > Transform3DType;
+ Transform3DType::Pointer t3 = Transform3DType::New();
+ t3->SetComputeZYX(true); //SR: required?
itk::MatrixOffsetTransformBase<double, 3, 3>::Pointer pp;
- pp = p;
+ pp = t3;
return pp;
}
}
option "transX" x "1-3: Initial translation in mm along the X axis" float no default="0.0"
option "transY" y "1-3: Initial translation in mm along the Y axis" float no default="0.0"
option "transZ" z "1-3: Initial translation in mm along the Z axis" float no default="0.0"
-option "initMatrix" - "2-3: Initial matrix (reference to object space) filename " string no
-option "moment" - "2-3: Initialize translation by aligning the center of gravities for the respective intensities" flag off
+option "initMatrix" - "1-3: Initial matrix (reference to object space) filename " string no
+option "moment" - "1-3: Initialize translation by aligning the center of gravities for the respective intensities" flag off
The use will look something like
tMatrix->SetCenter(center);
//Initialize transform
+ tMatrix->SetOffset(offset);
if(m_ArgsInfo.initMatrix_given) {
itk::Matrix<double, Dimension+1 , Dimension+1> matHom = ReadMatrix<Dimension>(m_ArgsInfo.initMatrix_arg);
typename MatrixXType::MatrixType matrix = GetRotationalPartMatrix(matHom);
- tMatrix->SetOffset(offset);
tMatrix->SetMatrix(matrix);
}
m_Transform=tMatrix;