X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkShapedBLUTSpatioTemporalDeformableTransform.txx;h=7cc0107ec1a58facfdbe91ef6d72dfb9bbf641dd;hb=e751b47051ae80ecd388418ae39b388f15e627eb;hp=7600276d8c0e4397e62ced6fcf8ef752741f60b6;hpb=657652a78c2e2717a6f77e027049173442ca29f0;p=clitk.git diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx old mode 100755 new mode 100644 index 7600276..7cc0107 --- a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx +++ b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef __clitkShapedBLUTSpatioTemporalDeformableTransform_txx #define __clitkShapedBLUTSpatioTemporalDeformableTransform_txx #include "clitkShapedBLUTSpatioTemporalDeformableTransform.h" @@ -31,8 +31,7 @@ namespace clitk // Constructor with default arguments template - ShapedBLUTSpatioTemporalDeformableTransform - ::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(OutputDimension,0) + ShapedBLUTSpatioTemporalDeformableTransform::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(0) { unsigned int i; @@ -379,7 +378,7 @@ namespace clitk // Get the number of parameters template - unsigned int + typename ShapedBLUTSpatioTemporalDeformableTransform::NumberOfParametersType ShapedBLUTSpatioTemporalDeformableTransform ::GetNumberOfParameters(void) const { @@ -802,11 +801,11 @@ namespace clitk //===================================== //JV Wrap jacobian into OutputDimension X Vectorial images //===================================== - this->m_Jacobian.set_size( OutputDimension, this->GetNumberOfParameters() ); + this->m_SharedDataBSplineJacobian.set_size( OutputDimension, this->GetNumberOfParameters() ); // Use memset to set the memory // JV four rows of three comps of parameters - JacobianPixelType * jacobianDataPointer = reinterpret_cast(this->m_Jacobian.data_block()); + JacobianPixelType * jacobianDataPointer = reinterpret_cast(this->m_SharedDataBSplineJacobian.data_block()); memset(jacobianDataPointer, 0, OutputDimension*numberOfPixels*sizeof(JacobianPixelType)); for (unsigned int j=0; j PasteImageFilterType; typedef clitk::ExtractImageFilter ExtractImageFilterType; typedef clitk::LinearCombinationImageFilter LinearCombinationFilterType; - typedef itk::MultiplyByConstantImageFilter MultiplicationFilterType; // Regions typename CoefficientImageType::RegionType sourceRegion=m_PaddedCoefficientImage->GetLargestPossibleRegion(); typename CoefficientImageType::RegionType destinationRegion=m_PaddedCoefficientImage->GetLargestPossibleRegion(); typename CoefficientImageType::RegionType::SizeType sourceSize=sourceRegion.GetSize(); - typename CoefficientImageType::RegionType::SizeType destinationSize=destinationRegion.GetSize(); typename CoefficientImageType::IndexType sourceIndex=sourceRegion.GetIndex(); typename CoefficientImageType::IndexType destinationIndex=destinationRegion.GetIndex(); @@ -2376,11 +2373,9 @@ namespace clitk // JV weights are identical as for transformpoint, could be done simultaneously in metric!!!! // Compute the Jacobian in one position template - const - typename ShapedBLUTSpatioTemporalDeformableTransform - ::JacobianType & + void ShapedBLUTSpatioTemporalDeformableTransform - ::GetJacobian( const InputPointType & point ) const + ::ComputeJacobianWithRespectToParameters( const InputPointType & point, JacobianType & jacobian) const { //======================================================== @@ -2476,7 +2471,8 @@ namespace clitk if(m_Mask && !(m_Mask->IsInside(point) ) ) { // Outside: no (deformable) displacement - return this->m_Jacobian; + jacobian = m_SharedDataBSplineJacobian; + return; } // Get index @@ -2486,7 +2482,8 @@ namespace clitk // we assume zero displacement and return the input point if ( !this->InsideValidRegion( m_Index ) ) { - return this->m_Jacobian; + jacobian = m_SharedDataBSplineJacobian; + return; } // Compute interpolation weights @@ -2654,7 +2651,7 @@ namespace clitk } // Return the result - return this->m_Jacobian; + jacobian = m_SharedDataBSplineJacobian; }