X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FitkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx;h=cf173407bf7310fd4e4a921f4b278c2053f5e0a1;hb=e06bbd15e271bf0a4092b673399d040a5cb25efe;hp=d949e9b84419e2e94097edad7db727034d98e000;hpb=c18059db4f507fd31b5898667f57eced7d48c5f7;p=clitk.git diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx index d949e9b..cf17340 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.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 -======================================================================-====*/ +===========================================================================**/ /*========================================================================= @@ -153,7 +153,9 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD // Set up the parameters in the transform this->m_Transform->SetParameters( parameters ); +#if ITK_VERSION_MAJOR < 4 this->m_Parameters = parameters; +#endif // MUST BE CALLED TO INITIATE PROCESSING this->GetValueMultiThreadedInitiate(); @@ -213,7 +215,12 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD } // Jacobian should be evaluated at the unmapped (fixed image) point. +#if ITK_VERSION_MAJOR >= 4 + TransformJacobianType jacobian; + transform->ComputeJacobianWithRespectToParameters(this->m_FixedImageSamples[fixedImageSample].point, jacobian); +#else const TransformJacobianType & jacobian = transform ->GetJacobian( this->m_FixedImageSamples[fixedImageSample].point ); +#endif //double sum; unsigned int par, dim; for( par=0; parm_NumberOfParameters; par+=3) { @@ -250,7 +257,9 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD // Set up the parameters in the transform this->m_Transform->SetParameters( parameters ); +#if ITK_VERSION_MAJOR < 4 this->m_Parameters = parameters; +#endif // Reset the joint pdfs to zero memset( m_ThreaderMSE,