Mercurial > hg > orthanc
annotate OrthancFramework/Sources/DicomFormat/DicomMap.h @ 4127:5be586c6a23e framework-lgpl
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 20:28:09 +0200 |
parents | bf7b9edf6b81 |
children | 3b70a2e6a06c |
rev | line source |
---|---|
0 | 1 /** |
59 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1228
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
3640
94f4a18a79cc
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3551
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public License |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 * the License, or (at your option) any later version. |
136 | 11 * |
0 | 12 * This program is distributed in the hope that it will be useful, but |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 * Lesser General Public License for more details. |
0 | 16 * |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 * License along with this program. If not, see |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 * <http://www.gnu.org/licenses/>. |
0 | 20 **/ |
21 | |
22 | |
23 #pragma once | |
24 | |
25 #include "DicomTag.h" | |
26 #include "DicomValue.h" | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
27 #include "../Enumerations.h" |
0 | 28 |
567 | 29 #include <set> |
0 | 30 #include <map> |
31 #include <json/json.h> | |
32 | |
59 | 33 namespace Orthanc |
0 | 34 { |
3992
f9863630ec7f
working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3840
diff
changeset
|
35 class ORTHANC_PUBLIC DicomMap : public boost::noncopyable |
0 | 36 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
37 public: |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
38 typedef std::map<DicomTag, DicomValue*> Content; |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
39 |
0 | 40 private: |
41 friend class DicomArray; | |
42 friend class FromDcmtkBridge; | |
2202
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2008
diff
changeset
|
43 friend class ParsedDicomFile; |
0 | 44 |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
45 Content content_; |
0 | 46 |
47 // Warning: This takes the ownership of "value" | |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
48 void SetValueInternal(uint16_t group, |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
49 uint16_t element, |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
50 DicomValue* value); |
0 | 51 |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
52 static void GetMainDicomTagsInternal(std::set<DicomTag>& result, |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
53 ResourceType level); |
0 | 54 |
55 public: | |
56 DicomMap() | |
57 { | |
58 } | |
59 | |
60 ~DicomMap() | |
61 { | |
62 Clear(); | |
63 } | |
1331
77e129ba64e4
Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1310
diff
changeset
|
64 |
77e129ba64e4
Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1310
diff
changeset
|
65 size_t GetSize() const |
77e129ba64e4
Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1310
diff
changeset
|
66 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
67 return content_.size(); |
1331
77e129ba64e4
Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1310
diff
changeset
|
68 } |
1310
61ce8147f30d
custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1288
diff
changeset
|
69 |
61ce8147f30d
custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1288
diff
changeset
|
70 DicomMap* Clone() const; |
0 | 71 |
1310
61ce8147f30d
custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1288
diff
changeset
|
72 void Assign(const DicomMap& other); |
0 | 73 |
74 void Clear(); | |
75 | |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
76 void SetNullValue(uint16_t group, |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
77 uint16_t element) |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
78 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
79 SetValueInternal(group, element, new DicomValue); |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
80 } |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
81 |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
82 void SetNullValue(const DicomTag& tag) |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
83 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
84 SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue); |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
85 } |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
86 |
0 | 87 void SetValue(uint16_t group, |
88 uint16_t element, | |
89 const DicomValue& value) | |
90 { | |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
91 SetValueInternal(group, element, value.Clone()); |
0 | 92 } |
93 | |
94 void SetValue(const DicomTag& tag, | |
95 const DicomValue& value) | |
96 { | |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
97 SetValueInternal(tag.GetGroup(), tag.GetElement(), value.Clone()); |
0 | 98 } |
99 | |
100 void SetValue(const DicomTag& tag, | |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
101 const std::string& str, |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
102 bool isBinary) |
0 | 103 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
104 SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue(str, isBinary)); |
0 | 105 } |
106 | |
107 void SetValue(uint16_t group, | |
108 uint16_t element, | |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
109 const std::string& str, |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
110 bool isBinary) |
0 | 111 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
112 SetValueInternal(group, element, new DicomValue(str, isBinary)); |
0 | 113 } |
114 | |
115 bool HasTag(uint16_t group, uint16_t element) const | |
116 { | |
117 return HasTag(DicomTag(group, element)); | |
118 } | |
119 | |
120 bool HasTag(const DicomTag& tag) const | |
121 { | |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
122 return content_.find(tag) != content_.end(); |
0 | 123 } |
124 | |
125 const DicomValue& GetValue(uint16_t group, uint16_t element) const | |
126 { | |
127 return GetValue(DicomTag(group, element)); | |
128 } | |
129 | |
130 const DicomValue& GetValue(const DicomTag& tag) const; | |
131 | |
1228
e0f7014d39a4
Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1206
diff
changeset
|
132 // DO NOT delete the returned value! |
80 | 133 const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const |
134 { | |
135 return TestAndGetValue(DicomTag(group, element)); | |
136 } | |
137 | |
1228
e0f7014d39a4
Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1206
diff
changeset
|
138 // DO NOT delete the returned value! |
80 | 139 const DicomValue* TestAndGetValue(const DicomTag& tag) const; |
140 | |
0 | 141 void Remove(const DicomTag& tag); |
142 | |
143 void ExtractPatientInformation(DicomMap& result) const; | |
144 | |
145 void ExtractStudyInformation(DicomMap& result) const; | |
146 | |
147 void ExtractSeriesInformation(DicomMap& result) const; | |
148 | |
149 void ExtractInstanceInformation(DicomMap& result) const; | |
150 | |
151 static void SetupFindPatientTemplate(DicomMap& result); | |
152 | |
153 static void SetupFindStudyTemplate(DicomMap& result); | |
154 | |
155 static void SetupFindSeriesTemplate(DicomMap& result); | |
156 | |
157 static void SetupFindInstanceTemplate(DicomMap& result); | |
158 | |
159 void CopyTagIfExists(const DicomMap& source, | |
160 const DicomTag& tag); | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
161 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
162 static bool IsMainDicomTag(const DicomTag& tag, ResourceType level); |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
163 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
164 static bool IsMainDicomTag(const DicomTag& tag); |
567 | 165 |
166 static void GetMainDicomTags(std::set<DicomTag>& result, ResourceType level); | |
167 | |
168 static void GetMainDicomTags(std::set<DicomTag>& result); | |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
169 |
1360 | 170 void GetTags(std::set<DicomTag>& tags) const; |
1749
99f4a05f39fa
various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1737
diff
changeset
|
171 |
3840
e7003b2203a7
fixing signature of DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3771
diff
changeset
|
172 static bool IsDicomFile(const void* dicom, |
3771
74889e6f6d68
fix memory issues if parsing invalid DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3690
diff
changeset
|
173 size_t size); |
74889e6f6d68
fix memory issues if parsing invalid DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3690
diff
changeset
|
174 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
175 static bool ParseDicomMetaInformation(DicomMap& result, |
3840
e7003b2203a7
fixing signature of DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3771
diff
changeset
|
176 const void* dicom, |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
177 size_t size); |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
178 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
179 void LogMissingTagsForStore() const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
180 |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
181 bool LookupStringValue(std::string& result, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
182 const DicomTag& tag, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
183 bool allowBinary) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
184 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
185 bool ParseInteger32(int32_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
186 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
187 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
188 bool ParseInteger64(int64_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
189 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
190 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
191 bool ParseUnsignedInteger32(uint32_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
192 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
193 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
194 bool ParseUnsignedInteger64(uint64_t& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
195 const DicomTag& tag) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
196 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
197 bool ParseFloat(float& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
198 const DicomTag& tag) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
199 |
3690
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
200 bool ParseFirstFloat(float& result, |
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
201 const DicomTag& tag) const; |
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
202 |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
203 bool ParseDouble(double& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
204 const DicomTag& tag) const; |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
205 |
3005
8265a6b56100
DicomMap::FromDicomAsJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2863
diff
changeset
|
206 void FromDicomAsJson(const Json::Value& dicomAsJson); |
3006
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
207 |
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
208 void Merge(const DicomMap& other); |
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
209 |
3678
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
210 void MergeMainDicomTags(const DicomMap& other, |
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
211 ResourceType level); |
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
212 |
3015
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3006
diff
changeset
|
213 void ExtractMainDicomTags(const DicomMap& other); |
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3006
diff
changeset
|
214 |
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3006
diff
changeset
|
215 bool HasOnlyMainDicomTags() const; |
3005
8265a6b56100
DicomMap::FromDicomAsJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2863
diff
changeset
|
216 |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
217 void Serialize(Json::Value& target) const; |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
218 |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
219 void Unserialize(const Json::Value& source); |
3496
109631ed3564
DicomMap::FromDicomWeb()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
220 |
109631ed3564
DicomMap::FromDicomWeb()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
221 void FromDicomWeb(const Json::Value& source); |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
222 |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
223 std::string GetStringValue(const DicomTag& tag, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
224 const std::string& defaultValue, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
225 bool allowBinary) const; |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
226 |
3551
173c7f363d8f
DicomMap::RemoveBinaryTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3518
diff
changeset
|
227 void RemoveBinaryTags(); |
173c7f363d8f
DicomMap::RemoveBinaryTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3518
diff
changeset
|
228 |
3650
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
229 void DumpMainDicomTags(Json::Value& target, |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
230 ResourceType level) const; |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
231 |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
232 void ParseMainDicomTags(const Json::Value& source, |
3650
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
233 ResourceType level); |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
234 |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
235 void Print(FILE* fp) const; // For debugging only |
0 | 236 }; |
237 } |