X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=d864900c0cc0d37a6d299d000634300fe818717c;hb=1eb88e752e0985548fc83742ed92ab395f9c77fc;hp=df1ed8ae74a0f6c9c80b8327b91524cccc57e3e0;hpb=657652a78c2e2717a6f77e027049173442ca29f0;p=clitk.git diff --git a/registration/clitkMatrixTransformToVFGenericFilter.txx b/registration/clitkMatrixTransformToVFGenericFilter.txx old mode 100755 new mode 100644 index df1ed8a..d864900 --- a/registration/clitkMatrixTransformToVFGenericFilter.txx +++ b/registration/clitkMatrixTransformToVFGenericFilter.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef clitkMatrixTransformToVFGenericFilter_txx #define clitkMatrixTransformToVFGenericFilter_txx @@ -78,7 +78,16 @@ namespace clitk typedef itk::Image OutputImageType; // Filter +#if ITK_VERSION_MAJOR >= 4 +# if ITK_VERSION_MINOR < 6 + typedef itk::TransformToDisplacementFieldSource ConvertorType; +# else + typedef itk::TransformToDisplacementFieldFilter ConvertorType; +# endif +#else typedef itk::TransformToDeformationFieldSource ConvertorType; +#endif + typename ConvertorType::Pointer filter= ConvertorType::New(); // Output image info @@ -90,7 +99,11 @@ namespace clitk reader2->Update(); typename OutputImageType::Pointer image=reader2->GetOutput(); - filter->SetOutputParametersFromImage(image); +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + filter->SetReferenceImage(image); +#else + filter->SetOutputParametersFromImage(image); +#endif } else { @@ -114,8 +127,12 @@ namespace clitk typename OutputImageType::SizeType size; for(i=0;iSetOutputSize(size); - } +#if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) + filter->SetSize(size); +#else + filter->SetOutputSize(size); +#endif + } } // Transform