Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomFormat/DicomArray.cpp @ 5323:138e9d0c08c1
added DicomMap::GuessPixelDataValueRepresentation()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 25 Jun 2023 12:29:39 +0200 |
parents | 0ea402b4d901 |
children | 48b8dae6dc77 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomArray.cpp Sun Jun 25 11:48:47 2023 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomArray.cpp Sun Jun 25 12:29:39 2023 +0200 @@ -86,7 +86,21 @@ { DicomTag t = elements_[i]->GetTag(); const DicomValue& v = elements_[i]->GetValue(); - std::string s = v.IsNull() ? "(null)" : v.GetContent(); + + std::string s; + if (v.IsNull()) + { + s = "(null)"; + } + else if (v.IsSequence()) + { + s = "(sequence)"; + } + else + { + s = v.GetContent(); + } + printf("0x%04x 0x%04x [%s]\n", t.GetGroup(), t.GetElement(), s.c_str()); } }