Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomFormat/DicomPath.cpp @ 4689:ead3b81f4541
added DicomPath::SetPrefixIndex()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Jun 2021 10:54:14 +0200 |
parents | 693f049729ba |
children | 13efc0967cea |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomPath.cpp Thu Jun 10 10:09:54 2021 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomPath.cpp Thu Jun 10 10:54:14 2021 +0200 @@ -63,6 +63,13 @@ } + void DicomPath::PrefixItem::SetIndex(size_t index) + { + isUniversal_ = false; + index_ = index; + } + + DicomTag DicomPath::ParseTag(const std::string& token) { DicomTag tag(0,0); @@ -189,6 +196,20 @@ } + void DicomPath::SetPrefixIndex(size_t level, + size_t index) + { + if (level >= prefix_.size()) + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + else + { + prefix_[level].SetIndex(index); + } + } + + std::string DicomPath::Format() const { std::string s;