X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=8bc8877cf9757239091cf126382cdfcc2a99397a;hb=e751b47051ae80ecd388418ae39b388f15e627eb;hp=d864900c0cc0d37a6d299d000634300fe818717c;hpb=1eb88e752e0985548fc83742ed92ab395f9c77fc;p=clitk.git diff --git a/registration/clitkMatrixTransformToVFGenericFilter.txx b/registration/clitkMatrixTransformToVFGenericFilter.txx index d864900..8bc8877 100644 --- a/registration/clitkMatrixTransformToVFGenericFilter.txx +++ b/registration/clitkMatrixTransformToVFGenericFilter.txx @@ -78,14 +78,10 @@ namespace clitk typedef itk::Image OutputImageType; // Filter -#if ITK_VERSION_MAJOR >= 4 -# if ITK_VERSION_MINOR < 6 +#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6) typedef itk::TransformToDisplacementFieldSource ConvertorType; -# else - typedef itk::TransformToDisplacementFieldFilter ConvertorType; -# endif #else - typedef itk::TransformToDeformationFieldSource ConvertorType; + typedef itk::TransformToDisplacementFieldFilter ConvertorType; #endif typename ConvertorType::Pointer filter= ConvertorType::New(); @@ -101,6 +97,7 @@ namespace clitk typename OutputImageType::Pointer image=reader2->GetOutput(); #if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6) filter->SetReferenceImage(image); + filter->UseReferenceImageOn(); #else filter->SetOutputParametersFromImage(image); #endif