Mercurial > hg > orthanc
diff Plugins/Samples/Common/DicomPath.cpp @ 3381:a6c590cb8181
OrthancPlugins::DicomPath::SetPrefixIndex()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 May 2019 07:33:10 +0200 |
parents | 4e43e67f8ecf |
children | 46a8050583a1 |
line wrap: on
line diff
--- a/Plugins/Samples/Common/DicomPath.cpp Thu May 23 12:06:26 2019 +0200 +++ b/Plugins/Samples/Common/DicomPath.cpp Tue May 28 07:33:10 2019 +0200 @@ -50,6 +50,19 @@ } + DicomPath::Prefix& DicomPath::GetPrefixItem(size_t depth) + { + if (depth >= prefix_.size()) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange); + } + else + { + return prefix_[depth]; + } + } + + DicomPath::DicomPath(const DicomTag& sequence, size_t index, const DicomTag& tag) :