X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkAffineTransformGenericFilter.txx;h=03cf862e2ee261548d6707761648821823b9e1fb;hb=14d6a55438749d14c04f32539b5bc76c6e0b97c8;hp=68532a66ffa950e0eb4d7537e09df67e0cd21ffb;hpb=db358353c7af7e999daac01b0dce3ed72be10a65;p=clitk.git diff --git a/tools/clitkAffineTransformGenericFilter.txx b/tools/clitkAffineTransformGenericFilter.txx index 68532a6..03cf862 100644 --- a/tools/clitkAffineTransformGenericFilter.txx +++ b/tools/clitkAffineTransformGenericFilter.txx @@ -183,7 +183,7 @@ namespace clitk if (m_ArgsInfo.elastix_given) { std::vector s; for(uint i=0; i(s); + matrix = createMatrixFromElastixFile(s, m_Verbose); } else matrix.SetIdentity(); @@ -497,7 +497,7 @@ namespace clitk template template typename itk::Matrix - AffineTransformGenericFilter::createMatrixFromElastixFile(std::vector & filename) + AffineTransformGenericFilter::createMatrixFromElastixFile(std::vector & filename, bool verbose) { if (Dimension != 3) { FATAL("Only 3D yet" << std::endl); @@ -509,7 +509,7 @@ namespace clitk for(uint j=0; jSetParameters(p); - if (m_Verbose) { + if (verbose) { std::cout << "Rotation (deg) : " << rad2deg(p[0]) << " " << rad2deg(p[1]) << " " << rad2deg(p[2]) << std::endl; std::cout << "Center of rot (phy) : " << p[3] << " " << p[4] << " " << p[5] << std::endl; std::cout << "Translation (phy) : " << p[6] << " " << p[7] << " " << p[8] << std::endl; @@ -562,13 +562,15 @@ namespace clitk // Compose with previous if needed if (j!=0) { mat->Compose(previous); - if (m_Verbose) { + if (verbose) { std::cout << "Composed rotation (deg) : " << rad2deg(mat->GetAngleX()) << " " << rad2deg(mat->GetAngleY()) << " " << rad2deg(mat->GetAngleZ()) << std::endl; std::cout << "Composed center of rot (phy) : " << mat->GetCenter() << std::endl; std::cout << "Compsoed translation (phy) : " << mat->GetTranslation() << std::endl; + } } - } - previous = mat->Clone(); + // previous = mat->Clone(); // ITK4 + previous = itk::CenteredEuler3DTransform::New(); + previous->SetParameters(mat->GetParameters()); } mat = previous;