X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkOptNormalizedCorrelationImageToImageMetric.txx;h=e8d4c271316e9b735b1657cfec59203a65222fe8;hb=c167ace7ba7780e29e52c4450d69c3123c9bbcee;hp=41a1af00916f0766c60c1361d19817bb1483f831;hpb=c18059db4f507fd31b5898667f57eced7d48c5f7;p=clitk.git diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx index 41a1af0..e8d4c27 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.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 __clitkOptNormalizedCorrelationImageToImageMetric_txx #define __clitkOptNormalizedCorrelationImageToImageMetric_txx @@ -381,8 +381,13 @@ NormalizedCorrelationImageToImageMetric } // 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++) { RealType sumF = itk::NumericTraits< RealType >::Zero; @@ -433,16 +438,16 @@ NormalizedCorrelationImageToImageMetric } 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