X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=d864900c0cc0d37a6d299d000634300fe818717c;hb=1eb88e752e0985548fc83742ed92ab395f9c77fc;hp=0540a134a12018a2935b6977435cba68fbe47596;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/registration/clitkMatrixTransformToVFGenericFilter.txx b/registration/clitkMatrixTransformToVFGenericFilter.txx old mode 100755 new mode 100644 index 0540a13..d864900 --- a/registration/clitkMatrixTransformToVFGenericFilter.txx +++ b/registration/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