comparison Plugin/DecodedImageAdapter.cpp @ 304:d959cf2a8d5c

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Feb 2022 08:02:06 +0100
parents fb7d62e3235e
children 0a1ad7492050
comparison
equal deleted inserted replaced
303:fb7d62e3235e 304:d959cf2a8d5c
184 } 184 }
185 185
186 186
187 bool DecodedImageAdapter::GetCornerstoneMetadata(Json::Value& result, 187 bool DecodedImageAdapter::GetCornerstoneMetadata(Json::Value& result,
188 const Json::Value& tags, 188 const Json::Value& tags,
189 OrthancImage& image) 189 const OrthancImage& image)
190 { 190 {
191 float windowCenter, windowWidth; 191 float windowCenter, windowWidth;
192 192
193 Orthanc::ImageAccessor accessor; 193 Orthanc::ImageAccessor accessor;
194 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(), 194 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(),
305 } 305 }
306 } 306 }
307 307
308 308
309 bool DecodedImageAdapter::EncodeUsingDeflate(Json::Value& result, 309 bool DecodedImageAdapter::EncodeUsingDeflate(Json::Value& result,
310 OrthancImage& image) 310 const OrthancImage& image)
311 { 311 {
312 Orthanc::ImageAccessor accessor; 312 Orthanc::ImageAccessor accessor;
313 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(), 313 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(),
314 image.GetHeight(), image.GetPitch(), image.GetBuffer()); 314 image.GetHeight(), image.GetPitch(), image.GetBuffer());
315 315
419 } 419 }
420 } 420 }
421 421
422 422
423 bool DecodedImageAdapter::EncodeUsingJpeg(Json::Value& result, 423 bool DecodedImageAdapter::EncodeUsingJpeg(Json::Value& result,
424 OrthancImage& image, 424 const OrthancImage& image,
425 uint8_t quality /* between 0 and 100 */) 425 uint8_t quality /* between 0 and 100 */)
426 { 426 {
427 Orthanc::ImageAccessor accessor; 427 Orthanc::ImageAccessor accessor;
428 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(), 428 accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetPixelFormat()), image.GetWidth(),
429 image.GetHeight(), image.GetPitch(), image.GetBuffer()); 429 image.GetHeight(), image.GetPitch(), image.GetBuffer());