Mercurial > hg > orthanc
diff Core/Images/ImageProcessing.cpp @ 3505:b2d4dd16dae8
removed C++11 primitive
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Aug 2019 12:21:23 +0200 |
parents | 18566f9e1831 |
children | 8c66c9c2257b |
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.cpp Tue Aug 27 14:26:04 2019 +0200 +++ b/Core/Images/ImageProcessing.cpp Wed Aug 28 12:21:23 2019 +0200 @@ -378,11 +378,11 @@ { float v = (static_cast<float>(*p) + offset) * scaling; - if (v > maxFloatValue) + if (v >= maxFloatValue) { *p = maxPixelValue; } - else if (v < minFloatValue) + else if (v <= minFloatValue) { *p = minPixelValue; } @@ -1090,6 +1090,17 @@ } return; + case PixelFormat_Float32: + if (useRound) + { + ShiftScaleInternal<float, true>(image, offset, scaling); + } + else + { + ShiftScaleInternal<float, false>(image, offset, scaling); + } + return; + default: throw OrthancException(ErrorCode_NotImplemented); }