X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkShapedBLUTSpatioTemporalDeformableTransform.txx;h=a57ead0be2ed89605d29457e8d1ccd976137ea79;hb=HEAD;hp=5a4b9503cdf33cbba22f925e7f40bc5f20e04efe;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx b/registration/clitkShapedBLUTSpatioTemporalDeformableTransform.txx old mode 100755 new mode 100644 index 5a4b950..a57ead0 --- 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 { @@ -479,7 +478,7 @@ namespace clitk // when spline order is even. // The valid interval for evaluation is [start+offset, last-offset) // when spline order is odd. - // Where offset = vcl_floor(spline / 2 ). + // Where offset = std::floor(spline / 2 ). // Note that the last pixel is not included in the valid region // with odd spline orders. typename RegionType::SizeType size = m_PaddedGridRegion.GetSize(); @@ -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; }