X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=registration%2FclitkCorrelationRatioImageToImageMetric.txx;h=d76f020e586f6471d0d2089f8d4d3d96cb82384e;hb=HEAD;hp=f6b5af11cb7abae02d367d9fc80dce70257ceaae;hpb=8d51bd1cb7e9ca416b46677dcd73ba76d107a587;p=clitk.git diff --git a/registration/clitkCorrelationRatioImageToImageMetric.txx b/registration/clitkCorrelationRatioImageToImageMetric.txx index f6b5af1..d76f020 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.txx +++ b/registration/clitkCorrelationRatioImageToImageMetric.txx @@ -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 =