Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/ParsedDicomDataset.cpp @ 1504:d8af188ab545
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2020 20:35:16 +0200 |
parents | 0ca50d275b9a |
children |
comparison
equal
deleted
inserted
replaced
1503:553084468225 | 1504:d8af188ab545 |
---|---|
24 #include <dcmtk/dcmdata/dcfilefo.h> | 24 #include <dcmtk/dcmdata/dcfilefo.h> |
25 | 25 |
26 namespace OrthancStone | 26 namespace OrthancStone |
27 { | 27 { |
28 static DcmItem* LookupPath(Orthanc::ParsedDicomFile& dicom, | 28 static DcmItem* LookupPath(Orthanc::ParsedDicomFile& dicom, |
29 const OrthancPlugins::DicomPath& path) | 29 const DicomPath& path) |
30 { | 30 { |
31 DcmItem* node = dicom.GetDcmtkObject().getDataset(); | 31 DcmItem* node = dicom.GetDcmtkObject().getDataset(); |
32 | 32 |
33 for (size_t i = 0; i < path.GetPrefixLength(); i++) | 33 for (size_t i = 0; i < path.GetPrefixLength(); i++) |
34 { | 34 { |
35 const OrthancPlugins::DicomTag& tmp = path.GetPrefixTag(i); | 35 const Orthanc::DicomTag& tmp = path.GetPrefixTag(i); |
36 DcmTagKey tag(tmp.GetGroup(), tmp.GetElement()); | 36 DcmTagKey tag(tmp.GetGroup(), tmp.GetElement()); |
37 | 37 |
38 DcmSequenceOfItems* sequence = NULL; | 38 DcmSequenceOfItems* sequence = NULL; |
39 if (!node->findAndGetSequence(tag, sequence).good() || | 39 if (!node->findAndGetSequence(tag, sequence).good() || |
40 sequence == NULL) | 40 sequence == NULL) |
58 return node; | 58 return node; |
59 } | 59 } |
60 | 60 |
61 | 61 |
62 bool ParsedDicomDataset::GetStringValue(std::string& result, | 62 bool ParsedDicomDataset::GetStringValue(std::string& result, |
63 const OrthancPlugins::DicomPath& path) const | 63 const DicomPath& path) const |
64 { | 64 { |
65 DcmItem* node = LookupPath(dicom_, path); | 65 DcmItem* node = LookupPath(dicom_, path); |
66 | 66 |
67 if (node != NULL) | 67 if (node != NULL) |
68 { | 68 { |
80 return false; | 80 return false; |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 bool ParsedDicomDataset::GetSequenceSize(size_t& size, | 84 bool ParsedDicomDataset::GetSequenceSize(size_t& size, |
85 const OrthancPlugins::DicomPath& path) const | 85 const DicomPath& path) const |
86 { | 86 { |
87 DcmItem* node = LookupPath(dicom_, path); | 87 DcmItem* node = LookupPath(dicom_, path); |
88 | 88 |
89 if (node != NULL) | 89 if (node != NULL) |
90 { | 90 { |