X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkShapedBLUTSpatioTemporalDeformableTransform.txx;h=ea10c73d98757135a3408601e4d26f9fae9a2f05;hb=69667910c62b2c9e30d795a9af668855a8de78d3;hp=ea50aa4d2d27b60918f42fada57225143f4cae4c;hpb=08d1fd56ac1d08bd228d9e557f5472a395e9b708;p=clitk.git diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx index ea50aa4..ea10c73 100644 --- a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx +++ b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx @@ -32,7 +32,11 @@ namespace clitk // Constructor with default arguments template ShapedBLUTSpatioTemporalDeformableTransform +#if ITK_VERSION_MAJOR >= 4 + ::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(0) +#else ::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(OutputDimension,0) +#endif { unsigned int i; @@ -379,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 { @@ -802,11 +810,19 @@ namespace clitk //===================================== //JV Wrap jacobian into OutputDimension X Vectorial images //===================================== +#if ITK_VERSION_MAJOR >= 4 + this->m_SharedDataBSplineJacobian.set_size( OutputDimension, this->GetNumberOfParameters() ); +#else this->m_Jacobian.set_size( OutputDimension, this->GetNumberOfParameters() ); +#endif // Use memset to set the memory // JV four rows of three comps of parameters +#if ITK_VERSION_MAJOR >= 4 + JacobianPixelType * jacobianDataPointer = reinterpret_cast(this->m_SharedDataBSplineJacobian.data_block()); +#else JacobianPixelType * jacobianDataPointer = reinterpret_cast(this->m_Jacobian.data_block()); +#endif memset(jacobianDataPointer, 0, OutputDimension*numberOfPixels*sizeof(JacobianPixelType)); for (unsigned int j=0; j +#if ITK_VERSION_MAJOR >= 4 + void + ShapedBLUTSpatioTemporalDeformableTransform + ::ComputeJacobianWithRespectToParameters( const InputPointType & point, JacobianType & jacobian) const +#else const typename ShapedBLUTSpatioTemporalDeformableTransform ::JacobianType & ShapedBLUTSpatioTemporalDeformableTransform ::GetJacobian( const InputPointType & point ) const +#endif { //======================================================== @@ -2475,7 +2497,12 @@ namespace clitk if(m_Mask && !(m_Mask->IsInside(point) ) ) { // Outside: no (deformable) displacement +#if ITK_VERSION_MAJOR >= 4 + jacobian = m_SharedDataBSplineJacobian; + return; +#else return this->m_Jacobian; +#endif } // Get index @@ -2485,7 +2512,12 @@ namespace clitk // we assume zero displacement and return the input point if ( !this->InsideValidRegion( m_Index ) ) { +#if ITK_VERSION_MAJOR >= 4 + jacobian = m_SharedDataBSplineJacobian; + return; +#else return this->m_Jacobian; +#endif } // Compute interpolation weights @@ -2653,7 +2685,11 @@ namespace clitk } // Return the result +#if ITK_VERSION_MAJOR >= 4 + jacobian = m_SharedDataBSplineJacobian; +#else return this->m_Jacobian; +#endif }