]> Creatis software - clitk.git/blobdiff - registration/clitkCorrelationRatioImageToImageMetric.txx
Remove vnl_math dependency into registration codes
[clitk.git] / registration / clitkCorrelationRatioImageToImageMetric.txx
index f6b5af11cb7abae02d367d9fc80dce70257ceaae..d76f020e586f6471d0d2089f8d4d3d96cb82384e 100644 (file)
@@ -289,7 +289,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
 
       typename MovingImageType::IndexType mappedIndex;
       for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
-        mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+        mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
       }
 
       const GradientPixelType gradient =
@@ -409,7 +409,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
 
       typename MovingImageType::IndexType mappedIndex;
       for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
-        mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+        mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
       }
 
       const GradientPixelType gradient =