From 0721574dfb0afb4077edab558c03963b316c5ff0 Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Mon, 13 Feb 2012 17:12:28 +0100 Subject: [PATCH] itk4 compatibility --- registration/clitkConvertBLUTCoeffsToVFFilter.txx | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.47.1