Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Loaders/LoadedDicomResources.h @ 1896:b3c08e607d9f
simplified signature of DicomStructureSet::ProjectStructure()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Jan 2022 17:19:37 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
rev | line source |
---|---|
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Stone of Orthanc |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * the License, or (at your option) any later version. |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
16 * Lesser General Public License for more details. |
1596
4fb8fdf03314
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
17 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
19 * License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 **/ |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 #pragma once |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
1455
30deba7bc8e2
simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1306
diff
changeset
|
26 #include <DicomFormat/DicomMap.h> |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 namespace OrthancStone |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
1306
fef1ec42a7db
Some docs + headers added to CMake for easier VS browsing + tiny predecl
Benjamin Golinvaux <bgo@osimis.io>
parents:
1271
diff
changeset
|
31 /** |
fef1ec42a7db
Some docs + headers added to CMake for easier VS browsing + tiny predecl
Benjamin Golinvaux <bgo@osimis.io>
parents:
1271
diff
changeset
|
32 Stores an indexed collection of DicomMap objects. The index is a |
fef1ec42a7db
Some docs + headers added to CMake for easier VS browsing + tiny predecl
Benjamin Golinvaux <bgo@osimis.io>
parents:
1271
diff
changeset
|
33 user-specified DicomTag. |
fef1ec42a7db
Some docs + headers added to CMake for easier VS browsing + tiny predecl
Benjamin Golinvaux <bgo@osimis.io>
parents:
1271
diff
changeset
|
34 */ |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 class LoadedDicomResources : public boost::noncopyable |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 private: |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
38 class Resource : public boost::noncopyable |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
39 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
40 private: |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
41 std::unique_ptr<Orthanc::DicomMap> dicom_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
42 std::unique_ptr<Json::Value> sourceJson_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
43 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
44 public: |
1825
d6b83b4cedcd
StoneWebViewer-2.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
45 explicit Resource(const Orthanc::DicomMap& dicom); |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
46 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
47 Resource* Clone() const; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
48 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
49 const Orthanc::DicomMap& GetDicom() const |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
50 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
51 return *dicom_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
52 } |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
54 bool HasSourceJson() const |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
55 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
56 return sourceJson_.get() != NULL; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
57 } |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
58 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
59 const Json::Value& GetSourceJson() const; |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
61 void SetSourceJson(const Json::Value& json); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
62 }; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
63 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
64 typedef std::map<std::string, Resource*> Resources; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
65 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
66 Orthanc::DicomTag indexedTag_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
67 Resources resources_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
68 std::vector<Resource*> flattened_; |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
69 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
70 void AddResourceInternal(Resource* resource); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
71 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
72 const Resource& GetResourceInternal(size_t index); |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 void AddFromDicomWebInternal(const Json::Value& dicomweb); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 public: |
1571 | 77 explicit LoadedDicomResources(const Orthanc::DicomTag& indexedTag) : |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 indexedTag_(indexedTag) |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 // Re-index another set of resources using another tag |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 LoadedDicomResources(const LoadedDicomResources& other, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 const Orthanc::DicomTag& indexedTag); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 ~LoadedDicomResources() |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 Clear(); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 const Orthanc::DicomTag& GetIndexedTag() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 return indexedTag_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 void Clear(); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 size_t GetSize() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 return resources_.size(); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
103 const Orthanc::DicomMap& GetResource(size_t index) |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
104 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
105 return GetResourceInternal(index).GetDicom(); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
106 } |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 bool HasResource(const std::string& id) const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 return resources_.find(id) != resources_.end(); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 } |
1250
a8248b08115c
LoadedDicomResources::MergeResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1228
diff
changeset
|
112 |
1862
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
113 void RemoveResource(const std::string& id) |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
114 { |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
115 if (HasResource(id)) |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
116 { |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
117 Resource* resource = resources_[id]; |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
118 delete resource; |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
119 resources_.erase(id); |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
120 flattened_.clear(); // Invalidate the flattened version |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
121 } |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
122 } |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1825
diff
changeset
|
123 |
1250
a8248b08115c
LoadedDicomResources::MergeResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1228
diff
changeset
|
124 void MergeResource(Orthanc::DicomMap& target, |
a8248b08115c
LoadedDicomResources::MergeResource()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1228
diff
changeset
|
125 const std::string& id) const; |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 bool LookupStringValue(std::string& target, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 const std::string& id, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 const Orthanc::DicomTag& tag) const; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 void AddResource(const Orthanc::DicomMap& dicom); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 void AddFromOrthanc(const Json::Value& tags); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 void AddFromDicomWeb(const Json::Value& dicomweb); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 bool LookupTagValueConsensus(std::string& target, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 const Orthanc::DicomTag& tag) const; |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
139 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
140 bool HasSourceJson(size_t index) |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
141 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
142 return GetResourceInternal(index).HasSourceJson(); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
143 } |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
144 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
145 const Json::Value& GetSourceJson(size_t index) |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
146 { |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
147 return GetResourceInternal(index).GetSourceJson(); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
148 } |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 } |