]> Creatis software - clitk.git/commitdiff
itkv4 propagate Transform<*>::NumberOfParametersType
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Mon, 5 Sep 2011 09:34:19 +0000 (11:34 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Mon, 5 Sep 2011 09:34:19 +0000 (11:34 +0200)
- Propagate itk::Transform<*>::NumberOfParametersType typedef into our
homemade transforms.

registration/clitkBSplineDeformableTransform.h
registration/clitkBSplineDeformableTransform.txx
registration/clitkMultipleBSplineDeformableTransform.h
registration/clitkMultipleBSplineDeformableTransform.txx
registration/clitkShapedBLUTSpatioTemporalDeformableTransform.h
registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx

index bab7f8c..f5b2698 100644 (file)
@@ -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;
index 1a2dfd3..9d7cc6b 100644 (file)
@@ -255,7 +255,11 @@ namespace clitk
 
   // Get the number of parameters
   template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+#if ITK_VERSION_MAJOR >= 4
+  typename BSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::NumberOfParametersType
+#else
   unsigned int
+#endif
   BSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
   ::GetNumberOfParameters(void) const
   {
index 84e8f74..5b2ee9e 100644 (file)
@@ -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;
index 32ebced..8df2706 100644 (file)
@@ -329,7 +329,11 @@ namespace clitk
 #undef LOOP_ON_LABELS
 
   template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+#if ITK_VERSION_MAJOR >= 4
+  inline typename MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::NumberOfParametersType
+#else
   inline unsigned int
+#endif
   MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
   ::GetNumberOfParameters(void) const
   {
index f3071b1..c9fb588 100644 (file)
@@ -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;
index cebdb5b..ea10c73 100644 (file)
@@ -383,7 +383,11 @@ namespace clitk
 
   // Get the number of parameters
   template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+#if ITK_VERSION_MAJOR >= 4
+  typename ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::NumberOfParametersType
+#else
   unsigned int
+#endif
   ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
   ::GetNumberOfParameters(void) const
   {