Mercurial > hg > orthanc-webviewer
changeset 326:7fa1522f4569
fix compatibility with Orthanc >= 1.12.5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 14 Apr 2025 10:57:45 +0200 (2 weeks ago) |
parents | f83778f202f5 |
children | cac667dbd179 |
files | NEWS Plugin/SeriesInformationAdapter.cpp |
diffstat | 2 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Sun Apr 06 15:14:04 2025 +0200 +++ b/NEWS Mon Apr 14 10:57:45 2025 +0200 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* Fix compatibility with Orthanc >= 1.12.5 (the images were not displayed) + Version 2.9 (2024-03-26) ========================
--- a/Plugin/SeriesInformationAdapter.cpp Sun Apr 06 15:14:04 2025 +0200 +++ b/Plugin/SeriesInformationAdapter.cpp Mon Apr 14 10:57:45 2025 +0200 @@ -36,11 +36,18 @@ { LOG(INFO) << "Ordering instances of series: " << seriesId; - Json::Value series, study, patient, ordered; - if (!GetJsonFromOrthanc(series, context_, "/series/" + seriesId) || - !GetJsonFromOrthanc(study, context_, "/studies/" + series["ID"].asString() + "/module?simplify") || - !GetJsonFromOrthanc(patient, context_, "/studies/" + series["ID"].asString() + "/module-patient?simplify") || - !GetJsonFromOrthanc(ordered, context_, "/series/" + series["ID"].asString() + "/ordered-slices") || + Json::Value series; + if (!GetJsonFromOrthanc(series, context_, "/series/" + seriesId)) + { + return false; + } + + const std::string studyId = series["ParentStudy"].asString(); + + Json::Value study, patient, ordered; + if (!GetJsonFromOrthanc(study, context_, "/studies/" + studyId + "/module?simplify") || + !GetJsonFromOrthanc(patient, context_, "/studies/" + studyId + "/module-patient?simplify") || + !GetJsonFromOrthanc(ordered, context_, "/series/" + seriesId + "/ordered-slices") || !series.isMember("Instances") || series["Instances"].type() != Json::arrayValue) {