]> Creatis software - clitk.git/blobdiff - registration/clitkBLUTDIRGenericFilter.cxx
COMP: fix test logic for ITK version which failed with the new ITK v5
[clitk.git] / registration / clitkBLUTDIRGenericFilter.cxx
index 9f7b84f456f36496f1be156400a0c43441dd2983..6c80fd911859199d28b36f618e2d01472c0d8eaa 100644 (file)
@@ -30,14 +30,10 @@ It is distributed under dual licence
 #include "clitkBLUTDIRGenericFilter.h"
 #include "clitkBLUTDIRCommandIterationUpdateDVF.h"
 #include "itkCenteredTransformInitializer.h"
-#if ITK_VERSION_MAJOR >= 4
-#  if ITK_VERSION_MINOR < 6
-#    include "itkTransformToDisplacementFieldSource.h"
-#  else
-#    include "itkTransformToDisplacementFieldFilter.h"
-#  endif
+#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6)
+# include "itkTransformToDisplacementFieldSource.h"
 #else
-#  include "itkTransformToDeformationFieldSource.h"
+# include "itkTransformToDisplacementFieldFilter.h"
 #endif
 
 namespace clitk
@@ -789,12 +785,10 @@ namespace clitk
       //=======================================================
       typedef itk::Vector< float, SpaceDimension >  DisplacementType;
       typedef itk::Image< DisplacementType, InputImageType::ImageDimension >  DisplacementFieldType;
-#if ITK_VERSION_MAJOR >= 4
-#  if ITK_VERSION_MINOR < 6
+#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6)
       typedef itk::TransformToDisplacementFieldSource<DisplacementFieldType, double> ConvertorType;
-#  else
+#else
       typedef itk::TransformToDisplacementFieldFilter<DisplacementFieldType, double> ConvertorType;
-#  endif
 #endif
       typename ConvertorType::Pointer filter= ConvertorType::New();
       filter->SetNumberOfThreads(1);