# HG changeset patch # User Sebastien Jodogne # Date 1645513326 -3600 # Node ID d959cf2a8d5cdfef064422e593b179c5939859ed # Parent fb7d62e3235e719163ea7c260a264bba8e08e288 cppcheck diff -r fb7d62e3235e -r d959cf2a8d5c Plugin/DecodedImageAdapter.cpp --- a/Plugin/DecodedImageAdapter.cpp Mon Feb 21 17:16:10 2022 +0100 +++ b/Plugin/DecodedImageAdapter.cpp Tue Feb 22 08:02:06 2022 +0100 @@ -186,7 +186,7 @@ bool DecodedImageAdapter::GetCornerstoneMetadata(Json::Value& result, const Json::Value& tags, - OrthancImage& image) + const OrthancImage& image) { float windowCenter, windowWidth; @@ -307,7 +307,7 @@ bool DecodedImageAdapter::EncodeUsingDeflate(Json::Value& result, - OrthancImage& image) + const OrthancImage& image) { Orthanc::ImageAccessor accessor; accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(), @@ -421,7 +421,7 @@ bool DecodedImageAdapter::EncodeUsingJpeg(Json::Value& result, - OrthancImage& image, + const OrthancImage& image, uint8_t quality /* between 0 and 100 */) { Orthanc::ImageAccessor accessor; diff -r fb7d62e3235e -r d959cf2a8d5c Plugin/DecodedImageAdapter.h --- a/Plugin/DecodedImageAdapter.h Mon Feb 21 17:16:10 2022 +0100 +++ b/Plugin/DecodedImageAdapter.h Tue Feb 22 08:02:06 2022 +0100 @@ -25,6 +25,8 @@ #include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" #include "Cache/ICacheFactory.h" +#include + #include #include @@ -48,13 +50,13 @@ static bool GetCornerstoneMetadata(Json::Value& result, const Json::Value& tags, - OrthancImage& image); + const OrthancImage& image); static bool EncodeUsingDeflate(Json::Value& result, - OrthancImage& image); + const OrthancImage& image); static bool EncodeUsingJpeg(Json::Value& result, - OrthancImage& image, + const OrthancImage& image, uint8_t quality /* between 0 and 100 */); OrthancPluginContext* context_; @@ -66,6 +68,6 @@ } virtual bool Create(std::string& content, - const std::string& uri); + const std::string& uri) ORTHANC_OVERRIDE; }; }