From: Romulo Pinho Date: Mon, 13 Feb 2012 16:12:28 +0000 (+0100) Subject: itk4 compatibility X-Git-Tag: v1.3.0~102 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0721574dfb0afb4077edab558c03963b316c5ff0;p=clitk.git itk4 compatibility --- diff --git a/registration/clitkConvertBLUTCoeffsToVFFilter.txx b/registration/clitkConvertBLUTCoeffsToVFFilter.txx index e103424..8665993 100644 --- a/registration/clitkConvertBLUTCoeffsToVFFilter.txx +++ b/registration/clitkConvertBLUTCoeffsToVFFilter.txx @@ -149,7 +149,12 @@ namespace clitk typedef clitk::VectorImageToImageFilter FilterType; typename FilterType::Pointer component_filter[BLUTCoefficientImageType::ImageDimension]; +#if ITK_VERSION_MAJOR >= 4 + typename ITKTransformType::CoefficientImageArray coefficient_images; +#else typename ITKTransformType::ImagePointer coefficient_images[BLUTCoefficientImageType::ImageDimension]; +#endif + for (unsigned int i=0; i < BLUTCoefficientImageType::ImageDimension; i++) { component_filter[i] = FilterType::New(); component_filter[i]->SetInput(input); @@ -157,7 +162,11 @@ namespace clitk component_filter[i]->Update(); coefficient_images[i] = component_filter[i]->GetOutput(); } +#if ITK_VERSION_MAJOR >= 4 + m_ITKTransform->SetCoefficientImages(coefficient_images); +#else m_ITKTransform->SetCoefficientImage(coefficient_images); +#endif m_GenericTransform = m_ITKTransform; }