]> Creatis software - clitk.git/commitdiff
itk4 compatibility
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Mon, 13 Feb 2012 16:12:28 +0000 (17:12 +0100)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Mon, 13 Feb 2012 16:12:28 +0000 (17:12 +0100)
registration/clitkConvertBLUTCoeffsToVFFilter.txx

index e1034240c8af60df45358776d106ec654dae6c37..86659936a098aad33d09925c3425d6c6cea26867 100644 (file)
@@ -149,7 +149,12 @@ namespace clitk
       typedef clitk::VectorImageToImageFilter<BLUTCoefficientImageType, typename ITKTransformType::ImageType> 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;
     }