# HG changeset patch # User Sebastien Jodogne # Date 1604680412 -3600 # Node ID ec1af1fdcaca8fe67f8ee7ab0608aa682ece6707 # Parent adb5324ce1e804799e937b32462d2486254da902 fix build diff -r adb5324ce1e8 -r ec1af1fdcaca Plugin/DecodedImageAdapter.cpp --- 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 #include +#include #include #include @@ -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(source.GetConstRow(y)); uint8_t* q = reinterpret_cast(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(std::numeric_limits::min()); const float maxValue = static_cast(std::numeric_limits::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(source.GetConstRow(y)); TargetType* q = reinterpret_cast(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(*p)) + offset; diff -r adb5324ce1e8 -r ec1af1fdcaca Plugin/Plugin.cpp --- 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 +#include #include #include #include diff -r adb5324ce1e8 -r ec1af1fdcaca Plugin/SeriesInformationAdapter.cpp --- 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 + #include namespace OrthancPlugins diff -r adb5324ce1e8 -r ec1af1fdcaca Plugin/ViewerToolbox.cpp --- 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 #include #include