diff Core/DicomFormat/DicomIntegerPixelAccessor.cpp @ 2279:16e45af17a4d

Ability to retrieve raw frames encoded as unsigned 32-bits integers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 May 2017 10:33:17 +0200
parents a3a65de1840f
children 878b59270859
line wrap: on
line diff
--- a/Core/DicomFormat/DicomIntegerPixelAccessor.cpp	Wed May 17 22:05:34 2017 +0200
+++ b/Core/DicomFormat/DicomIntegerPixelAccessor.cpp	Fri May 19 10:33:17 2017 +0200
@@ -54,6 +54,13 @@
     pixelData_(pixelData),
     size_(size)
   {
+    if (information_.GetBitsAllocated() > 32 ||
+        information_.GetBitsStored() >= 32)
+    {
+      // Not available, as the accessor internally uses int32_t values
+      throw OrthancException(ErrorCode_NotImplemented);
+    }
+
     frame_ = 0;
     frameOffset_ = information_.GetFrameSize();