Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp @ 4951:e100fd9db29b
enlarged support of tags with UN value representation in ITagVisitor
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Mar 2022 08:48:46 +0100 |
parents | 43e613a7756b |
children | 60cb4b379485 |
comparison
equal
deleted
inserted
replaced
4949:49bd6504f15e | 4951:e100fd9db29b |
---|---|
2599 data[l] != 0) | 2599 data[l] != 0) |
2600 { | 2600 { |
2601 l++; | 2601 l++; |
2602 } | 2602 } |
2603 | 2603 |
2604 if (l == length) | 2604 std::string ignored; |
2605 { | 2605 std::string s(reinterpret_cast<const char*>(data), l); |
2606 // Not a null-terminated plain string | 2606 action = visitor.VisitString(ignored, parentTags, parentIndexes, tag, vr, |
2607 action = visitor.VisitNotSupported(parentTags, parentIndexes, tag, vr); | 2607 Toolbox::ConvertToUtf8(s, encoding, hasCodeExtensions)); |
2608 } | |
2609 else | |
2610 { | |
2611 std::string ignored; | |
2612 std::string s(reinterpret_cast<const char*>(data), l); | |
2613 action = visitor.VisitString(ignored, parentTags, parentIndexes, tag, vr, | |
2614 Toolbox::ConvertToUtf8(s, encoding, hasCodeExtensions)); | |
2615 } | |
2616 } | 2608 } |
2617 else | 2609 else |
2618 { | 2610 { |
2619 action = visitor.VisitNotSupported(parentTags, parentIndexes, tag, vr); | 2611 action = visitor.VisitNotSupported(parentTags, parentIndexes, tag, vr); |
2620 } | 2612 } |