changeset 287:ec1af1fdcaca

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Nov 2020 17:33:32 +0100
parents adb5324ce1e8
children 0f5c02eebe20
files Plugin/DecodedImageAdapter.cpp Plugin/Plugin.cpp Plugin/SeriesInformationAdapter.cpp Plugin/ViewerToolbox.cpp
diffstat 4 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/DecodedImageAdapter.cpp	Tue Aug 04 14:15:14 2020 +0200
+++ b/Plugin/DecodedImageAdapter.cpp	Fri Nov 06 17:33:32 2020 +0100
@@ -25,6 +25,7 @@
 
 #include <Images/ImageBuffer.h>
 #include <Images/ImageProcessing.h>
+#include <Logging.h>
 #include <OrthancException.h>
 #include <Toolbox.h>
 
@@ -288,12 +289,15 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageSize);
     }
 
-    for (unsigned int y = 0; y < source.GetHeight(); y++)
+    const unsigned int width = source.GetWidth();
+    const unsigned int height = source.GetHeight();
+
+    for (unsigned int y = 0; y < height; y++)
     {
       const uint16_t* p = reinterpret_cast<const uint16_t*>(source.GetConstRow(y));
       uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y));
 
-      for (unsigned int x = 0; x < source.GetWidth(); x++)
+      for (unsigned int x = 0; x < width; x++)
       {
         q[0] = p[0] >> 8;
         q[1] = p[1] >> 8;
@@ -387,12 +391,15 @@
     const float minValue = static_cast<float>(std::numeric_limits<TargetType>::min());
     const float maxValue = static_cast<float>(std::numeric_limits<TargetType>::max());
 
-    for (unsigned int y = 0; y < source.GetHeight(); y++)
+    const unsigned int width = source.GetWidth();
+    const unsigned int height = source.GetHeight();
+
+    for (unsigned int y = 0; y < height; y++)
     {
       const SourceType* p = reinterpret_cast<const SourceType*>(source.GetConstRow(y));
       TargetType* q = reinterpret_cast<TargetType*>(target.GetRow(y));
 
-      for (unsigned int x = 0; x < source.GetWidth(); x++, p++, q++)
+      for (unsigned int x = 0; x < width; x++, p++, q++)
       {
         float v = (scale * static_cast<float>(*p)) + offset;
 
--- a/Plugin/Plugin.cpp	Tue Aug 04 14:15:14 2020 +0200
+++ b/Plugin/Plugin.cpp	Fri Nov 06 17:33:32 2020 +0100
@@ -26,6 +26,7 @@
 #include "SeriesInformationAdapter.h"
 
 #include <DicomFormat/DicomMap.h>
+#include <Logging.h>
 #include <OrthancException.h>
 #include <SystemToolbox.h>
 #include <Toolbox.h>
--- a/Plugin/SeriesInformationAdapter.cpp	Tue Aug 04 14:15:14 2020 +0200
+++ b/Plugin/SeriesInformationAdapter.cpp	Fri Nov 06 17:33:32 2020 +0100
@@ -23,6 +23,8 @@
 
 #include "ViewerToolbox.h"
 
+#include <Logging.h>
+
 #include <boost/regex.hpp>
 
 namespace OrthancPlugins
--- a/Plugin/ViewerToolbox.cpp	Tue Aug 04 14:15:14 2020 +0200
+++ b/Plugin/ViewerToolbox.cpp	Fri Nov 06 17:33:32 2020 +0100
@@ -21,6 +21,7 @@
 
 #include "ViewerToolbox.h"
 
+#include <Logging.h>
 #include <OrthancException.h>
 #include <Toolbox.h>