X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=8bc8877cf9757239091cf126382cdfcc2a99397a;hb=a1ec529a24b721fcfb2c5725f95bcc2c9125b28d;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..8bc8877 --- 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,12 @@ namespace clitk typedef itk::Image OutputImageType; // Filter - typedef itk::TransformToDeformationFieldSource ConvertorType; +#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6) + typedef itk::TransformToDisplacementFieldSource ConvertorType; +#else + typedef itk::TransformToDisplacementFieldFilter ConvertorType; +#endif + typename ConvertorType::Pointer filter= ConvertorType::New(); // Output image info @@ -90,7 +95,12 @@ 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); + filter->UseReferenceImageOn(); +#else + filter->SetOutputParametersFromImage(image); +#endif } else { @@ -114,8 +124,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