X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkMatrixTransformToVFGenericFilter.txx;h=d864900c0cc0d37a6d299d000634300fe818717c;hb=1eb88e752e0985548fc83742ed92ab395f9c77fc;hp=ebc0e45c3ba6ba0beaf9d30dd05b5a954444ebad;hpb=6194949c0beb1589904e22381b9aba1bbface172;p=clitk.git diff --git a/registration/clitkMatrixTransformToVFGenericFilter.txx b/registration/clitkMatrixTransformToVFGenericFilter.txx index ebc0e45..d864900 100644 --- a/registration/clitkMatrixTransformToVFGenericFilter.txx +++ b/registration/clitkMatrixTransformToVFGenericFilter.txx @@ -79,10 +79,15 @@ namespace clitk // 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 @@ -94,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 { @@ -118,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