comparison Core/Images/ImageProcessing.cpp @ 3684:3971ec6b1f72

fix for older compilers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 24 Feb 2020 17:30:20 +0100
parents 12253ddefe5a
children a9ce35d67c3c
comparison
equal deleted inserted replaced
3683:12253ddefe5a 3684:3971ec6b1f72
1411 ShiftScaleInternal<int16_t, int16_t, false, false>(image, image, a, b, std::numeric_limits<int16_t>::min()); 1411 ShiftScaleInternal<int16_t, int16_t, false, false>(image, image, a, b, std::numeric_limits<int16_t>::min());
1412 } 1412 }
1413 return; 1413 return;
1414 1414
1415 case PixelFormat_Float32: 1415 case PixelFormat_Float32:
1416 // "::min()" must be replaced by "::lowest()" if dealing with float or double 1416 // "::min()" must be replaced by "::lowest()" or "-::max()" if dealing with float or double.
1417 if (useRound) 1417 if (useRound)
1418 { 1418 {
1419 ShiftScaleInternal<float, float, true, false>(image, image, a, b, std::numeric_limits<float>::lowest()); 1419 ShiftScaleInternal<float, float, true, false>(image, image, a, b, -std::numeric_limits<float>::max());
1420 } 1420 }
1421 else 1421 else
1422 { 1422 {
1423 ShiftScaleInternal<float, float, false, false>(image, image, a, b, std::numeric_limits<float>::lowest()); 1423 ShiftScaleInternal<float, float, false, false>(image, image, a, b, -std::numeric_limits<float>::max());
1424 } 1424 }
1425 return; 1425 return;
1426 1426
1427 default: 1427 default:
1428 throw OrthancException(ErrorCode_NotImplemented); 1428 throw OrthancException(ErrorCode_NotImplemented);