]> Creatis software - clitk.git/blobdiff - registration/clitkMatrixTransformToVFGenericFilter.txx
Debug RTStruct conversion with empty struc
[clitk.git] / registration / clitkMatrixTransformToVFGenericFilter.txx
index d864900c0cc0d37a6d299d000634300fe818717c..8bc8877cf9757239091cf126382cdfcc2a99397a 100644 (file)
@@ -78,14 +78,10 @@ namespace clitk
     typedef itk::Image<Displacement, Dimension> OutputImageType;
     
     // Filter
-#if ITK_VERSION_MAJOR >= 4
-#  if ITK_VERSION_MINOR < 6
+#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6)
     typedef itk::TransformToDisplacementFieldSource<OutputImageType, double> ConvertorType;
-#  else
-    typedef itk::TransformToDisplacementFieldFilter<OutputImageType, double> ConvertorType;
-#  endif
 #else
-    typedef itk::TransformToDeformationFieldSource<OutputImageType, double> ConvertorType;
+    typedef itk::TransformToDisplacementFieldFilter<OutputImageType, double> ConvertorType;
 #endif
 
     typename   ConvertorType::Pointer filter= ConvertorType::New();
@@ -101,6 +97,7 @@ namespace clitk
        typename OutputImageType::Pointer image=reader2->GetOutput();
 #if ITK_VERSION_MAJOR > 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 6)
     filter->SetReferenceImage(image);
+    filter->UseReferenceImageOn();
 #else
     filter->SetOutputParametersFromImage(image);
 #endif