X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkAffineTransformGenericFilter.txx;h=93d43571b11d170825ad6f31e09b5646e653f086;hb=182d324aaea3d92e8b676d8a6e609ba8fab44726;hp=150c8c172187c9455af05d8a7861e05d34c46855;hpb=97a3a9ed3f33ab0316bd4613c8aae404de40dad1;p=clitk.git diff --git a/tools/clitkAffineTransformGenericFilter.txx b/tools/clitkAffineTransformGenericFilter.txx index 150c8c1..93d4357 100644 --- a/tools/clitkAffineTransformGenericFilter.txx +++ b/tools/clitkAffineTransformGenericFilter.txx @@ -139,7 +139,7 @@ namespace clitk { if (m_ArgsInfo.matrix_given) { - std::cerr << "You must use either rotate/translate or matrix options" << std::cout; + std::cerr << "You must use either rotate/translate or matrix options" << std::endl; return; } itk::Array transformParameters(2 * Dimension); @@ -182,9 +182,8 @@ namespace clitk } else { if (m_ArgsInfo.elastix_given) { - std::vector s; - for(uint i=0; i(s, m_Verbose); + std::string filename(m_ArgsInfo.elastix_arg); + matrix = createMatrixFromElastixFile(filename, m_Verbose); } else matrix.SetIdentity(); @@ -213,6 +212,7 @@ namespace clitk likeReader->SetFileName(m_ArgsInfo.like_arg); likeReader->Update(); resampler->SetOutputParametersFromImage(likeReader->GetOutput()); + resampler->SetOutputDirection(likeReader->GetOutput()->GetDirection()); } else if(m_ArgsInfo.transform_grid_flag) { typename itk::Matrix invMatrix( matrix.GetInverse() ); typename itk::Matrix invRotMatrix( clitk::GetRotationalPartMatrix(invMatrix) ); @@ -369,7 +369,7 @@ namespace clitk { if (m_ArgsInfo.matrix_given) { - std::cerr << "You must use either rotate/translate or matrix options" << std::cout; + std::cerr << "You must use either rotate/translate or matrix options" << std::endl; return; } itk::Array transformParameters(2 * Dimension);