X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=8bc8877cf9757239091cf126382cdfcc2a99397a;hb=afd2671211668e6106886aa59c7bb13a82c48a94;hp=d864900c0cc0d37a6d299d000634300fe818717c;hpb=e06bbd15e271bf0a4092b673399d040a5cb25efe;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