Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Engine/PluginsEnumerations.cpp @ 5663:3765085693e5 large-queries
merge default -> large-queries
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Thu, 04 Jul 2024 07:40:58 +0200 |
parents | 28cc06e4859a f7adfb22e20e |
children | 0da33161acf7 |
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 |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5485
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5485
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5337
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1625 | 8 * |
9 * This program is free software: you can redistribute it and/or | |
10 * modify it under the terms of the GNU General Public License as | |
11 * published by the Free Software Foundation, either version 3 of the | |
12 * License, or (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, but | |
15 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
4045 | 24 #include "../../Sources/PrecompiledHeadersServer.h" |
1625 | 25 #include "PluginsEnumerations.h" |
26 | |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
27 #if ORTHANC_ENABLE_PLUGINS != 1 |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
28 #error The plugin support is disabled |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
29 #endif |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
30 |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
31 |
4045 | 32 #include "../../../OrthancFramework/Sources/OrthancException.h" |
1625 | 33 |
34 namespace Orthanc | |
35 { | |
3074
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
36 namespace Compatibility |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
37 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
38 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
39 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
40 switch (constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
41 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
42 case Compatibility::IdentifierConstraintType_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
43 return OrthancPluginIdentifierConstraint_Equal; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
44 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
45 case Compatibility::IdentifierConstraintType_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
46 return OrthancPluginIdentifierConstraint_GreaterOrEqual; |
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 case Compatibility::IdentifierConstraintType_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
49 return OrthancPluginIdentifierConstraint_SmallerOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
50 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
51 case Compatibility::IdentifierConstraintType_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
52 return OrthancPluginIdentifierConstraint_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
53 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
54 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
55 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
56 } |
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 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
59 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
60 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
61 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
62 switch (constraint) |
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 case OrthancPluginIdentifierConstraint_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
65 return Compatibility::IdentifierConstraintType_Equal; |
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 case OrthancPluginIdentifierConstraint_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
68 return Compatibility::IdentifierConstraintType_GreaterOrEqual; |
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 case OrthancPluginIdentifierConstraint_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
71 return Compatibility::IdentifierConstraintType_SmallerOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
72 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
73 case OrthancPluginIdentifierConstraint_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
74 return Compatibility::IdentifierConstraintType_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
75 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
76 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
77 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
78 } |
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 } |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
81 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
82 |
1625 | 83 namespace Plugins |
84 { | |
4024
1d2b31fc782f
new 'changes': JobSubmitted, JobSuccess, JobFailure
Alain Mazy <alain@mazy.be>
parents:
4022
diff
changeset
|
85 OrthancPluginChangeType Convert(ChangeType type) |
1625 | 86 { |
87 switch (type) | |
88 { | |
89 case ChangeType_CompletedSeries: | |
90 return OrthancPluginChangeType_CompletedSeries; | |
91 | |
92 case ChangeType_Deleted: | |
93 return OrthancPluginChangeType_Deleted; | |
94 | |
95 case ChangeType_NewChildInstance: | |
96 return OrthancPluginChangeType_NewChildInstance; | |
97 | |
98 case ChangeType_NewInstance: | |
99 return OrthancPluginChangeType_NewInstance; | |
100 | |
101 case ChangeType_NewPatient: | |
102 return OrthancPluginChangeType_NewPatient; | |
103 | |
104 case ChangeType_NewSeries: | |
105 return OrthancPluginChangeType_NewSeries; | |
106 | |
107 case ChangeType_NewStudy: | |
108 return OrthancPluginChangeType_NewStudy; | |
109 | |
110 case ChangeType_StablePatient: | |
111 return OrthancPluginChangeType_StablePatient; | |
112 | |
113 case ChangeType_StableSeries: | |
114 return OrthancPluginChangeType_StableSeries; | |
115 | |
116 case ChangeType_StableStudy: | |
117 return OrthancPluginChangeType_StableStudy; | |
118 | |
1773
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
119 case ChangeType_UpdatedAttachment: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
120 return OrthancPluginChangeType_UpdatedAttachment; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
121 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
122 case ChangeType_UpdatedMetadata: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
123 return OrthancPluginChangeType_UpdatedMetadata; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
124 |
5553
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5485
diff
changeset
|
125 case ChangeType_INTERNAL_All: |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5485
diff
changeset
|
126 return _OrthancPluginChangeType_All; |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5485
diff
changeset
|
127 |
1625 | 128 default: |
129 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
130 } | |
131 } | |
132 | |
133 | |
134 OrthancPluginPixelFormat Convert(PixelFormat format) | |
135 { | |
136 switch (format) | |
137 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
138 case PixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
139 return OrthancPluginPixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
140 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
141 case PixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
142 return OrthancPluginPixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
143 |
1625 | 144 case PixelFormat_Grayscale16: |
145 return OrthancPluginPixelFormat_Grayscale16; | |
146 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
147 case PixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
148 return OrthancPluginPixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
149 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
150 case PixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
151 return OrthancPluginPixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
152 |
1625 | 153 case PixelFormat_Grayscale8: |
154 return OrthancPluginPixelFormat_Grayscale8; | |
155 | |
156 case PixelFormat_RGB24: | |
157 return OrthancPluginPixelFormat_RGB24; | |
158 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
159 case PixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
160 return OrthancPluginPixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
161 |
1625 | 162 case PixelFormat_RGBA32: |
163 return OrthancPluginPixelFormat_RGBA32; | |
164 | |
165 case PixelFormat_SignedGrayscale16: | |
166 return OrthancPluginPixelFormat_SignedGrayscale16; | |
167 | |
168 default: | |
169 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
170 } | |
171 } | |
172 | |
173 | |
174 PixelFormat Convert(OrthancPluginPixelFormat format) | |
175 { | |
176 switch (format) | |
177 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
178 case OrthancPluginPixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
179 return PixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
180 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
181 case OrthancPluginPixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
182 return PixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
183 |
1625 | 184 case OrthancPluginPixelFormat_Grayscale16: |
185 return PixelFormat_Grayscale16; | |
186 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
187 case OrthancPluginPixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
188 return PixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
189 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
190 case OrthancPluginPixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
191 return PixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
192 |
1625 | 193 case OrthancPluginPixelFormat_Grayscale8: |
194 return PixelFormat_Grayscale8; | |
195 | |
196 case OrthancPluginPixelFormat_RGB24: | |
197 return PixelFormat_RGB24; | |
198 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
199 case OrthancPluginPixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
200 return PixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
201 |
1625 | 202 case OrthancPluginPixelFormat_RGBA32: |
203 return PixelFormat_RGBA32; | |
204 | |
205 case OrthancPluginPixelFormat_SignedGrayscale16: | |
206 return PixelFormat_SignedGrayscale16; | |
207 | |
208 default: | |
209 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
210 } | |
211 } | |
212 | |
213 | |
214 OrthancPluginContentType Convert(FileContentType type) | |
215 { | |
216 switch (type) | |
217 { | |
218 case FileContentType_Dicom: | |
219 return OrthancPluginContentType_Dicom; | |
220 | |
221 case FileContentType_DicomAsJson: | |
222 return OrthancPluginContentType_DicomAsJson; | |
223 | |
4597 | 224 case FileContentType_DicomUntilPixelData: |
225 return OrthancPluginContentType_DicomUntilPixelData; | |
226 | |
1625 | 227 default: |
228 return OrthancPluginContentType_Unknown; | |
229 } | |
230 } | |
231 | |
232 | |
233 FileContentType Convert(OrthancPluginContentType type) | |
234 { | |
235 switch (type) | |
236 { | |
237 case OrthancPluginContentType_Dicom: | |
238 return FileContentType_Dicom; | |
239 | |
240 case OrthancPluginContentType_DicomAsJson: | |
241 return FileContentType_DicomAsJson; | |
242 | |
4597 | 243 case OrthancPluginContentType_DicomUntilPixelData: |
244 return FileContentType_DicomUntilPixelData; | |
245 | |
1625 | 246 default: |
247 return FileContentType_Unknown; | |
248 } | |
249 } | |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
250 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
251 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
252 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
253 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
254 switch (format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
255 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
256 case OrthancPluginDicomToJsonFormat_Full: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
257 return DicomToJsonFormat_Full; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
258 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
259 case OrthancPluginDicomToJsonFormat_Short: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
260 return DicomToJsonFormat_Short; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
261 |
1860
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
262 case OrthancPluginDicomToJsonFormat_Human: |
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
263 return DicomToJsonFormat_Human; |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
264 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
265 default: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
266 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
267 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
268 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
269 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
270 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
271 OrthancPluginInstanceOrigin Convert(RequestOrigin origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
272 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
273 switch (origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
274 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
275 case RequestOrigin_DicomProtocol: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
276 return OrthancPluginInstanceOrigin_DicomProtocol; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
277 |
1823
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1816
diff
changeset
|
278 case RequestOrigin_RestApi: |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
279 return OrthancPluginInstanceOrigin_RestApi; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
280 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
281 case RequestOrigin_Lua: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
282 return OrthancPluginInstanceOrigin_Lua; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
283 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
284 case RequestOrigin_Plugins: |
1816
87c069c94ac9
plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1815
diff
changeset
|
285 return OrthancPluginInstanceOrigin_Plugin; |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
286 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
287 case RequestOrigin_Unknown: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
288 return OrthancPluginInstanceOrigin_Unknown; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
289 |
4245
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
290 case RequestOrigin_WebDav: |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
291 return OrthancPluginInstanceOrigin_WebDav; |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
292 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
293 default: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
294 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
295 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
296 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
297 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
298 |
1961
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
299 OrthancPluginHttpMethod Convert(HttpMethod method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
300 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
301 switch (method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
302 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
303 case HttpMethod_Get: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
304 return OrthancPluginHttpMethod_Get; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
305 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
306 case HttpMethod_Post: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
307 return OrthancPluginHttpMethod_Post; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
308 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
309 case HttpMethod_Put: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
310 return OrthancPluginHttpMethod_Put; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
311 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
312 case HttpMethod_Delete: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
313 return OrthancPluginHttpMethod_Delete; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
314 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
315 default: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
316 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
317 } |
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 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
320 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
321 ValueRepresentation Convert(OrthancPluginValueRepresentation vr) |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
322 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
323 switch (vr) |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
324 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
325 case OrthancPluginValueRepresentation_AE: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
326 return ValueRepresentation_ApplicationEntity; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
327 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
328 case OrthancPluginValueRepresentation_AS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
329 return ValueRepresentation_AgeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
330 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
331 case OrthancPluginValueRepresentation_AT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
332 return ValueRepresentation_AttributeTag; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
333 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
334 case OrthancPluginValueRepresentation_CS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
335 return ValueRepresentation_CodeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
336 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
337 case OrthancPluginValueRepresentation_DA: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
338 return ValueRepresentation_Date; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
339 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
340 case OrthancPluginValueRepresentation_DS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
341 return ValueRepresentation_DecimalString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
342 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
343 case OrthancPluginValueRepresentation_DT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
344 return ValueRepresentation_DateTime; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
345 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
346 case OrthancPluginValueRepresentation_FD: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
347 return ValueRepresentation_FloatingPointDouble; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
348 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
349 case OrthancPluginValueRepresentation_FL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
350 return ValueRepresentation_FloatingPointSingle; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
351 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
352 case OrthancPluginValueRepresentation_IS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
353 return ValueRepresentation_IntegerString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
354 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
355 case OrthancPluginValueRepresentation_LO: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
356 return ValueRepresentation_LongString; |
1657
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_LT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
359 return ValueRepresentation_LongText; |
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_OB: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
362 return ValueRepresentation_OtherByte; |
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_OF: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
365 return ValueRepresentation_OtherFloat; |
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_OW: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
368 return ValueRepresentation_OtherWord; |
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_PN: |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
371 return ValueRepresentation_PersonName; |
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_SH: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
374 return ValueRepresentation_ShortString; |
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_SL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
377 return ValueRepresentation_SignedLong; |
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_SQ: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
380 return ValueRepresentation_Sequence; |
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_SS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
383 return ValueRepresentation_SignedShort; |
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_ST: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
386 return ValueRepresentation_ShortText; |
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_TM: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
389 return ValueRepresentation_Time; |
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_UI: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
392 return ValueRepresentation_UniqueIdentifier; |
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_UL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
395 return ValueRepresentation_UnsignedLong; |
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_UN: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
398 return ValueRepresentation_Unknown; |
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_US: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
401 return ValueRepresentation_UnsignedShort; |
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_UT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
404 return ValueRepresentation_UnlimitedText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
405 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
406 default: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
407 throw OrthancException(ErrorCode_ParameterOutOfRange); |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
408 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
409 /* |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
410 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
|
411 return ValueRepresentation_OtherDouble |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
412 return ValueRepresentation_OtherLong |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
413 return ValueRepresentation_UniversalResource |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
414 return ValueRepresentation_UnlimitedCharacters |
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 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
418 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
419 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
420 OrthancPluginValueRepresentation Convert(ValueRepresentation vr) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
421 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
422 switch (vr) |
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 case ValueRepresentation_ApplicationEntity: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
425 return OrthancPluginValueRepresentation_AE; |
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 case ValueRepresentation_AgeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
428 return OrthancPluginValueRepresentation_AS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
429 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
430 case ValueRepresentation_AttributeTag: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
431 return OrthancPluginValueRepresentation_AT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
432 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
433 case ValueRepresentation_CodeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
434 return OrthancPluginValueRepresentation_CS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
435 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
436 case ValueRepresentation_Date: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
437 return OrthancPluginValueRepresentation_DA; |
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 case ValueRepresentation_DecimalString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
440 return OrthancPluginValueRepresentation_DS; |
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 case ValueRepresentation_DateTime: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
443 return OrthancPluginValueRepresentation_DT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
444 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
445 case ValueRepresentation_FloatingPointDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
446 return OrthancPluginValueRepresentation_FD; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
447 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
448 case ValueRepresentation_FloatingPointSingle: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
449 return OrthancPluginValueRepresentation_FL; |
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 case ValueRepresentation_IntegerString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
452 return OrthancPluginValueRepresentation_IS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
453 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
454 case ValueRepresentation_LongString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
455 return OrthancPluginValueRepresentation_LO; |
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_LongText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
458 return OrthancPluginValueRepresentation_LT; |
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_OtherByte: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
461 return OrthancPluginValueRepresentation_OB; |
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_OtherFloat: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
464 return OrthancPluginValueRepresentation_OF; |
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_OtherWord: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
467 return OrthancPluginValueRepresentation_OW; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
468 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
469 case ValueRepresentation_PersonName: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
470 return OrthancPluginValueRepresentation_PN; |
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_ShortString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
473 return OrthancPluginValueRepresentation_SH; |
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_SignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
476 return OrthancPluginValueRepresentation_SL; |
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_Sequence: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
479 return OrthancPluginValueRepresentation_SQ; |
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_SignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
482 return OrthancPluginValueRepresentation_SS; |
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_ShortText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
485 return OrthancPluginValueRepresentation_ST; |
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_Time: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
488 return OrthancPluginValueRepresentation_TM; |
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_UniqueIdentifier: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
491 return OrthancPluginValueRepresentation_UI; |
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_UnsignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
494 return OrthancPluginValueRepresentation_UL; |
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_UnsignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
497 return OrthancPluginValueRepresentation_US; |
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_UnlimitedText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
500 return OrthancPluginValueRepresentation_UT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
501 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
502 case ValueRepresentation_Unknown: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
503 return OrthancPluginValueRepresentation_UN; // Unknown |
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 // 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
|
506 // 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
|
507 case ValueRepresentation_OtherDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
508 case ValueRepresentation_OtherLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
509 case ValueRepresentation_UniversalResource: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
510 case ValueRepresentation_UnlimitedCharacters: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
511 return OrthancPluginValueRepresentation_UN; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
512 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
513 default: |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
514 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
515 } |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
516 } |
2808
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
517 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
518 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
519 OrthancPluginJobStepStatus Convert(JobStepCode step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
520 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
521 switch (step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
522 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
523 case JobStepCode_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
524 return OrthancPluginJobStepStatus_Success; |
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 case JobStepCode_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
527 return OrthancPluginJobStepStatus_Failure; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
528 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
529 case JobStepCode_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
530 return OrthancPluginJobStepStatus_Continue; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
531 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
532 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
533 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
534 } |
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 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
537 JobStepCode Convert(OrthancPluginJobStepStatus step) |
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 switch (step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
540 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
541 case OrthancPluginJobStepStatus_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
542 return JobStepCode_Success; |
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 case OrthancPluginJobStepStatus_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
545 return JobStepCode_Failure; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
546 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
547 case OrthancPluginJobStepStatus_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
548 return JobStepCode_Continue; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
549 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
550 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
551 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
552 } |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
553 } |
3662
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
554 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
555 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
556 StorageCommitmentFailureReason Convert(OrthancPluginStorageCommitmentFailureReason reason) |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
557 { |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
558 switch (reason) |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
559 { |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
560 case OrthancPluginStorageCommitmentFailureReason_Success: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
561 return StorageCommitmentFailureReason_Success; |
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 case OrthancPluginStorageCommitmentFailureReason_ProcessingFailure: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
564 return StorageCommitmentFailureReason_ProcessingFailure; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
565 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
566 case OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
567 return StorageCommitmentFailureReason_NoSuchObjectInstance; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
568 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
569 case OrthancPluginStorageCommitmentFailureReason_ResourceLimitation: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
570 return StorageCommitmentFailureReason_ResourceLimitation; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
571 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
572 case OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
573 return StorageCommitmentFailureReason_ReferencedSOPClassNotSupported; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
574 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
575 case OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
576 return StorageCommitmentFailureReason_ClassInstanceConflict; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
577 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
578 case OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
579 return StorageCommitmentFailureReason_DuplicateTransactionUID; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
580 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
581 default: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
582 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
583 } |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
584 } |
5326
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
585 |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
586 |
5337
b376abae664a
Metrics can be stored either as floating-point numbers, or as integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5336
diff
changeset
|
587 MetricsUpdatePolicy Convert(OrthancPluginMetricsType type) |
5326
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
588 { |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
589 switch (type) |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
590 { |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
591 case OrthancPluginMetricsType_Default: |
5337
b376abae664a
Metrics can be stored either as floating-point numbers, or as integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5336
diff
changeset
|
592 return MetricsUpdatePolicy_Directly; |
5326
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
593 |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
594 case OrthancPluginMetricsType_Timer: |
5337
b376abae664a
Metrics can be stored either as floating-point numbers, or as integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5336
diff
changeset
|
595 return MetricsUpdatePolicy_MaxOver10Seconds; |
5326
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
596 |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
597 default: |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
598 throw OrthancException(ErrorCode_ParameterOutOfRange); |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
599 } |
fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
600 } |
1625 | 601 } |
602 } |