Mercurial > hg > orthanc
diff OrthancServer/Sources/ServerContext.cpp @ 4203:4d42408da117
improving const-correctness in ParsedDicomFile
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 17 Sep 2020 15:01:31 +0200 |
parents | 37310bb1cd30 |
children | d962a2996637 |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp Thu Sep 17 08:35:11 2020 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Thu Sep 17 15:01:31 2020 +0200 @@ -1440,8 +1440,7 @@ // Use Orthanc's built-in decoder, using the cache to speed-up // things on multi-frame images ServerContext::DicomCacheLocker locker(*this, publicId); - std::unique_ptr<ImageAccessor> decoded( - DicomImageDecoder::Decode(locker.GetDicom(), frameIndex)); + std::unique_ptr<ImageAccessor> decoded(locker.GetDicom().DecodeFrame(frameIndex)); if (decoded.get() != NULL) { return decoded.release(); @@ -1472,7 +1471,7 @@ if (builtinDecoderTranscoderOrder_ == BuiltinDecoderTranscoderOrder_After) { ServerContext::DicomCacheLocker locker(*this, publicId); - return DicomImageDecoder::Decode(locker.GetDicom(), frameIndex); + return locker.GetDicom().DecodeFrame(frameIndex); } else { @@ -1486,8 +1485,7 @@ { if (builtinDecoderTranscoderOrder_ == BuiltinDecoderTranscoderOrder_Before) { - std::unique_ptr<ImageAccessor> decoded( - DicomImageDecoder::Decode(dicom.GetParsedDicomFile(), frameIndex)); + std::unique_ptr<ImageAccessor> decoded(dicom.GetParsedDicomFile().DecodeFrame(frameIndex)); if (decoded.get() != NULL) { return decoded.release(); @@ -1514,7 +1512,7 @@ if (builtinDecoderTranscoderOrder_ == BuiltinDecoderTranscoderOrder_After) { - return DicomImageDecoder::Decode(dicom.GetParsedDicomFile(), frameIndex); + return dicom.GetParsedDicomFile().DecodeFrame(frameIndex); } else {