]> Creatis software - clitk.git/blobdiff - registration/clitkConvertBLUTCoeffsToVFFilter.h
Debug RTStruct conversion with empty struc
[clitk.git] / registration / clitkConvertBLUTCoeffsToVFFilter.h
index 3cd1e676b0acdf9d23c37f194fd09f5363cbc227..7ae33eb084baf8d057309d7f38e46ffe064c2f85 100644 (file)
@@ -7,10 +7,10 @@
 #include "clitkImageCommon.h"
 #include "clitkBSplineDeformableTransform.h"
 #include "itkBSplineDeformableTransform.h"
-#if ITK_VERSION_MAJOR >= 4
-#include "itkTransformToDisplacementFieldSource.h"
+#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6)
+#  include "itkTransformToDisplacementFieldSource.h"
 #else
-#include "itkTransformToDeformationFieldSource.h"
+#  include "itkTransformToDisplacementFieldFilter.h"
 #endif
 
 namespace clitk 
@@ -41,14 +41,18 @@ namespace clitk
 
     typedef clitk::BSplineDeformableTransform<double, TDVFType::ImageDimension, TDVFType::ImageDimension> BLUTTransformType;
     typedef typename BLUTTransformType::CoefficientImageType BLUTCoefficientImageType;
-    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, TDVFType::ImageDimension> ITKTransformType;
+    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, 3> ITKTransformType;
+    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, 0> ITKTransformTypeZero;
+    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, 1> ITKTransformTypeOne;
+    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, 2> ITKTransformTypeTwo;
+    typedef itk::BSplineDeformableTransform<double, TDVFType::ImageDimension, 4> ITKTransformTypeFour;
 
     typedef itk::Transform< double, TDVFType::ImageDimension, TDVFType::ImageDimension> GenericTransformType;
     
-#if ITK_VERSION_MAJOR >= 4
-    typedef itk::TransformToDisplacementFieldSource<OutputImageType, double> ConvertorType;
+#if (ITK_VERSION_MAJOR == 4) && (ITK_VERSION_MINOR < 6)
+  typedef itk::TransformToDisplacementFieldSource<OutputImageType, double> ConvertorType;
 #else
-    typedef itk::TransformToDeformationFieldSource<OutputImageType, double> ConvertorType;
+  typedef itk::TransformToDisplacementFieldFilter<OutputImageType, double> ConvertorType;
 #endif
 
     itkNewMacro(Self);
@@ -90,4 +94,4 @@ namespace clitk
 
 #include "clitkConvertBLUTCoeffsToVFFilter.txx"
 
-#endif // clitkConvertBLUTCoeffsToVFFilter_h
\ No newline at end of file
+#endif // clitkConvertBLUTCoeffsToVFFilter_h