Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Engine/PluginsEnumerations.cpp @ 4606:d01702fb29a9 db-changes
integration mainline->db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Mar 2021 16:34:23 +0200 |
parents | b7fe3494a53c |
children | f0038043fb97 7053502fbf97 |
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 |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4245
diff
changeset
|
5 * Copyright (C) 2017-2021 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 | |
4045 | 34 #include "../../Sources/PrecompiledHeadersServer.h" |
1625 | 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 |
4045 | 42 #include "../../../OrthancFramework/Sources/OrthancException.h" |
1625 | 43 |
44 namespace Orthanc | |
45 { | |
3074
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
46 namespace Compatibility |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
47 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
48 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
49 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
50 switch (constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
51 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
52 case Compatibility::IdentifierConstraintType_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
53 return OrthancPluginIdentifierConstraint_Equal; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
54 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
55 case Compatibility::IdentifierConstraintType_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
56 return OrthancPluginIdentifierConstraint_GreaterOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
57 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
58 case Compatibility::IdentifierConstraintType_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
59 return OrthancPluginIdentifierConstraint_SmallerOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
60 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
61 case Compatibility::IdentifierConstraintType_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
62 return OrthancPluginIdentifierConstraint_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
63 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
64 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
65 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
66 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
67 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
68 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
69 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
70 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
71 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
72 switch (constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
73 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
74 case OrthancPluginIdentifierConstraint_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
75 return Compatibility::IdentifierConstraintType_Equal; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
76 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
77 case OrthancPluginIdentifierConstraint_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
78 return Compatibility::IdentifierConstraintType_GreaterOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
79 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
80 case OrthancPluginIdentifierConstraint_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
81 return Compatibility::IdentifierConstraintType_SmallerOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
82 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
83 case OrthancPluginIdentifierConstraint_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
84 return Compatibility::IdentifierConstraintType_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
85 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
86 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
87 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
88 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
89 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
90 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
91 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
92 |
1625 | 93 namespace Plugins |
94 { | |
4024
1d2b31fc782f
new 'changes': JobSubmitted, JobSuccess, JobFailure
Alain Mazy <alain@mazy.be>
parents:
4022
diff
changeset
|
95 OrthancPluginChangeType Convert(ChangeType type) |
1625 | 96 { |
97 switch (type) | |
98 { | |
99 case ChangeType_CompletedSeries: | |
100 return OrthancPluginChangeType_CompletedSeries; | |
101 | |
102 case ChangeType_Deleted: | |
103 return OrthancPluginChangeType_Deleted; | |
104 | |
105 case ChangeType_NewChildInstance: | |
106 return OrthancPluginChangeType_NewChildInstance; | |
107 | |
108 case ChangeType_NewInstance: | |
109 return OrthancPluginChangeType_NewInstance; | |
110 | |
111 case ChangeType_NewPatient: | |
112 return OrthancPluginChangeType_NewPatient; | |
113 | |
114 case ChangeType_NewSeries: | |
115 return OrthancPluginChangeType_NewSeries; | |
116 | |
117 case ChangeType_NewStudy: | |
118 return OrthancPluginChangeType_NewStudy; | |
119 | |
120 case ChangeType_StablePatient: | |
121 return OrthancPluginChangeType_StablePatient; | |
122 | |
123 case ChangeType_StableSeries: | |
124 return OrthancPluginChangeType_StableSeries; | |
125 | |
126 case ChangeType_StableStudy: | |
127 return OrthancPluginChangeType_StableStudy; | |
128 | |
1773
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
129 case ChangeType_UpdatedAttachment: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
130 return OrthancPluginChangeType_UpdatedAttachment; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
131 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
132 case ChangeType_UpdatedMetadata: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
133 return OrthancPluginChangeType_UpdatedMetadata; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
134 |
1625 | 135 default: |
136 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
137 } | |
138 } | |
139 | |
140 | |
141 OrthancPluginPixelFormat Convert(PixelFormat format) | |
142 { | |
143 switch (format) | |
144 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
145 case PixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
146 return OrthancPluginPixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
147 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
148 case PixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
149 return OrthancPluginPixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
150 |
1625 | 151 case PixelFormat_Grayscale16: |
152 return OrthancPluginPixelFormat_Grayscale16; | |
153 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
154 case PixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
155 return OrthancPluginPixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
156 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
157 case PixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
158 return OrthancPluginPixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
159 |
1625 | 160 case PixelFormat_Grayscale8: |
161 return OrthancPluginPixelFormat_Grayscale8; | |
162 | |
163 case PixelFormat_RGB24: | |
164 return OrthancPluginPixelFormat_RGB24; | |
165 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
166 case PixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
167 return OrthancPluginPixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
168 |
1625 | 169 case PixelFormat_RGBA32: |
170 return OrthancPluginPixelFormat_RGBA32; | |
171 | |
172 case PixelFormat_SignedGrayscale16: | |
173 return OrthancPluginPixelFormat_SignedGrayscale16; | |
174 | |
175 default: | |
176 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
177 } | |
178 } | |
179 | |
180 | |
181 PixelFormat Convert(OrthancPluginPixelFormat format) | |
182 { | |
183 switch (format) | |
184 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
185 case OrthancPluginPixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
186 return PixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
187 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
188 case OrthancPluginPixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
189 return PixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
190 |
1625 | 191 case OrthancPluginPixelFormat_Grayscale16: |
192 return PixelFormat_Grayscale16; | |
193 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
194 case OrthancPluginPixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
195 return PixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
196 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
197 case OrthancPluginPixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
198 return PixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
199 |
1625 | 200 case OrthancPluginPixelFormat_Grayscale8: |
201 return PixelFormat_Grayscale8; | |
202 | |
203 case OrthancPluginPixelFormat_RGB24: | |
204 return PixelFormat_RGB24; | |
205 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
206 case OrthancPluginPixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
207 return PixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
208 |
1625 | 209 case OrthancPluginPixelFormat_RGBA32: |
210 return PixelFormat_RGBA32; | |
211 | |
212 case OrthancPluginPixelFormat_SignedGrayscale16: | |
213 return PixelFormat_SignedGrayscale16; | |
214 | |
215 default: | |
216 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
217 } | |
218 } | |
219 | |
220 | |
221 OrthancPluginContentType Convert(FileContentType type) | |
222 { | |
223 switch (type) | |
224 { | |
225 case FileContentType_Dicom: | |
226 return OrthancPluginContentType_Dicom; | |
227 | |
228 case FileContentType_DicomAsJson: | |
229 return OrthancPluginContentType_DicomAsJson; | |
230 | |
4597 | 231 case FileContentType_DicomUntilPixelData: |
232 return OrthancPluginContentType_DicomUntilPixelData; | |
233 | |
1625 | 234 default: |
235 return OrthancPluginContentType_Unknown; | |
236 } | |
237 } | |
238 | |
239 | |
240 FileContentType Convert(OrthancPluginContentType type) | |
241 { | |
242 switch (type) | |
243 { | |
244 case OrthancPluginContentType_Dicom: | |
245 return FileContentType_Dicom; | |
246 | |
247 case OrthancPluginContentType_DicomAsJson: | |
248 return FileContentType_DicomAsJson; | |
249 | |
4597 | 250 case OrthancPluginContentType_DicomUntilPixelData: |
251 return FileContentType_DicomUntilPixelData; | |
252 | |
1625 | 253 default: |
254 return FileContentType_Unknown; | |
255 } | |
256 } | |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
257 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
258 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
259 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format) |
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 switch (format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
262 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
263 case OrthancPluginDicomToJsonFormat_Full: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
264 return DicomToJsonFormat_Full; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
265 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
266 case OrthancPluginDicomToJsonFormat_Short: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
267 return DicomToJsonFormat_Short; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
268 |
1860
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
269 case OrthancPluginDicomToJsonFormat_Human: |
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
270 return DicomToJsonFormat_Human; |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
271 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
272 default: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
273 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
274 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
275 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
276 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
277 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
278 OrthancPluginInstanceOrigin Convert(RequestOrigin origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
279 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
280 switch (origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
281 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
282 case RequestOrigin_DicomProtocol: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
283 return OrthancPluginInstanceOrigin_DicomProtocol; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
284 |
1823
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1816
diff
changeset
|
285 case RequestOrigin_RestApi: |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
286 return OrthancPluginInstanceOrigin_RestApi; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
287 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
288 case RequestOrigin_Lua: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
289 return OrthancPluginInstanceOrigin_Lua; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
290 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
291 case RequestOrigin_Plugins: |
1816
87c069c94ac9
plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1815
diff
changeset
|
292 return OrthancPluginInstanceOrigin_Plugin; |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
293 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
294 case RequestOrigin_Unknown: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
295 return OrthancPluginInstanceOrigin_Unknown; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
296 |
4245
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
297 case RequestOrigin_WebDav: |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
298 return OrthancPluginInstanceOrigin_WebDav; |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
299 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
300 default: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
301 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
302 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
303 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
304 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
305 |
1961
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
306 OrthancPluginHttpMethod Convert(HttpMethod method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
307 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
308 switch (method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
309 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
310 case HttpMethod_Get: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
311 return OrthancPluginHttpMethod_Get; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
312 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
313 case HttpMethod_Post: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
314 return OrthancPluginHttpMethod_Post; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
315 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
316 case HttpMethod_Put: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
317 return OrthancPluginHttpMethod_Put; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
318 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
319 case HttpMethod_Delete: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
320 return OrthancPluginHttpMethod_Delete; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
321 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
322 default: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
323 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
324 } |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
325 } |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
326 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
327 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
328 ValueRepresentation Convert(OrthancPluginValueRepresentation vr) |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
329 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
330 switch (vr) |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
331 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
332 case OrthancPluginValueRepresentation_AE: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
333 return ValueRepresentation_ApplicationEntity; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
334 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
335 case OrthancPluginValueRepresentation_AS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
336 return ValueRepresentation_AgeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
337 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
338 case OrthancPluginValueRepresentation_AT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
339 return ValueRepresentation_AttributeTag; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
340 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
341 case OrthancPluginValueRepresentation_CS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
342 return ValueRepresentation_CodeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
343 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
344 case OrthancPluginValueRepresentation_DA: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
345 return ValueRepresentation_Date; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
346 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
347 case OrthancPluginValueRepresentation_DS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
348 return ValueRepresentation_DecimalString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
349 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
350 case OrthancPluginValueRepresentation_DT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
351 return ValueRepresentation_DateTime; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
352 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
353 case OrthancPluginValueRepresentation_FD: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
354 return ValueRepresentation_FloatingPointDouble; |
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 case OrthancPluginValueRepresentation_FL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
357 return ValueRepresentation_FloatingPointSingle; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
358 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
359 case OrthancPluginValueRepresentation_IS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
360 return ValueRepresentation_IntegerString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
361 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
362 case OrthancPluginValueRepresentation_LO: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
363 return ValueRepresentation_LongString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
364 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
365 case OrthancPluginValueRepresentation_LT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
366 return ValueRepresentation_LongText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
367 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
368 case OrthancPluginValueRepresentation_OB: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
369 return ValueRepresentation_OtherByte; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
370 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
371 case OrthancPluginValueRepresentation_OF: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
372 return ValueRepresentation_OtherFloat; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
373 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
374 case OrthancPluginValueRepresentation_OW: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
375 return ValueRepresentation_OtherWord; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
376 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
377 case OrthancPluginValueRepresentation_PN: |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
378 return ValueRepresentation_PersonName; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
379 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
380 case OrthancPluginValueRepresentation_SH: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
381 return ValueRepresentation_ShortString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
382 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
383 case OrthancPluginValueRepresentation_SL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
384 return ValueRepresentation_SignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
385 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
386 case OrthancPluginValueRepresentation_SQ: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
387 return ValueRepresentation_Sequence; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
388 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
389 case OrthancPluginValueRepresentation_SS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
390 return ValueRepresentation_SignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
391 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
392 case OrthancPluginValueRepresentation_ST: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
393 return ValueRepresentation_ShortText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
394 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
395 case OrthancPluginValueRepresentation_TM: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
396 return ValueRepresentation_Time; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
397 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
398 case OrthancPluginValueRepresentation_UI: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
399 return ValueRepresentation_UniqueIdentifier; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
400 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
401 case OrthancPluginValueRepresentation_UL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
402 return ValueRepresentation_UnsignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
403 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
404 case OrthancPluginValueRepresentation_UN: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
405 return ValueRepresentation_Unknown; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
406 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
407 case OrthancPluginValueRepresentation_US: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
408 return ValueRepresentation_UnsignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
409 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
410 case OrthancPluginValueRepresentation_UT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
411 return ValueRepresentation_UnlimitedText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
412 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
413 default: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
414 throw OrthancException(ErrorCode_ParameterOutOfRange); |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
415 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
416 /* |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
417 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
|
418 return ValueRepresentation_OtherDouble |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
419 return ValueRepresentation_OtherLong |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
420 return ValueRepresentation_UniversalResource |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
421 return ValueRepresentation_UnlimitedCharacters |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
422 */ |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
423 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
424 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
425 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
426 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
427 OrthancPluginValueRepresentation Convert(ValueRepresentation vr) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
428 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
429 switch (vr) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
430 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
431 case ValueRepresentation_ApplicationEntity: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
432 return OrthancPluginValueRepresentation_AE; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
433 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
434 case ValueRepresentation_AgeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
435 return OrthancPluginValueRepresentation_AS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
436 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
437 case ValueRepresentation_AttributeTag: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
438 return OrthancPluginValueRepresentation_AT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
439 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
440 case ValueRepresentation_CodeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
441 return OrthancPluginValueRepresentation_CS; |
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 case ValueRepresentation_Date: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
444 return OrthancPluginValueRepresentation_DA; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
445 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
446 case ValueRepresentation_DecimalString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
447 return OrthancPluginValueRepresentation_DS; |
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 case ValueRepresentation_DateTime: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
450 return OrthancPluginValueRepresentation_DT; |
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 case ValueRepresentation_FloatingPointDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
453 return OrthancPluginValueRepresentation_FD; |
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 case ValueRepresentation_FloatingPointSingle: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
456 return OrthancPluginValueRepresentation_FL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
457 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
458 case ValueRepresentation_IntegerString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
459 return OrthancPluginValueRepresentation_IS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
460 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
461 case ValueRepresentation_LongString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
462 return OrthancPluginValueRepresentation_LO; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
463 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
464 case ValueRepresentation_LongText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
465 return OrthancPluginValueRepresentation_LT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
466 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
467 case ValueRepresentation_OtherByte: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
468 return OrthancPluginValueRepresentation_OB; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
469 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
470 case ValueRepresentation_OtherFloat: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
471 return OrthancPluginValueRepresentation_OF; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
472 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
473 case ValueRepresentation_OtherWord: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
474 return OrthancPluginValueRepresentation_OW; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
475 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
476 case ValueRepresentation_PersonName: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
477 return OrthancPluginValueRepresentation_PN; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
478 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
479 case ValueRepresentation_ShortString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
480 return OrthancPluginValueRepresentation_SH; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
481 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
482 case ValueRepresentation_SignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
483 return OrthancPluginValueRepresentation_SL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
484 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
485 case ValueRepresentation_Sequence: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
486 return OrthancPluginValueRepresentation_SQ; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
487 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
488 case ValueRepresentation_SignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
489 return OrthancPluginValueRepresentation_SS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
490 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
491 case ValueRepresentation_ShortText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
492 return OrthancPluginValueRepresentation_ST; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
493 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
494 case ValueRepresentation_Time: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
495 return OrthancPluginValueRepresentation_TM; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
496 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
497 case ValueRepresentation_UniqueIdentifier: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
498 return OrthancPluginValueRepresentation_UI; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
499 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
500 case ValueRepresentation_UnsignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
501 return OrthancPluginValueRepresentation_UL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
502 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
503 case ValueRepresentation_UnsignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
504 return OrthancPluginValueRepresentation_US; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
505 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
506 case ValueRepresentation_UnlimitedText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
507 return OrthancPluginValueRepresentation_UT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
508 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
509 case ValueRepresentation_Unknown: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
510 return OrthancPluginValueRepresentation_UN; // Unknown |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
511 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
512 // 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
|
513 // 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
|
514 case ValueRepresentation_OtherDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
515 case ValueRepresentation_OtherLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
516 case ValueRepresentation_UniversalResource: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
517 case ValueRepresentation_UnlimitedCharacters: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
518 return OrthancPluginValueRepresentation_UN; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
519 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
520 default: |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
521 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
522 } |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
523 } |
2808
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
524 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
525 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
526 OrthancPluginJobStepStatus Convert(JobStepCode step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
527 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
528 switch (step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
529 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
530 case JobStepCode_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
531 return OrthancPluginJobStepStatus_Success; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
532 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
533 case JobStepCode_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
534 return OrthancPluginJobStepStatus_Failure; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
535 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
536 case JobStepCode_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
537 return OrthancPluginJobStepStatus_Continue; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
538 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
539 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
540 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
541 } |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
542 } |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
543 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
544 JobStepCode Convert(OrthancPluginJobStepStatus step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
545 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
546 switch (step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
547 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
548 case OrthancPluginJobStepStatus_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
549 return JobStepCode_Success; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
550 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
551 case OrthancPluginJobStepStatus_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
552 return JobStepCode_Failure; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
553 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
554 case OrthancPluginJobStepStatus_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
555 return JobStepCode_Continue; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
556 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
557 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
558 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
559 } |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
560 } |
3662
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
561 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
562 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
563 StorageCommitmentFailureReason Convert(OrthancPluginStorageCommitmentFailureReason reason) |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
564 { |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
565 switch (reason) |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
566 { |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
567 case OrthancPluginStorageCommitmentFailureReason_Success: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
568 return StorageCommitmentFailureReason_Success; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
569 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
570 case OrthancPluginStorageCommitmentFailureReason_ProcessingFailure: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
571 return StorageCommitmentFailureReason_ProcessingFailure; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
572 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
573 case OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
574 return StorageCommitmentFailureReason_NoSuchObjectInstance; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
575 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
576 case OrthancPluginStorageCommitmentFailureReason_ResourceLimitation: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
577 return StorageCommitmentFailureReason_ResourceLimitation; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
578 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
579 case OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
580 return StorageCommitmentFailureReason_ReferencedSOPClassNotSupported; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
581 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
582 case OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
583 return StorageCommitmentFailureReason_ClassInstanceConflict; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
584 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
585 case OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
586 return StorageCommitmentFailureReason_DuplicateTransactionUID; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
587 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
588 default: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
589 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
590 } |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
591 } |
1625 | 592 } |
593 } |