changeset 132:2fffa4d0f313

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 31 May 2016 12:12:59 +0200
parents f6c88aa6efe0 (diff) 69477d40afe9 (current diff)
children 3251ec958a29
files Orthanc/Core/Images/ImageProcessing.cpp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Orthanc/Core/Images/ImageProcessing.cpp	Wed May 25 08:05:25 2016 +0200
+++ b/Orthanc/Core/Images/ImageProcessing.cpp	Tue May 31 12:12:59 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);
     }