Mercurial > hg > orthanc
annotate OrthancFramework/Sources/DicomFormat/DicomMap.h @ 4934:94a7b681b340 more-tags
added configuration for extra main dicom tags + save signature in metadata + show warning if inconsistent main dicom tags
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 10 Mar 2022 09:03:24 +0100 |
parents | 312c6f4da888 |
children | acd3f72e2a21 |
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 |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
0 | 7 * |
8 * 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
|
9 * 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
|
10 * 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
|
11 * the License, or (at your option) any later version. |
136 | 12 * |
0 | 13 * This program is distributed in the hope that it will be useful, but |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * 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
|
16 * Lesser General Public License for more details. |
0 | 17 * |
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
|
18 * 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
|
19 * 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
|
20 * <http://www.gnu.org/licenses/>. |
0 | 21 **/ |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "DicomTag.h" | |
27 #include "DicomValue.h" | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
28 #include "../Enumerations.h" |
0 | 29 |
567 | 30 #include <set> |
0 | 31 #include <map> |
4392
3af1d763763a
confining Json::Reader and Json::*Writer into Toolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4296
diff
changeset
|
32 #include <json/value.h> |
0 | 33 |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
34 #if ORTHANC_BUILD_UNIT_TESTS == 1 |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
35 # include <gtest/gtest_prod.h> |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
36 #endif |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
37 |
59 | 38 namespace Orthanc |
0 | 39 { |
3992
f9863630ec7f
working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3840
diff
changeset
|
40 class ORTHANC_PUBLIC DicomMap : public boost::noncopyable |
0 | 41 { |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
42 public: |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
43 typedef std::map<DicomTag, DicomValue*> Content; |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
44 |
0 | 45 private: |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
46 class MainDicomTagsConfiguration; |
0 | 47 friend class DicomArray; |
48 friend class FromDcmtkBridge; | |
2202
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2008
diff
changeset
|
49 friend class ParsedDicomFile; |
0 | 50 |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
51 #if ORTHANC_BUILD_UNIT_TESTS == 1 |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
52 friend class DicomMapMainTagsTests; |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
53 #endif |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
54 |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
55 Content content_; |
0 | 56 |
57 // Warning: This takes the ownership of "value" | |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
58 void SetValueInternal(uint16_t group, |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
59 uint16_t element, |
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
60 DicomValue* value); |
0 | 61 |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
62 // used for unit tests only |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
63 static void ResetDefaultMainDicomTags(); |
0 | 64 |
65 public: | |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
66 ~DicomMap(); |
0 | 67 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
68 size_t GetSize() const; |
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 | |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
76 void SetNullValue(uint16_t group, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
77 uint16_t element); |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
78 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
79 void SetNullValue(const DicomTag& tag); |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
80 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
81 void SetValue(uint16_t group, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
82 uint16_t element, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
83 const DicomValue& value); |
0 | 84 |
85 void SetValue(const DicomTag& tag, | |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
86 const DicomValue& value); |
0 | 87 |
88 void SetValue(const DicomTag& tag, | |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
89 const std::string& str, |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
90 bool isBinary); |
0 | 91 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
92 void SetValue(uint16_t group, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
93 uint16_t element, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
94 const std::string& str, |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
95 bool isBinary); |
0 | 96 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
97 bool HasTag(uint16_t group, uint16_t element) const; |
0 | 98 |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
99 bool HasTag(const DicomTag& tag) const; |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
100 |
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
101 const DicomValue& GetValue(uint16_t group, uint16_t element) const; |
0 | 102 |
103 const DicomValue& GetValue(const DicomTag& tag) const; | |
104 | |
1228
e0f7014d39a4
Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1206
diff
changeset
|
105 // DO NOT delete the returned value! |
4296
3b70a2e6a06c
moving inline methods to source files for ABI compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
106 const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const; |
80 | 107 |
1228
e0f7014d39a4
Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1206
diff
changeset
|
108 // DO NOT delete the returned value! |
80 | 109 const DicomValue* TestAndGetValue(const DicomTag& tag) const; |
110 | |
0 | 111 void Remove(const DicomTag& tag); |
112 | |
113 void ExtractPatientInformation(DicomMap& result) const; | |
114 | |
115 void ExtractStudyInformation(DicomMap& result) const; | |
116 | |
117 void ExtractSeriesInformation(DicomMap& result) const; | |
118 | |
119 void ExtractInstanceInformation(DicomMap& result) const; | |
120 | |
121 static void SetupFindPatientTemplate(DicomMap& result); | |
122 | |
123 static void SetupFindStudyTemplate(DicomMap& result); | |
124 | |
125 static void SetupFindSeriesTemplate(DicomMap& result); | |
126 | |
127 static void SetupFindInstanceTemplate(DicomMap& result); | |
128 | |
129 void CopyTagIfExists(const DicomMap& source, | |
130 const DicomTag& tag); | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
131 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
132 static bool IsMainDicomTag(const DicomTag& tag, ResourceType level); |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
133 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
398
diff
changeset
|
134 static bool IsMainDicomTag(const DicomTag& tag); |
567 | 135 |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
136 static const std::set<DicomTag>& GetMainDicomTags(ResourceType level); |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
137 |
4933 | 138 // returns a string uniquely identifying the list of main dicom tags for a level |
139 static const std::string& GetMainDicomTagsSignature(ResourceType level); | |
140 | |
141 static const std::string& GetDefaultMainDicomTagsSignature(ResourceType level); | |
142 | |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
143 static const std::set<DicomTag>& GetAllMainDicomTags(); |
567 | 144 |
4932
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
145 // adds a main dicom tag to the definition of main dicom tags for each level. |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
146 // this should be done once at startup before you use MainDicomTags methods |
b7ce2bb6b881
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4870
diff
changeset
|
147 static void AddMainDicomTag(const DicomTag& tag, const std::string& name, ResourceType level); |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
148 |
1360 | 149 void GetTags(std::set<DicomTag>& tags) const; |
1749
99f4a05f39fa
various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1737
diff
changeset
|
150 |
3840
e7003b2203a7
fixing signature of DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3771
diff
changeset
|
151 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
|
152 size_t size); |
74889e6f6d68
fix memory issues if parsing invalid DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3690
diff
changeset
|
153 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
154 static bool ParseDicomMetaInformation(DicomMap& result, |
3840
e7003b2203a7
fixing signature of DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3771
diff
changeset
|
155 const void* dicom, |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
156 size_t size); |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
157 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
158 void LogMissingTagsForStore() const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
159 |
4501
11c2ddb4e2ca
FromDcmtkBridge::LogMissingTagsForStore()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
160 static void LogMissingTagsForStore(const std::string& patientId, |
11c2ddb4e2ca
FromDcmtkBridge::LogMissingTagsForStore()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
161 const std::string& studyInstanceUid, |
11c2ddb4e2ca
FromDcmtkBridge::LogMissingTagsForStore()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
162 const std::string& seriesInstanceUid, |
11c2ddb4e2ca
FromDcmtkBridge::LogMissingTagsForStore()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
163 const std::string& sopInstanceUid); |
11c2ddb4e2ca
FromDcmtkBridge::LogMissingTagsForStore()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
164 |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
165 bool LookupStringValue(std::string& result, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
166 const DicomTag& tag, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
167 bool allowBinary) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
168 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
169 bool ParseInteger32(int32_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
170 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
171 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
172 bool ParseInteger64(int64_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
173 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
174 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
175 bool ParseUnsignedInteger32(uint32_t& result, |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
176 const DicomTag& tag) const; |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
177 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
178 bool ParseUnsignedInteger64(uint64_t& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
179 const DicomTag& tag) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
180 |
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
181 bool ParseFloat(float& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
182 const DicomTag& tag) const; |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
183 |
3690
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
184 bool ParseFirstFloat(float& result, |
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
185 const DicomTag& tag) const; |
a9ce35d67c3c
implementation of "/instances/.../rendered" for grayscale images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3678
diff
changeset
|
186 |
2412
cad393b41bc3
handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
187 bool ParseDouble(double& result, |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
188 const DicomTag& tag) const; |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
189 |
3005
8265a6b56100
DicomMap::FromDicomAsJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2863
diff
changeset
|
190 void FromDicomAsJson(const Json::Value& dicomAsJson); |
3006
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
191 |
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
192 void Merge(const DicomMap& other); |
0e1755e5efd0
DicomMap::ExtractMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3005
diff
changeset
|
193 |
3678
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
194 void MergeMainDicomTags(const DicomMap& other, |
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
195 ResourceType level); |
26c6d47467a9
DicomMap::MergeMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3651
diff
changeset
|
196 |
3015
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3006
diff
changeset
|
197 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
|
198 |
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3006
diff
changeset
|
199 bool HasOnlyMainDicomTags() const; |
3005
8265a6b56100
DicomMap::FromDicomAsJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2863
diff
changeset
|
200 |
2863
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
201 void Serialize(Json::Value& target) const; |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
202 |
da12ba232119
serialization of DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
203 void Unserialize(const Json::Value& source); |
3496
109631ed3564
DicomMap::FromDicomWeb()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
204 |
109631ed3564
DicomMap::FromDicomWeb()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
205 void FromDicomWeb(const Json::Value& source); |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
206 |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
207 std::string GetStringValue(const DicomTag& tag, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
208 const std::string& defaultValue, |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
209 bool allowBinary) const; |
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
210 |
3551
173c7f363d8f
DicomMap::RemoveBinaryTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3518
diff
changeset
|
211 void RemoveBinaryTags(); |
173c7f363d8f
DicomMap::RemoveBinaryTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3518
diff
changeset
|
212 |
3650
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
213 void DumpMainDicomTags(Json::Value& target, |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
214 ResourceType level) const; |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
215 |
3651
46cb00e4adbb
DicomMap::DumpMainDicomTags() and DicomMap::ParseMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3650
diff
changeset
|
216 void ParseMainDicomTags(const Json::Value& source, |
3650
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
217 ResourceType level); |
e5811a9f8df0
removing DicomMap::LoadMainDicomTags()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
218 |
3518
a57c8163d9ae
DicomMap::GetStringValue()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3496
diff
changeset
|
219 void Print(FILE* fp) const; // For debugging only |
0 | 220 }; |
221 } |