From 57d672c76dc21ff1229e8a4eace5ce174274f679 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Mon, 5 Sep 2011 11:34:19 +0200 Subject: [PATCH] itkv4 propagate Transform<*>::NumberOfParametersType - Propagate itk::Transform<*>::NumberOfParametersType typedef into our homemade transforms. --- registration/clitkBSplineDeformableTransform.h | 7 +++++++ registration/clitkBSplineDeformableTransform.txx | 4 ++++ registration/clitkMultipleBSplineDeformableTransform.h | 7 +++++++ registration/clitkMultipleBSplineDeformableTransform.txx | 4 ++++ .../clitkShapedBLUTSpatioTemporalDeformableTransform.h | 7 +++++++ .../clitkShapedBLUTSpatioTemporalDeformableTransform.txx | 4 ++++ 6 files changed, 33 insertions(+) diff --git a/registration/clitkBSplineDeformableTransform.h b/registration/clitkBSplineDeformableTransform.h index bab7f8c..f5b2698 100644 --- a/registration/clitkBSplineDeformableTransform.h +++ b/registration/clitkBSplineDeformableTransform.h @@ -65,6 +65,9 @@ namespace clitk /** Standard parameters container. */ typedef typename Superclass::ParametersType ParametersType; +#if ITK_VERSION_MAJOR >= 4 + typedef typename Superclass::NumberOfParametersType NumberOfParametersType; +#endif /** Standard Jacobian container. */ typedef typename Superclass::JacobianType JacobianType; @@ -265,7 +268,11 @@ namespace clitk #endif /** Return the number of parameters that completely define the Transfom */ +#if ITK_VERSION_MAJOR >= 4 + virtual NumberOfParametersType GetNumberOfParameters(void) const; +#else virtual unsigned int GetNumberOfParameters(void) const; +#endif /** Return the number of parameters per dimension */ unsigned int GetNumberOfParametersPerDimension(void) const; diff --git a/registration/clitkBSplineDeformableTransform.txx b/registration/clitkBSplineDeformableTransform.txx index 1a2dfd3..9d7cc6b 100644 --- a/registration/clitkBSplineDeformableTransform.txx +++ b/registration/clitkBSplineDeformableTransform.txx @@ -255,7 +255,11 @@ namespace clitk // Get the number of parameters template +#if ITK_VERSION_MAJOR >= 4 + typename BSplineDeformableTransform::NumberOfParametersType +#else unsigned int +#endif BSplineDeformableTransform ::GetNumberOfParameters(void) const { diff --git a/registration/clitkMultipleBSplineDeformableTransform.h b/registration/clitkMultipleBSplineDeformableTransform.h index 84e8f74..5b2ee9e 100644 --- a/registration/clitkMultipleBSplineDeformableTransform.h +++ b/registration/clitkMultipleBSplineDeformableTransform.h @@ -59,6 +59,9 @@ namespace clitk /** Standard parameters container. */ typedef typename Superclass::ParametersType ParametersType; +#if ITK_VERSION_MAJOR >= 4 + typedef typename Superclass::NumberOfParametersType NumberOfParametersType; +#endif /** Standard Jacobian container. */ typedef typename Superclass::JacobianType JacobianType; @@ -224,7 +227,11 @@ namespace clitk #endif /** Return the number of parameters that completely define the Transfom */ +#if ITK_VERSION_MAJOR >= 4 + virtual NumberOfParametersType GetNumberOfParameters(void) const; +#else virtual unsigned int GetNumberOfParameters(void) const; +#endif /** Return the number of parameters per dimension */ unsigned int GetNumberOfParametersPerDimension(void) const; diff --git a/registration/clitkMultipleBSplineDeformableTransform.txx b/registration/clitkMultipleBSplineDeformableTransform.txx index 32ebced..8df2706 100644 --- a/registration/clitkMultipleBSplineDeformableTransform.txx +++ b/registration/clitkMultipleBSplineDeformableTransform.txx @@ -329,7 +329,11 @@ namespace clitk #undef LOOP_ON_LABELS template +#if ITK_VERSION_MAJOR >= 4 + inline typename MultipleBSplineDeformableTransform::NumberOfParametersType +#else inline unsigned int +#endif MultipleBSplineDeformableTransform ::GetNumberOfParameters(void) const { diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.h b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.h index f3071b1..c9fb588 100644 --- a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.h +++ b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.h @@ -68,6 +68,9 @@ namespace clitk /** Standard parameters container. */ typedef typename Superclass::ParametersType ParametersType; +#if ITK_VERSION_MAJOR >= 4 + typedef typename Superclass::NumberOfParametersType NumberOfParametersType; +#endif /** Standard Jacobian container. */ typedef typename Superclass::JacobianType JacobianType; @@ -274,7 +277,11 @@ namespace clitk #endif /** Return the number of parameters that completely define the Transfom */ +#if ITK_VERSION_MAJOR >= 4 + virtual NumberOfParametersType GetNumberOfParameters(void) const; +#else virtual unsigned int GetNumberOfParameters(void) const; +#endif //JV Return the padded number of parameters virtual unsigned int GetPaddedNumberOfParameters(void) const; diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx index cebdb5b..ea10c73 100644 --- a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx +++ b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx @@ -383,7 +383,11 @@ namespace clitk // Get the number of parameters template +#if ITK_VERSION_MAJOR >= 4 + typename ShapedBLUTSpatioTemporalDeformableTransform::NumberOfParametersType +#else unsigned int +#endif ShapedBLUTSpatioTemporalDeformableTransform ::GetNumberOfParameters(void) const { -- 2.47.1