Mercurial > hg > orthanc
changeset 1994:4d099fee5eca
ImageProcessing::Set for float images
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 May 2016 15:45:49 +0200 |
parents | e2a3ff770b48 |
children | f0acfa753973 |
files | Core/Images/ImageProcessing.cpp |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.cpp Sat May 14 13:41:42 2016 +0200 +++ b/Core/Images/ImageProcessing.cpp Tue May 17 15:45:49 2016 +0200 @@ -79,6 +79,8 @@ static void ConvertGrayscaleToFloat(ImageAccessor& target, const ImageAccessor& source) { + assert(sizeof(float) == 4); + for (unsigned int y = 0; y < source.GetHeight(); y++) { float* t = reinterpret_cast<float*>(target.GetRow(y)); @@ -539,6 +541,11 @@ SetInternal<int16_t>(image, value); return; + case PixelFormat_Float32: + assert(sizeof(float) == 4); + SetInternal<float>(image, value); + return; + default: throw OrthancException(ErrorCode_NotImplemented); }