# HG changeset patch # User Sebastien Jodogne # Date 1606416687 -3600 # Node ID 9cc84d0fbea95e7fd9e3563543b63e3dd8475804 # Parent 8121a16faf3ed16602bb3488c7f7e21f15a5e7fd Extrapolate mode doesn't fail if no consensus is found in WADO-RS Retrieve Metadata diff -r 8121a16faf3e -r 9cc84d0fbea9 NEWS --- a/NEWS Fri Nov 06 17:54:09 2020 +0100 +++ b/NEWS Thu Nov 26 19:51:27 2020 +0100 @@ -1,6 +1,9 @@ Pending changes in the mainline =============================== +* "Extrapolate" mode doesn't fail if no consensus is found in WADO-RS Retrieve Metadata. + This is necessary for proper behavior of the Stone Web viewer on very small series. + Version 1.3 (2020-10-19) ======================== diff -r 8121a16faf3e -r 9cc84d0fbea9 Plugin/WadoRs.cpp --- a/Plugin/WadoRs.cpp Fri Nov 06 17:54:09 2020 +0100 +++ b/Plugin/WadoRs.cpp Thu Nov 26 19:51:27 2020 +0100 @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -394,11 +395,14 @@ ++current; } + target.SetValue(tag, maxValue, false); + // Take the ceiling of the number of available instances const size_t threshold = instances_.size() / 2 + 1; - if (maxCount >= threshold) + if (maxCount < threshold) { - target.SetValue(tag, maxValue, false); + LOG(WARNING) << "No consensus on the value of a tag during WADO-RS Retrieve " + << "Metadata in Extrapolate mode: " << tag.Format(); } } }