changeset 4881:e1ef13ae8fbd

added warning message in DicomImageInformation()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 31 Jan 2022 17:21:06 +0100
parents 81dfdcf16e16
children 6971ea27a2a9
files OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp	Wed Jan 19 17:06:22 2022 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp	Mon Jan 31 17:21:06 2022 +0100
@@ -42,6 +42,16 @@
 {
   DicomImageInformation::DicomImageInformation(const DicomMap& values)
   {
+    std::string sopClassUid;
+    if (values.LookupStringValue(sopClassUid, DICOM_TAG_SOP_CLASS_UID, false))
+    {
+      sopClassUid = Toolbox::StripSpaces(sopClassUid);
+      if (sopClassUid == "1.2.840.10008.5.1.4.1.1.481.3" /* RT-STRUCT */)
+      {
+        LOG(WARNING) << "Orthanc::DicomImageInformation() should not be applied to SOP Class UID: " << sopClassUid;
+      }
+    }
+
     uint32_t pixelRepresentation = 0;
     uint32_t planarConfiguration = 0;