# HG changeset patch # User Sebastien Jodogne # Date 1744621065 -7200 # Node ID 7fa1522f45696578e958185b4942fcc319ddb31f # Parent f83778f202f597b28a9bdc52bc40d530b3ded18f fix compatibility with Orthanc >= 1.12.5 diff -r f83778f202f5 -r 7fa1522f4569 NEWS --- 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) ======================== diff -r f83778f202f5 -r 7fa1522f4569 Plugin/SeriesInformationAdapter.cpp --- 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) {