Mercurial > hg > orthanc
annotate Plugins/Engine/PluginsEnumerations.cpp @ 2476:6c2c59c824a9 lua_dll
enable lua dynamic library loading
author | amazy |
---|---|
date | Mon, 19 Feb 2018 18:58:39 +0100 |
parents | 878b59270859 |
children | 89b789366596 |
rev | line source |
---|---|
1625 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1625 | 4 * Department, University Hospital of Liege, Belgium |
2447
878b59270859
upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2424
diff
changeset
|
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium |
1625 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
11 * | |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
23 * | |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
34 #include "../../OrthancServer/PrecompiledHeadersServer.h" | |
35 #include "PluginsEnumerations.h" | |
36 | |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
37 #if ORTHANC_ENABLE_PLUGINS != 1 |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
38 #error The plugin support is disabled |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
39 #endif |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
40 |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
41 |
1625 | 42 #include "../../Core/OrthancException.h" |
43 | |
44 namespace Orthanc | |
45 { | |
46 namespace Plugins | |
47 { | |
48 OrthancPluginResourceType Convert(ResourceType type) | |
49 { | |
50 switch (type) | |
51 { | |
52 case ResourceType_Patient: | |
53 return OrthancPluginResourceType_Patient; | |
54 | |
55 case ResourceType_Study: | |
56 return OrthancPluginResourceType_Study; | |
57 | |
58 case ResourceType_Series: | |
59 return OrthancPluginResourceType_Series; | |
60 | |
61 case ResourceType_Instance: | |
62 return OrthancPluginResourceType_Instance; | |
63 | |
64 default: | |
65 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
66 } | |
67 } | |
68 | |
69 | |
1669
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
70 ResourceType Convert(OrthancPluginResourceType type) |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
71 { |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
72 switch (type) |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
73 { |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
74 case OrthancPluginResourceType_Patient: |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
75 return ResourceType_Patient; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
76 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
77 case OrthancPluginResourceType_Study: |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
78 return ResourceType_Study; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
79 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
80 case OrthancPluginResourceType_Series: |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
81 return ResourceType_Series; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
82 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
83 case OrthancPluginResourceType_Instance: |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
84 return ResourceType_Instance; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
85 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
86 default: |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
87 throw OrthancException(ErrorCode_ParameterOutOfRange); |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
88 } |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
89 } |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
90 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
91 |
1625 | 92 OrthancPluginChangeType Convert(ChangeType type) |
93 { | |
94 switch (type) | |
95 { | |
96 case ChangeType_CompletedSeries: | |
97 return OrthancPluginChangeType_CompletedSeries; | |
98 | |
99 case ChangeType_Deleted: | |
100 return OrthancPluginChangeType_Deleted; | |
101 | |
102 case ChangeType_NewChildInstance: | |
103 return OrthancPluginChangeType_NewChildInstance; | |
104 | |
105 case ChangeType_NewInstance: | |
106 return OrthancPluginChangeType_NewInstance; | |
107 | |
108 case ChangeType_NewPatient: | |
109 return OrthancPluginChangeType_NewPatient; | |
110 | |
111 case ChangeType_NewSeries: | |
112 return OrthancPluginChangeType_NewSeries; | |
113 | |
114 case ChangeType_NewStudy: | |
115 return OrthancPluginChangeType_NewStudy; | |
116 | |
117 case ChangeType_StablePatient: | |
118 return OrthancPluginChangeType_StablePatient; | |
119 | |
120 case ChangeType_StableSeries: | |
121 return OrthancPluginChangeType_StableSeries; | |
122 | |
123 case ChangeType_StableStudy: | |
124 return OrthancPluginChangeType_StableStudy; | |
125 | |
1773
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
126 case ChangeType_UpdatedAttachment: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
127 return OrthancPluginChangeType_UpdatedAttachment; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
128 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
129 case ChangeType_UpdatedMetadata: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
130 return OrthancPluginChangeType_UpdatedMetadata; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
131 |
1625 | 132 default: |
133 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
134 } | |
135 } | |
136 | |
137 | |
138 OrthancPluginPixelFormat Convert(PixelFormat format) | |
139 { | |
140 switch (format) | |
141 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
142 case PixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
143 return OrthancPluginPixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
144 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
145 case PixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
146 return OrthancPluginPixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
147 |
1625 | 148 case PixelFormat_Grayscale16: |
149 return OrthancPluginPixelFormat_Grayscale16; | |
150 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
151 case PixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
152 return OrthancPluginPixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
153 |
1625 | 154 case PixelFormat_Grayscale8: |
155 return OrthancPluginPixelFormat_Grayscale8; | |
156 | |
157 case PixelFormat_RGB24: | |
158 return OrthancPluginPixelFormat_RGB24; | |
159 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
160 case PixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
161 return OrthancPluginPixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
162 |
1625 | 163 case PixelFormat_RGBA32: |
164 return OrthancPluginPixelFormat_RGBA32; | |
165 | |
166 case PixelFormat_SignedGrayscale16: | |
167 return OrthancPluginPixelFormat_SignedGrayscale16; | |
168 | |
169 default: | |
170 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
171 } | |
172 } | |
173 | |
174 | |
175 PixelFormat Convert(OrthancPluginPixelFormat format) | |
176 { | |
177 switch (format) | |
178 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
179 case OrthancPluginPixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
180 return PixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
181 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
182 case OrthancPluginPixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
183 return PixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
184 |
1625 | 185 case OrthancPluginPixelFormat_Grayscale16: |
186 return PixelFormat_Grayscale16; | |
187 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
188 case OrthancPluginPixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
189 return PixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
190 |
1625 | 191 case OrthancPluginPixelFormat_Grayscale8: |
192 return PixelFormat_Grayscale8; | |
193 | |
194 case OrthancPluginPixelFormat_RGB24: | |
195 return PixelFormat_RGB24; | |
196 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
197 case OrthancPluginPixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
198 return PixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
199 |
1625 | 200 case OrthancPluginPixelFormat_RGBA32: |
201 return PixelFormat_RGBA32; | |
202 | |
203 case OrthancPluginPixelFormat_SignedGrayscale16: | |
204 return PixelFormat_SignedGrayscale16; | |
205 | |
206 default: | |
207 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
208 } | |
209 } | |
210 | |
211 | |
212 OrthancPluginContentType Convert(FileContentType type) | |
213 { | |
214 switch (type) | |
215 { | |
216 case FileContentType_Dicom: | |
217 return OrthancPluginContentType_Dicom; | |
218 | |
219 case FileContentType_DicomAsJson: | |
220 return OrthancPluginContentType_DicomAsJson; | |
221 | |
222 default: | |
223 return OrthancPluginContentType_Unknown; | |
224 } | |
225 } | |
226 | |
227 | |
228 FileContentType Convert(OrthancPluginContentType type) | |
229 { | |
230 switch (type) | |
231 { | |
232 case OrthancPluginContentType_Dicom: | |
233 return FileContentType_Dicom; | |
234 | |
235 case OrthancPluginContentType_DicomAsJson: | |
236 return FileContentType_DicomAsJson; | |
237 | |
238 default: | |
239 return FileContentType_Unknown; | |
240 } | |
241 } | |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
242 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
243 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
244 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
245 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
246 switch (format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
247 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
248 case OrthancPluginDicomToJsonFormat_Full: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
249 return DicomToJsonFormat_Full; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
250 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
251 case OrthancPluginDicomToJsonFormat_Short: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
252 return DicomToJsonFormat_Short; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
253 |
1860
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
254 case OrthancPluginDicomToJsonFormat_Human: |
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
255 return DicomToJsonFormat_Human; |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
256 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
257 default: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
258 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
259 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
260 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
261 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
262 |
1760
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
263 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint) |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
264 { |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
265 switch (constraint) |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
266 { |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
267 case IdentifierConstraintType_Equal: |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
268 return OrthancPluginIdentifierConstraint_Equal; |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
269 |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
270 case IdentifierConstraintType_GreaterOrEqual: |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
271 return OrthancPluginIdentifierConstraint_GreaterOrEqual; |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
272 |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
273 case IdentifierConstraintType_SmallerOrEqual: |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
274 return OrthancPluginIdentifierConstraint_SmallerOrEqual; |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
275 |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
276 case IdentifierConstraintType_Wildcard: |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
277 return OrthancPluginIdentifierConstraint_Wildcard; |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
278 |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
279 default: |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
280 throw OrthancException(ErrorCode_ParameterOutOfRange); |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
281 } |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
282 } |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
283 |
51db4a25a741
LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1740
diff
changeset
|
284 |
1761
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
285 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint) |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
286 { |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
287 switch (constraint) |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
288 { |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
289 case OrthancPluginIdentifierConstraint_Equal: |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
290 return IdentifierConstraintType_Equal; |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
291 |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
292 case OrthancPluginIdentifierConstraint_GreaterOrEqual: |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
293 return IdentifierConstraintType_GreaterOrEqual; |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
294 |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
295 case OrthancPluginIdentifierConstraint_SmallerOrEqual: |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
296 return IdentifierConstraintType_SmallerOrEqual; |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
297 |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
298 case OrthancPluginIdentifierConstraint_Wildcard: |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
299 return IdentifierConstraintType_Wildcard; |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
300 |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
301 default: |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
302 throw OrthancException(ErrorCode_ParameterOutOfRange); |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
303 } |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
304 } |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
305 |
f4286d99ee0a
fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1760
diff
changeset
|
306 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
307 OrthancPluginInstanceOrigin Convert(RequestOrigin origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
308 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
309 switch (origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
310 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
311 case RequestOrigin_DicomProtocol: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
312 return OrthancPluginInstanceOrigin_DicomProtocol; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
313 |
1823
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1816
diff
changeset
|
314 case RequestOrigin_RestApi: |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
315 return OrthancPluginInstanceOrigin_RestApi; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
316 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
317 case RequestOrigin_Lua: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
318 return OrthancPluginInstanceOrigin_Lua; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
319 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
320 case RequestOrigin_Plugins: |
1816
87c069c94ac9
plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1815
diff
changeset
|
321 return OrthancPluginInstanceOrigin_Plugin; |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
322 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
323 case RequestOrigin_Unknown: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
324 return OrthancPluginInstanceOrigin_Unknown; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
325 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
326 default: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
327 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
328 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
329 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
330 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
331 |
1961
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
332 OrthancPluginHttpMethod Convert(HttpMethod method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
333 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
334 switch (method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
335 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
336 case HttpMethod_Get: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
337 return OrthancPluginHttpMethod_Get; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
338 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
339 case HttpMethod_Post: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
340 return OrthancPluginHttpMethod_Post; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
341 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
342 case HttpMethod_Put: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
343 return OrthancPluginHttpMethod_Put; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
344 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
345 case HttpMethod_Delete: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
346 return OrthancPluginHttpMethod_Delete; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
347 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
348 default: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
349 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
350 } |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
351 } |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
352 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
353 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
354 ValueRepresentation Convert(OrthancPluginValueRepresentation vr) |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
355 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
356 switch (vr) |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
357 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
358 case OrthancPluginValueRepresentation_AE: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
359 return ValueRepresentation_ApplicationEntity; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
360 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
361 case OrthancPluginValueRepresentation_AS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
362 return ValueRepresentation_AgeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
363 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
364 case OrthancPluginValueRepresentation_AT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
365 return ValueRepresentation_AttributeTag; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
366 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
367 case OrthancPluginValueRepresentation_CS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
368 return ValueRepresentation_CodeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
369 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
370 case OrthancPluginValueRepresentation_DA: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
371 return ValueRepresentation_Date; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
372 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
373 case OrthancPluginValueRepresentation_DS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
374 return ValueRepresentation_DecimalString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
375 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
376 case OrthancPluginValueRepresentation_DT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
377 return ValueRepresentation_DateTime; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
378 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
379 case OrthancPluginValueRepresentation_FD: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
380 return ValueRepresentation_FloatingPointDouble; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
381 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
382 case OrthancPluginValueRepresentation_FL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
383 return ValueRepresentation_FloatingPointSingle; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
384 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
385 case OrthancPluginValueRepresentation_IS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
386 return ValueRepresentation_IntegerString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
387 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
388 case OrthancPluginValueRepresentation_LO: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
389 return ValueRepresentation_LongString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
390 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
391 case OrthancPluginValueRepresentation_LT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
392 return ValueRepresentation_LongText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
393 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
394 case OrthancPluginValueRepresentation_OB: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
395 return ValueRepresentation_OtherByte; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
396 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
397 case OrthancPluginValueRepresentation_OF: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
398 return ValueRepresentation_OtherFloat; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
399 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
400 case OrthancPluginValueRepresentation_OW: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
401 return ValueRepresentation_OtherWord; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
402 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
403 case OrthancPluginValueRepresentation_PN: |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
404 return ValueRepresentation_PersonName; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
405 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
406 case OrthancPluginValueRepresentation_SH: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
407 return ValueRepresentation_ShortString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
408 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
409 case OrthancPluginValueRepresentation_SL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
410 return ValueRepresentation_SignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
411 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
412 case OrthancPluginValueRepresentation_SQ: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
413 return ValueRepresentation_Sequence; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
414 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
415 case OrthancPluginValueRepresentation_SS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
416 return ValueRepresentation_SignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
417 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
418 case OrthancPluginValueRepresentation_ST: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
419 return ValueRepresentation_ShortText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
420 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
421 case OrthancPluginValueRepresentation_TM: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
422 return ValueRepresentation_Time; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
423 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
424 case OrthancPluginValueRepresentation_UI: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
425 return ValueRepresentation_UniqueIdentifier; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
426 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
427 case OrthancPluginValueRepresentation_UL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
428 return ValueRepresentation_UnsignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
429 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
430 case OrthancPluginValueRepresentation_UN: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
431 return ValueRepresentation_Unknown; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
432 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
433 case OrthancPluginValueRepresentation_US: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
434 return ValueRepresentation_UnsignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
435 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
436 case OrthancPluginValueRepresentation_UT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
437 return ValueRepresentation_UnlimitedText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
438 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
439 default: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
440 throw OrthancException(ErrorCode_ParameterOutOfRange); |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
441 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
442 /* |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
443 Not supported as of DCMTK 3.6.0: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
444 return ValueRepresentation_OtherDouble |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
445 return ValueRepresentation_OtherLong |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
446 return ValueRepresentation_UniversalResource |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
447 return ValueRepresentation_UnlimitedCharacters |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
448 */ |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
449 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
450 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
451 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
452 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
453 OrthancPluginValueRepresentation Convert(ValueRepresentation vr) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
454 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
455 switch (vr) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
456 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
457 case ValueRepresentation_ApplicationEntity: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
458 return OrthancPluginValueRepresentation_AE; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
459 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
460 case ValueRepresentation_AgeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
461 return OrthancPluginValueRepresentation_AS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
462 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
463 case ValueRepresentation_AttributeTag: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
464 return OrthancPluginValueRepresentation_AT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
465 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
466 case ValueRepresentation_CodeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
467 return OrthancPluginValueRepresentation_CS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
468 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
469 case ValueRepresentation_Date: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
470 return OrthancPluginValueRepresentation_DA; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
471 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
472 case ValueRepresentation_DecimalString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
473 return OrthancPluginValueRepresentation_DS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
474 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
475 case ValueRepresentation_DateTime: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
476 return OrthancPluginValueRepresentation_DT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
477 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
478 case ValueRepresentation_FloatingPointDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
479 return OrthancPluginValueRepresentation_FD; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
480 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
481 case ValueRepresentation_FloatingPointSingle: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
482 return OrthancPluginValueRepresentation_FL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
483 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
484 case ValueRepresentation_IntegerString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
485 return OrthancPluginValueRepresentation_IS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
486 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
487 case ValueRepresentation_LongString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
488 return OrthancPluginValueRepresentation_LO; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
489 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
490 case ValueRepresentation_LongText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
491 return OrthancPluginValueRepresentation_LT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
492 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
493 case ValueRepresentation_OtherByte: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
494 return OrthancPluginValueRepresentation_OB; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
495 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
496 case ValueRepresentation_OtherFloat: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
497 return OrthancPluginValueRepresentation_OF; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
498 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
499 case ValueRepresentation_OtherWord: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
500 return OrthancPluginValueRepresentation_OW; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
501 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
502 case ValueRepresentation_PersonName: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
503 return OrthancPluginValueRepresentation_PN; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
504 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
505 case ValueRepresentation_ShortString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
506 return OrthancPluginValueRepresentation_SH; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
507 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
508 case ValueRepresentation_SignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
509 return OrthancPluginValueRepresentation_SL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
510 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
511 case ValueRepresentation_Sequence: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
512 return OrthancPluginValueRepresentation_SQ; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
513 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
514 case ValueRepresentation_SignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
515 return OrthancPluginValueRepresentation_SS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
516 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
517 case ValueRepresentation_ShortText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
518 return OrthancPluginValueRepresentation_ST; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
519 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
520 case ValueRepresentation_Time: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
521 return OrthancPluginValueRepresentation_TM; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
522 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
523 case ValueRepresentation_UniqueIdentifier: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
524 return OrthancPluginValueRepresentation_UI; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
525 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
526 case ValueRepresentation_UnsignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
527 return OrthancPluginValueRepresentation_UL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
528 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
529 case ValueRepresentation_UnsignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
530 return OrthancPluginValueRepresentation_US; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
531 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
532 case ValueRepresentation_UnlimitedText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
533 return OrthancPluginValueRepresentation_UT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
534 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
535 case ValueRepresentation_Unknown: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
536 return OrthancPluginValueRepresentation_UN; // Unknown |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
537 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
538 // These VR are not supported as of DCMTK 3.6.0, so they are |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
539 // mapped to "UN" (unknown) VR in the plugins |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
540 case ValueRepresentation_OtherDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
541 case ValueRepresentation_OtherLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
542 case ValueRepresentation_UniversalResource: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
543 case ValueRepresentation_UnlimitedCharacters: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
544 return OrthancPluginValueRepresentation_UN; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
545 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
546 default: |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
547 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
548 } |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
549 } |
1625 | 550 } |
551 } |