diff OrthancServer/ParsedDicomFile.cpp @ 853:839be3022203 jpeg

DicomImageInformation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Jun 2014 11:45:16 +0200
parents 84513f2ee1f3
children 87791ebc1f50
line wrap: on
line diff
--- a/OrthancServer/ParsedDicomFile.cpp	Fri Jun 06 10:28:02 2014 +0200
+++ b/OrthancServer/ParsedDicomFile.cpp	Fri Jun 06 11:45:16 2014 +0200
@@ -999,15 +999,15 @@
                                       DicomIntegerPixelAccessor& accessor,
                                       PixelFormat format)
   {
-    assert(accessor.GetChannelCount() == 1);
+    assert(accessor.GetInformation().GetChannelCount() == 1);
 
     PngWriter w;
 
-    std::vector<T> image(accessor.GetWidth() * accessor.GetHeight(), 0);
+    std::vector<T> image(accessor.GetInformation().GetWidth() * accessor.GetInformation().GetHeight(), 0);
     T* pixel = &image[0];
-    for (unsigned int y = 0; y < accessor.GetHeight(); y++)
+    for (unsigned int y = 0; y < accessor.GetInformation().GetHeight(); y++)
     {
-      for (unsigned int x = 0; x < accessor.GetWidth(); x++, pixel++)
+      for (unsigned int x = 0; x < accessor.GetInformation().GetWidth(); x++, pixel++)
       {
         int32_t v = accessor.GetValue(x, y);
         if (v < static_cast<int32_t>(std::numeric_limits<T>::min()))
@@ -1019,8 +1019,8 @@
       }
     }
 
-    w.WriteToMemory(result, accessor.GetWidth(), accessor.GetHeight(),
-                    accessor.GetWidth() * sizeof(T), format, &image[0]);
+    w.WriteToMemory(result, accessor.GetInformation().GetWidth(), accessor.GetInformation().GetHeight(),
+                    accessor.GetInformation().GetWidth() * sizeof(T), format, &image[0]);
   }