annotate OrthancFramework/Sources/DicomFormat/DicomValue.cpp @ 4789:51ec061516c9

Fix handling of option "DeidentifyLogs", notably for tags (0010,0010) and (0010,0020)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 09 Sep 2021 13:02:33 +0200
parents add0337b928a
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4304
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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.
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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.
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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/>.
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #include "../PrecompiledHeaders.h"
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "DicomValue.h"
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "../OrthancException.h"
2863
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
27 #include "../SerializationToolbox.h"
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include "../Toolbox.h"
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
30 #include <boost/lexical_cast.hpp>
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
31
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace Orthanc
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
4297
785a2713323e abi continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4296
diff changeset
34 DicomValue::DicomValue() :
4296
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
35 type_(Type_Null)
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
36 {
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
37 }
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
38
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
39
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
40 DicomValue::DicomValue(const DicomValue& other) :
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 type_(other.type_),
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 content_(other.content_)
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 DicomValue::DicomValue(const std::string& content,
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 bool isBinary) :
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 type_(isBinary ? Type_Binary : Type_String),
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 content_(content)
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 DicomValue::DicomValue(const char* data,
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 size_t size,
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 bool isBinary) :
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 type_(isBinary ? Type_Binary : Type_String)
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 content_.assign(data, size);
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 const std::string& DicomValue::GetContent() const
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 if (type_ == Type_Null)
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 throw OrthancException(ErrorCode_BadParameterType);
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 else
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 return content_;
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
4296
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
76 bool DicomValue::IsNull() const
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
77 {
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
78 return type_ == Type_Null;
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
79 }
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
80
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
81 bool DicomValue::IsBinary() const
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
82 {
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
83 return type_ == Type_Binary;
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
84 }
3b70a2e6a06c moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
85
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 DicomValue* DicomValue::Clone() const
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 return new DicomValue(*this);
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 }
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
2139
764c9157301b cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
93 #if ORTHANC_ENABLE_BASE64 == 1
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 void DicomValue::FormatDataUriScheme(std::string& target,
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 const std::string& mime) const
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 {
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 Toolbox::EncodeBase64(target, GetContent());
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 target.insert(0, "data:" + mime + ";base64,");
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 }
4304
50b0c69b653a continued abi
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4297
diff changeset
100
50b0c69b653a continued abi
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4297
diff changeset
101 void DicomValue::FormatDataUriScheme(std::string& target) const
50b0c69b653a continued abi
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4297
diff changeset
102 {
50b0c69b653a continued abi
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4297
diff changeset
103 FormatDataUriScheme(target, MIME_BINARY);
50b0c69b653a continued abi
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4297
diff changeset
104 }
1761
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1738
diff changeset
105 #endif
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1738
diff changeset
106
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
107 bool DicomValue::ParseInteger32(int32_t& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
108 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
109 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
110 IsNull())
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
111 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
112 return false;
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
113 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
114 else
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
115 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
116 return SerializationToolbox::ParseInteger32(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
117 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
118 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
119
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
120 bool DicomValue::ParseInteger64(int64_t& result) const
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
121 {
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
122 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
123 IsNull())
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
124 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
125 return false;
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
126 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
127 else
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
128 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
129 return SerializationToolbox::ParseInteger64(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
130 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
131 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
132
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
133 bool DicomValue::ParseUnsignedInteger32(uint32_t& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
134 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
135 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
136 IsNull())
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
137 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
138 return false;
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
139 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
140 else
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
141 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
142 return SerializationToolbox::ParseUnsignedInteger32(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
143 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
144 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
145
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
146 bool DicomValue::ParseUnsignedInteger64(uint64_t& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
147 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
148 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
149 IsNull())
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
150 {
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
151 return false;
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
152 }
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
153 else
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
154 {
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
155 return SerializationToolbox::ParseUnsignedInteger64(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
156 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
157 }
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
158
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
159 bool DicomValue::ParseFloat(float& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
160 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
161 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
162 IsNull())
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
163 {
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
164 return false;
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
165 }
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
166 else
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
167 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
168 return SerializationToolbox::ParseFloat(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
169 }
3519
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
170 }
fc26659493b6 added support for COLUMNS/ROWS tags with invalid 800\0 value observed in some US images
amazy
parents: 3060
diff changeset
171
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
172 bool DicomValue::ParseDouble(double& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
173 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
174 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
175 IsNull())
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
176 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
177 return false;
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
178 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
179 else
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
180 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
181 return SerializationToolbox::ParseDouble(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
182 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
183 }
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
184
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
185 bool DicomValue::ParseFirstFloat(float& result) const
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
186 {
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
187 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
188 IsNull())
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
189 {
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
190 return false;
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
191 }
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
192 else
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
193 {
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
194 return SerializationToolbox::ParseFirstFloat(result, GetContent());
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
195 }
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
196 }
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
197
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
198 bool DicomValue::ParseFirstUnsignedInteger(unsigned int& result) const
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
199 {
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
200 uint64_t value;
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
201
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
202 if (IsBinary() ||
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
203 IsNull())
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
204 {
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
205 return false;
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
206 }
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
207 else if (SerializationToolbox::ParseFirstUnsignedInteger64(value, GetContent()))
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
208 {
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
209 result = static_cast<unsigned int>(value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
210 return (static_cast<uint64_t>(result) == value); // Check no overflow
2410
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
211 }
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
212 else
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
213 {
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
214 return false;
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
215 }
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
216 }
3590c936e56f parsing numbers in DicomValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
217
2412
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
218 bool DicomValue::CopyToString(std::string& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
219 bool allowBinary) const
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
220 {
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
221 if (IsNull())
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
222 {
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
223 return false;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
224 }
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
225 else if (IsBinary() && !allowBinary)
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
226 {
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
227 return false;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
228 }
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
229 else
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
230 {
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
231 result.assign(content_);
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
232 return true;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
233 }
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2410
diff changeset
234 }
2863
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
235
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
236
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
237 static const char* KEY_TYPE = "Type";
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
238 static const char* KEY_CONTENT = "Content";
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
239
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
240 void DicomValue::Serialize(Json::Value& target) const
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
241 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
242 target = Json::objectValue;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
243
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
244 switch (type_)
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
245 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
246 case Type_Null:
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
247 target[KEY_TYPE] = "Null";
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
248 break;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
249
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
250 case Type_String:
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
251 target[KEY_TYPE] = "String";
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
252 target[KEY_CONTENT] = content_;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
253 break;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
254
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
255 case Type_Binary:
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
256 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
257 target[KEY_TYPE] = "Binary";
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
258
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
259 std::string base64;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
260 Toolbox::EncodeBase64(base64, content_);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
261 target[KEY_CONTENT] = base64;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
262 break;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
263 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
264
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
265 default:
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
266 throw OrthancException(ErrorCode_InternalError);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
267 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
268 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
269
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
270 void DicomValue::Unserialize(const Json::Value& source)
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
271 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
272 std::string type = SerializationToolbox::ReadString(source, KEY_TYPE);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
273
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
274 if (type == "Null")
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
275 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
276 type_ = Type_Null;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
277 content_.clear();
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
278 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
279 else if (type == "String")
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
280 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
281 type_ = Type_String;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
282 content_ = SerializationToolbox::ReadString(source, KEY_CONTENT);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
283 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
284 else if (type == "Binary")
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
285 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
286 type_ = Type_Binary;
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
287
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
288 const std::string base64 =SerializationToolbox::ReadString(source, KEY_CONTENT);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
289 Toolbox::DecodeBase64(content_, base64);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
290 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
291 else
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
292 {
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
293 throw OrthancException(ErrorCode_BadFileFormat);
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
294 }
da12ba232119 serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
295 }
1738
15a788a63846 DicomToJsonFlags_IncludeBinary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 }