X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=registration%2FclitkCorrelationRatioImageToImageMetric.txx;h=d76f020e586f6471d0d2089f8d4d3d96cb82384e;hb=d786b4f836c0f12ba4a6dd06803cbe771ac371e3;hp=1454539c8183b24d2d56a8239d027061076732d9;hpb=0a6ce0aedf87be56afa381561b8d5b7b7822fa15;p=clitk.git diff --git a/registration/clitkCorrelationRatioImageToImageMetric.txx b/registration/clitkCorrelationRatioImageToImageMetric.txx index 1454539..d76f020 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.txx +++ b/registration/clitkCorrelationRatioImageToImageMetric.txx @@ -168,7 +168,7 @@ CorrelationRatioImageToImageMetric //check in which bin the fixed value belongs, get the index const double fixedImageBinTerm = (fixedValue - m_FixedImageMin) / m_FixedImageBinSize; - const unsigned int fixedImageBinIndex = static_cast( vcl_floor(fixedImageBinTerm ) ); + const unsigned int fixedImageBinIndex = static_cast( std::floor(fixedImageBinTerm ) ); //adapt the measures per bin this->m_mMSVPB[fixedImageBinIndex]+=movingSquaredValue; this->m_mSMVPB[fixedImageBinIndex]+=movingValue; @@ -289,7 +289,7 @@ CorrelationRatioImageToImageMetric typename MovingImageType::IndexType mappedIndex; for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) { - mappedIndex[j] = static_cast( vnl_math_rnd( tempIndex[j] ) ); + mappedIndex[j] = static_cast( std::round( tempIndex[j] ) ); } const GradientPixelType gradient = @@ -409,7 +409,7 @@ CorrelationRatioImageToImageMetric typename MovingImageType::IndexType mappedIndex; for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) { - mappedIndex[j] = static_cast( vnl_math_rnd( tempIndex[j] ) ); + mappedIndex[j] = static_cast( std::round( tempIndex[j] ) ); } const GradientPixelType gradient =