changeset 365:71bbdc4b4790

fix handling of "Image Type" in the viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Feb 2025 17:54:25 +0100 (3 months ago)
parents 6fe353ea719c
children 465aef69a587
files Framework/Inputs/DicomPyramid.cpp NEWS
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Inputs/DicomPyramid.cpp	Fri Jan 17 12:43:40 2025 +0100
+++ b/Framework/Inputs/DicomPyramid.cpp	Wed Feb 19 17:54:25 2025 +0100
@@ -98,10 +98,15 @@
         std::vector<std::string> tokens;
         Orthanc::Toolbox::TokenizeString(tokens, instance->GetImageType(), '\\');
 
-        // Don't consider the thumbnail and overview as part of the DICOM pyramid (new in 1.0)
-        if (tokens.size() < 2 ||
-            (tokens[1] != "THUMBNAIL" &&
-             tokens[1] != "OVERVIEW"))
+        /**
+         * Don't consider the "LABEL" and "OVERVIEW" that are not part
+         * of the pyramid. Originally introduced in release 1.0, but
+         * fixed in release 3.1.
+         * https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.12.4.html#sect_C.8.12.4.1.1
+         **/
+        if (tokens.size() < 3 ||
+            tokens[2] == "VOLUME" ||
+            tokens[2] == "THUMBNAIL" /* "may be the apex (lowest resolution) layer of a Multi-Resolution Pyramid" */)
         {
           if (instance->HasBackgroundColor())
           {
--- a/NEWS	Fri Jan 17 12:43:40 2025 +0100
+++ b/NEWS	Wed Feb 19 17:54:25 2025 +0100
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* Fix handling of "Image Type" in the viewer for compatibility with other vendors
+
 
 Version 3.0 (2024-12-20)
 ========================