X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx;h=643b8020f751979f3a6abd5ebf5e4d2cbe2d8fca;hb=938c4491f8ef70565b124a7eeb4f9e69b1b9baba;hp=1d2b8cc81b108f9a487b83406f9d22164d0c0e89;hpb=c18059db4f507fd31b5898667f57eced7d48c5f7;p=clitk.git diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx index 1d2b8cc..643b802 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.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 __clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD_txx #define __clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD_txx @@ -381,7 +381,12 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD } // Jacobian should be evaluated at the unmapped (fixed image) point. +#if ITK_VERSION_MAJOR >= 4 + TransformJacobianType jacobian; + transform->ComputeJacobianWithRespectToParameters( fixedImagePoint, jacobian ); +#else const TransformJacobianType & jacobian = transform->GetJacobian( fixedImagePoint ); +#endif // for(unsigned int par=0; parm_NumberOfParameters; par++) // { @@ -457,16 +462,16 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD } memset( derivative.data_block(), 0, - this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) ); + this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); for( unsigned int threadID = 0; threadIDm_NumberOfThreads; threadID++ ) { memset( m_ThreaderDerivativeF[threadID].data_block(), 0, - this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) ); + this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); memset( m_ThreaderDerivativeM[threadID].data_block(), 0, - this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) ); + this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) ); } // MUST BE CALLED TO INITIATE PROCESSING