X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkShapedBLUTSpatioTemporalDeformableTransform.txx;h=7cc0107ec1a58facfdbe91ef6d72dfb9bbf641dd;hb=738abae55fb33a7c77843a9d84bc14d5439bff1a;hp=ea50aa4d2d27b60918f42fada57225143f4cae4c;hpb=8eaf0a647fec2440abf6064d78d3eab735aa90c6;p=clitk.git diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx index ea50aa4..7cc0107 100644 --- a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx +++ b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx @@ -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; jGetLargestPossibleRegion(); 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(); @@ -2375,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 { //======================================================== @@ -2475,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 @@ -2485,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 @@ -2653,7 +2651,7 @@ namespace clitk } // Return the result - return this->m_Jacobian; + jacobian = m_SharedDataBSplineJacobian; }