annotate Core/DicomFormat/DicomMap.h @ 2412:cad393b41bc3

handy shortcuts in DicomMap
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Sep 2017 11:35:45 +0200
parents 96b3ec054b69
children 878b59270859
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1749
diff changeset
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
2244
a3a65de1840f shared copyright with osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2202
diff changeset
5 * Copyright (C) 2017 Osimis, Belgium
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
136
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
11 *
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
12 * In addition, as a special exception, the copyright holders of this
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
13 * program give permission to link the code of its release with the
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
16 * the linked executables. You must obey the GNU General Public License
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
20 * you do not wish to do so, delete this exception statement from your
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
21 * version. If you delete this exception statement from all source files
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
22 * in the program, then also delete it here.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #pragma once
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #include "DicomTag.h"
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include "DicomValue.h"
562
f64e3838d6e1 refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
38 #include "../Enumerations.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
567
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
40 #include <set>
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include <map>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include <json/json.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
59
c996319e90bc renaming in Core
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
44 namespace Orthanc
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 class DicomMap : public boost::noncopyable
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 private:
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 friend class DicomArray;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 friend class FromDcmtkBridge;
2202
9b373b7d6713 Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2008
diff changeset
51 friend class ParsedDicomFile;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 typedef std::map<DicomTag, DicomValue*> Map;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Map map_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 // Warning: This takes the ownership of "value"
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 void SetValue(uint16_t group,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 uint16_t element,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 DicomValue* value);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 void SetValue(DicomTag tag,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 DicomValue* value);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 void ExtractTags(DicomMap& source,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 const DicomTag* tags,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 size_t count) const;
567
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
68
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
69 static void GetMainDicomTagsInternal(std::set<DicomTag>& result, ResourceType level);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 public:
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 DicomMap()
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 ~DicomMap()
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 Clear();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 }
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
80
77e129ba64e4 Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1310
diff changeset
81 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
82 {
77e129ba64e4 Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1310
diff changeset
83 return map_.size();
77e129ba64e4 Prevent freeze on C-FIND if no DICOM tag is to be returned
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1310
diff changeset
84 }
1310
61ce8147f30d custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
85
61ce8147f30d custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
86 DicomMap* Clone() const;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
1310
61ce8147f30d custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
88 void Assign(const DicomMap& other);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 void Clear();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 void SetValue(uint16_t group,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 uint16_t element,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 const DicomValue& value)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 SetValue(group, element, value.Clone());
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 void SetValue(const DicomTag& tag,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 const DicomValue& value)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 SetValue(tag, value.Clone());
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 void SetValue(const DicomTag& tag,
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
106 const std::string& str,
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
107 bool isBinary)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 {
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
109 SetValue(tag, new DicomValue(str, isBinary));
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 void SetValue(uint16_t group,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 uint16_t element,
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
114 const std::string& str,
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
115 bool isBinary)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 {
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
117 SetValue(group, element, new DicomValue(str, isBinary));
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 bool HasTag(uint16_t group, uint16_t element) const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 return HasTag(DicomTag(group, element));
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 bool HasTag(const DicomTag& tag) const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 return map_.find(tag) != map_.end();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 const DicomValue& GetValue(uint16_t group, uint16_t element) const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 return GetValue(DicomTag(group, element));
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 const DicomValue& GetValue(const DicomTag& tag) const;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
1228
e0f7014d39a4 Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1206
diff changeset
137 // DO NOT delete the returned value!
80
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
138 const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
139 {
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
140 return TestAndGetValue(DicomTag(group, element));
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
141 }
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
142
1228
e0f7014d39a4 Instances without PatientID are now allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1206
diff changeset
143 // DO NOT delete the returned value!
80
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
144 const DicomValue* TestAndGetValue(const DicomTag& tag) const;
6212bf978584 status of series
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 59
diff changeset
145
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 void Remove(const DicomTag& tag);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 void ExtractPatientInformation(DicomMap& result) const;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 void ExtractStudyInformation(DicomMap& result) const;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 void ExtractSeriesInformation(DicomMap& result) const;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 void ExtractInstanceInformation(DicomMap& result) const;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 static void SetupFindPatientTemplate(DicomMap& result);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 static void SetupFindStudyTemplate(DicomMap& result);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 static void SetupFindSeriesTemplate(DicomMap& result);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 static void SetupFindInstanceTemplate(DicomMap& result);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 void CopyTagIfExists(const DicomMap& source,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 const DicomTag& tag);
562
f64e3838d6e1 refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
166
f64e3838d6e1 refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
167 static bool IsMainDicomTag(const DicomTag& tag, ResourceType level);
f64e3838d6e1 refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
168
f64e3838d6e1 refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 398
diff changeset
169 static bool IsMainDicomTag(const DicomTag& tag);
567
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
170
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
171 static void GetMainDicomTags(std::set<DicomTag>& result, ResourceType level);
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
172
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 562
diff changeset
173 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
174
1360
0649c5aef34a DicomFindQuery
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1331
diff changeset
175 void GetTags(std::set<DicomTag>& tags) const;
1749
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1737
diff changeset
176
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1737
diff changeset
177 static void LoadMainDicomTags(const DicomTag*& tags,
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1737
diff changeset
178 size_t& size,
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1737
diff changeset
179 ResourceType level);
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
180
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
181 static bool ParseDicomMetaInformation(DicomMap& result,
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
182 const char* dicom,
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
183 size_t size);
2380
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
184
96b3ec054b69 reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
185 void LogMissingTagsForStore() const;
2412
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
186
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
187 bool CopyToString(std::string& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
188 const DicomTag& tag,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
189 bool allowBinary) 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 ParseInteger32(int32_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 ParseInteger64(int64_t& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
195 const DicomTag& tag) const;
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 ParseUnsignedInteger32(uint32_t& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
198 const DicomTag& tag) const;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
199
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
200 bool ParseUnsignedInteger64(uint64_t& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
201 const DicomTag& tag) const;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
202
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
203 bool ParseFloat(float& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
204 const DicomTag& tag) const;
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
205
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
206 bool ParseDouble(double& result,
cad393b41bc3 handy shortcuts in DicomMap
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
207 const DicomTag& tag) const;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 };
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 }