Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Engine/PluginsEnumerations.cpp @ 5169:8b74aa4f3515
enforce the existence of the patient/study/instance while creating its archive
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 24 Feb 2023 18:07:35 +0100 |
parents | 6eff25f70121 |
children | 0ea402b4d901 |
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 |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1625 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
4045 | 23 #include "../../Sources/PrecompiledHeadersServer.h" |
1625 | 24 #include "PluginsEnumerations.h" |
25 | |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
26 #if ORTHANC_ENABLE_PLUGINS != 1 |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
27 #error The plugin support is disabled |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
28 #endif |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
29 |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
30 |
4045 | 31 #include "../../../OrthancFramework/Sources/OrthancException.h" |
1625 | 32 |
33 namespace Orthanc | |
34 { | |
3074
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
35 namespace Compatibility |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
36 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
37 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
38 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
39 switch (constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
40 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
41 case Compatibility::IdentifierConstraintType_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
42 return OrthancPluginIdentifierConstraint_Equal; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
43 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
44 case Compatibility::IdentifierConstraintType_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
45 return OrthancPluginIdentifierConstraint_GreaterOrEqual; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
46 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
47 case Compatibility::IdentifierConstraintType_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
48 return OrthancPluginIdentifierConstraint_SmallerOrEqual; |
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 case Compatibility::IdentifierConstraintType_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
51 return OrthancPluginIdentifierConstraint_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
52 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
53 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
54 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
55 } |
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 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint) |
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 switch (constraint) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
62 { |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
63 case OrthancPluginIdentifierConstraint_Equal: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
64 return Compatibility::IdentifierConstraintType_Equal; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
65 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
66 case OrthancPluginIdentifierConstraint_GreaterOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
67 return Compatibility::IdentifierConstraintType_GreaterOrEqual; |
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 case OrthancPluginIdentifierConstraint_SmallerOrEqual: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
70 return Compatibility::IdentifierConstraintType_SmallerOrEqual; |
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 case OrthancPluginIdentifierConstraint_Wildcard: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
73 return Compatibility::IdentifierConstraintType_Wildcard; |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
74 |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
75 default: |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
76 throw OrthancException(ErrorCode_ParameterOutOfRange); |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
77 } |
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 |
1625 | 82 namespace Plugins |
83 { | |
4024
1d2b31fc782f
new 'changes': JobSubmitted, JobSuccess, JobFailure
Alain Mazy <alain@mazy.be>
parents:
4022
diff
changeset
|
84 OrthancPluginChangeType Convert(ChangeType type) |
1625 | 85 { |
86 switch (type) | |
87 { | |
88 case ChangeType_CompletedSeries: | |
89 return OrthancPluginChangeType_CompletedSeries; | |
90 | |
91 case ChangeType_Deleted: | |
92 return OrthancPluginChangeType_Deleted; | |
93 | |
94 case ChangeType_NewChildInstance: | |
95 return OrthancPluginChangeType_NewChildInstance; | |
96 | |
97 case ChangeType_NewInstance: | |
98 return OrthancPluginChangeType_NewInstance; | |
99 | |
100 case ChangeType_NewPatient: | |
101 return OrthancPluginChangeType_NewPatient; | |
102 | |
103 case ChangeType_NewSeries: | |
104 return OrthancPluginChangeType_NewSeries; | |
105 | |
106 case ChangeType_NewStudy: | |
107 return OrthancPluginChangeType_NewStudy; | |
108 | |
109 case ChangeType_StablePatient: | |
110 return OrthancPluginChangeType_StablePatient; | |
111 | |
112 case ChangeType_StableSeries: | |
113 return OrthancPluginChangeType_StableSeries; | |
114 | |
115 case ChangeType_StableStudy: | |
116 return OrthancPluginChangeType_StableStudy; | |
117 | |
1773
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
118 case ChangeType_UpdatedAttachment: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
119 return OrthancPluginChangeType_UpdatedAttachment; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
120 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
121 case ChangeType_UpdatedMetadata: |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
122 return OrthancPluginChangeType_UpdatedMetadata; |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
123 |
1625 | 124 default: |
125 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
126 } | |
127 } | |
128 | |
129 | |
130 OrthancPluginPixelFormat Convert(PixelFormat format) | |
131 { | |
132 switch (format) | |
133 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
134 case PixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
135 return OrthancPluginPixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
136 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
137 case PixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
138 return OrthancPluginPixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
139 |
1625 | 140 case PixelFormat_Grayscale16: |
141 return OrthancPluginPixelFormat_Grayscale16; | |
142 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
143 case PixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
144 return OrthancPluginPixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
145 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
146 case PixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
147 return OrthancPluginPixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
148 |
1625 | 149 case PixelFormat_Grayscale8: |
150 return OrthancPluginPixelFormat_Grayscale8; | |
151 | |
152 case PixelFormat_RGB24: | |
153 return OrthancPluginPixelFormat_RGB24; | |
154 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
155 case PixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
156 return OrthancPluginPixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
157 |
1625 | 158 case PixelFormat_RGBA32: |
159 return OrthancPluginPixelFormat_RGBA32; | |
160 | |
161 case PixelFormat_SignedGrayscale16: | |
162 return OrthancPluginPixelFormat_SignedGrayscale16; | |
163 | |
164 default: | |
165 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
166 } | |
167 } | |
168 | |
169 | |
170 PixelFormat Convert(OrthancPluginPixelFormat format) | |
171 { | |
172 switch (format) | |
173 { | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
174 case OrthancPluginPixelFormat_BGRA32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
175 return PixelFormat_BGRA32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
176 |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
177 case OrthancPluginPixelFormat_Float32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
178 return PixelFormat_Float32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
179 |
1625 | 180 case OrthancPluginPixelFormat_Grayscale16: |
181 return PixelFormat_Grayscale16; | |
182 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
183 case OrthancPluginPixelFormat_Grayscale32: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
184 return PixelFormat_Grayscale32; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
185 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
186 case OrthancPluginPixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
187 return PixelFormat_Grayscale64; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
188 |
1625 | 189 case OrthancPluginPixelFormat_Grayscale8: |
190 return PixelFormat_Grayscale8; | |
191 | |
192 case OrthancPluginPixelFormat_RGB24: | |
193 return PixelFormat_RGB24; | |
194 | |
2424
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
195 case OrthancPluginPixelFormat_RGB48: |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
196 return PixelFormat_RGB48; |
7ef9207f31d4
New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
197 |
1625 | 198 case OrthancPluginPixelFormat_RGBA32: |
199 return PixelFormat_RGBA32; | |
200 | |
201 case OrthancPluginPixelFormat_SignedGrayscale16: | |
202 return PixelFormat_SignedGrayscale16; | |
203 | |
204 default: | |
205 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
206 } | |
207 } | |
208 | |
209 | |
210 OrthancPluginContentType Convert(FileContentType type) | |
211 { | |
212 switch (type) | |
213 { | |
214 case FileContentType_Dicom: | |
215 return OrthancPluginContentType_Dicom; | |
216 | |
217 case FileContentType_DicomAsJson: | |
218 return OrthancPluginContentType_DicomAsJson; | |
219 | |
4597 | 220 case FileContentType_DicomUntilPixelData: |
221 return OrthancPluginContentType_DicomUntilPixelData; | |
222 | |
1625 | 223 default: |
224 return OrthancPluginContentType_Unknown; | |
225 } | |
226 } | |
227 | |
228 | |
229 FileContentType Convert(OrthancPluginContentType type) | |
230 { | |
231 switch (type) | |
232 { | |
233 case OrthancPluginContentType_Dicom: | |
234 return FileContentType_Dicom; | |
235 | |
236 case OrthancPluginContentType_DicomAsJson: | |
237 return FileContentType_DicomAsJson; | |
238 | |
4597 | 239 case OrthancPluginContentType_DicomUntilPixelData: |
240 return FileContentType_DicomUntilPixelData; | |
241 | |
1625 | 242 default: |
243 return FileContentType_Unknown; | |
244 } | |
245 } | |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
246 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
247 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
248 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
249 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
250 switch (format) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
251 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
252 case OrthancPluginDicomToJsonFormat_Full: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
253 return DicomToJsonFormat_Full; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
254 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
255 case OrthancPluginDicomToJsonFormat_Short: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
256 return DicomToJsonFormat_Short; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
257 |
1860
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
258 case OrthancPluginDicomToJsonFormat_Human: |
c7d70f659190
DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1823
diff
changeset
|
259 return DicomToJsonFormat_Human; |
1740
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 default: |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
262 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
263 } |
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 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1671
diff
changeset
|
266 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
267 OrthancPluginInstanceOrigin Convert(RequestOrigin origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
268 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
269 switch (origin) |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
270 { |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
271 case RequestOrigin_DicomProtocol: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
272 return OrthancPluginInstanceOrigin_DicomProtocol; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
273 |
1823
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1816
diff
changeset
|
274 case RequestOrigin_RestApi: |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
275 return OrthancPluginInstanceOrigin_RestApi; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
276 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
277 case RequestOrigin_Lua: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
278 return OrthancPluginInstanceOrigin_Lua; |
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 case RequestOrigin_Plugins: |
1816
87c069c94ac9
plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1815
diff
changeset
|
281 return OrthancPluginInstanceOrigin_Plugin; |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
282 |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
283 case RequestOrigin_Unknown: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
284 return OrthancPluginInstanceOrigin_Unknown; |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
285 |
4245
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
286 case RequestOrigin_WebDav: |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
287 return OrthancPluginInstanceOrigin_WebDav; |
c70df925151e
RequestOrigin_WebDav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
288 |
1815
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
289 default: |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
290 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
291 } |
2abfdca9b915
OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
292 } |
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 |
1961
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
295 OrthancPluginHttpMethod Convert(HttpMethod method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
296 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
297 switch (method) |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
298 { |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
299 case HttpMethod_Get: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
300 return OrthancPluginHttpMethod_Get; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
301 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
302 case HttpMethod_Post: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
303 return OrthancPluginHttpMethod_Post; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
304 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
305 case HttpMethod_Put: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
306 return OrthancPluginHttpMethod_Put; |
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 case HttpMethod_Delete: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
309 return OrthancPluginHttpMethod_Delete; |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
310 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
311 default: |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
312 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
313 } |
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 |
ef1e9856c26f
New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
316 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
317 ValueRepresentation Convert(OrthancPluginValueRepresentation vr) |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
318 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
319 switch (vr) |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
320 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
321 case OrthancPluginValueRepresentation_AE: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
322 return ValueRepresentation_ApplicationEntity; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
323 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
324 case OrthancPluginValueRepresentation_AS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
325 return ValueRepresentation_AgeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
326 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
327 case OrthancPluginValueRepresentation_AT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
328 return ValueRepresentation_AttributeTag; |
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 case OrthancPluginValueRepresentation_CS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
331 return ValueRepresentation_CodeString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
332 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
333 case OrthancPluginValueRepresentation_DA: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
334 return ValueRepresentation_Date; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
335 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
336 case OrthancPluginValueRepresentation_DS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
337 return ValueRepresentation_DecimalString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
338 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
339 case OrthancPluginValueRepresentation_DT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
340 return ValueRepresentation_DateTime; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
341 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
342 case OrthancPluginValueRepresentation_FD: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
343 return ValueRepresentation_FloatingPointDouble; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
344 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
345 case OrthancPluginValueRepresentation_FL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
346 return ValueRepresentation_FloatingPointSingle; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
347 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
348 case OrthancPluginValueRepresentation_IS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
349 return ValueRepresentation_IntegerString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
350 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
351 case OrthancPluginValueRepresentation_LO: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
352 return ValueRepresentation_LongString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
353 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
354 case OrthancPluginValueRepresentation_LT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
355 return ValueRepresentation_LongText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
356 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
357 case OrthancPluginValueRepresentation_OB: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
358 return ValueRepresentation_OtherByte; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
359 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
360 case OrthancPluginValueRepresentation_OF: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
361 return ValueRepresentation_OtherFloat; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
362 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
363 case OrthancPluginValueRepresentation_OW: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
364 return ValueRepresentation_OtherWord; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
365 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
366 case OrthancPluginValueRepresentation_PN: |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
367 return ValueRepresentation_PersonName; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
368 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
369 case OrthancPluginValueRepresentation_SH: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
370 return ValueRepresentation_ShortString; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
371 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
372 case OrthancPluginValueRepresentation_SL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
373 return ValueRepresentation_SignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
374 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
375 case OrthancPluginValueRepresentation_SQ: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
376 return ValueRepresentation_Sequence; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
377 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
378 case OrthancPluginValueRepresentation_SS: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
379 return ValueRepresentation_SignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
380 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
381 case OrthancPluginValueRepresentation_ST: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
382 return ValueRepresentation_ShortText; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
383 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
384 case OrthancPluginValueRepresentation_TM: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
385 return ValueRepresentation_Time; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
386 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
387 case OrthancPluginValueRepresentation_UI: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
388 return ValueRepresentation_UniqueIdentifier; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
389 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
390 case OrthancPluginValueRepresentation_UL: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
391 return ValueRepresentation_UnsignedLong; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
392 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
393 case OrthancPluginValueRepresentation_UN: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
394 return ValueRepresentation_Unknown; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
395 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
396 case OrthancPluginValueRepresentation_US: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
397 return ValueRepresentation_UnsignedShort; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
398 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
399 case OrthancPluginValueRepresentation_UT: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
400 return ValueRepresentation_UnlimitedText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
401 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
402 default: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
403 throw OrthancException(ErrorCode_ParameterOutOfRange); |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
404 |
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 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
|
407 return ValueRepresentation_OtherDouble |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
408 return ValueRepresentation_OtherLong |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
409 return ValueRepresentation_UniversalResource |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
410 return ValueRepresentation_UnlimitedCharacters |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
411 */ |
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 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
414 |
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 OrthancPluginValueRepresentation Convert(ValueRepresentation vr) |
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 switch (vr) |
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 case ValueRepresentation_ApplicationEntity: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
421 return OrthancPluginValueRepresentation_AE; |
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 case ValueRepresentation_AgeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
424 return OrthancPluginValueRepresentation_AS; |
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 case ValueRepresentation_AttributeTag: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
427 return OrthancPluginValueRepresentation_AT; |
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 case ValueRepresentation_CodeString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
430 return OrthancPluginValueRepresentation_CS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
431 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
432 case ValueRepresentation_Date: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
433 return OrthancPluginValueRepresentation_DA; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
434 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
435 case ValueRepresentation_DecimalString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
436 return OrthancPluginValueRepresentation_DS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
437 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
438 case ValueRepresentation_DateTime: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
439 return OrthancPluginValueRepresentation_DT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
440 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
441 case ValueRepresentation_FloatingPointDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
442 return OrthancPluginValueRepresentation_FD; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
443 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
444 case ValueRepresentation_FloatingPointSingle: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
445 return OrthancPluginValueRepresentation_FL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
446 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
447 case ValueRepresentation_IntegerString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
448 return OrthancPluginValueRepresentation_IS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
449 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
450 case ValueRepresentation_LongString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
451 return OrthancPluginValueRepresentation_LO; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
452 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
453 case ValueRepresentation_LongText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
454 return OrthancPluginValueRepresentation_LT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
455 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
456 case ValueRepresentation_OtherByte: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
457 return OrthancPluginValueRepresentation_OB; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
458 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
459 case ValueRepresentation_OtherFloat: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
460 return OrthancPluginValueRepresentation_OF; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
461 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
462 case ValueRepresentation_OtherWord: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
463 return OrthancPluginValueRepresentation_OW; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
464 |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
465 case ValueRepresentation_PersonName: |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
466 return OrthancPluginValueRepresentation_PN; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
467 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
468 case ValueRepresentation_ShortString: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
469 return OrthancPluginValueRepresentation_SH; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
470 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
471 case ValueRepresentation_SignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
472 return OrthancPluginValueRepresentation_SL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
473 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
474 case ValueRepresentation_Sequence: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
475 return OrthancPluginValueRepresentation_SQ; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
476 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
477 case ValueRepresentation_SignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
478 return OrthancPluginValueRepresentation_SS; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
479 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
480 case ValueRepresentation_ShortText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
481 return OrthancPluginValueRepresentation_ST; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
482 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
483 case ValueRepresentation_Time: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
484 return OrthancPluginValueRepresentation_TM; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
485 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
486 case ValueRepresentation_UniqueIdentifier: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
487 return OrthancPluginValueRepresentation_UI; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
488 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
489 case ValueRepresentation_UnsignedLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
490 return OrthancPluginValueRepresentation_UL; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
491 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
492 case ValueRepresentation_UnsignedShort: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
493 return OrthancPluginValueRepresentation_US; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
494 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
495 case ValueRepresentation_UnlimitedText: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
496 return OrthancPluginValueRepresentation_UT; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
497 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
498 case ValueRepresentation_Unknown: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
499 return OrthancPluginValueRepresentation_UN; // Unknown |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
500 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
501 // 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
|
502 // 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
|
503 case ValueRepresentation_OtherDouble: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
504 case ValueRepresentation_OtherLong: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
505 case ValueRepresentation_UniversalResource: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
506 case ValueRepresentation_UnlimitedCharacters: |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1961
diff
changeset
|
507 return OrthancPluginValueRepresentation_UN; |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
508 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
509 default: |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
510 throw OrthancException(ErrorCode_ParameterOutOfRange); |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
511 } |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1646
diff
changeset
|
512 } |
2808
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
513 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
514 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
515 OrthancPluginJobStepStatus Convert(JobStepCode step) |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
516 { |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
517 switch (step) |
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 case JobStepCode_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
520 return OrthancPluginJobStepStatus_Success; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
521 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
522 case JobStepCode_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
523 return OrthancPluginJobStepStatus_Failure; |
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 case JobStepCode_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
526 return OrthancPluginJobStepStatus_Continue; |
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 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
529 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
530 } |
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 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
533 JobStepCode Convert(OrthancPluginJobStepStatus step) |
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 switch (step) |
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 case OrthancPluginJobStepStatus_Success: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
538 return JobStepCode_Success; |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
539 |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
540 case OrthancPluginJobStepStatus_Failure: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
541 return JobStepCode_Failure; |
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 case OrthancPluginJobStepStatus_Continue: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
544 return JobStepCode_Continue; |
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 default: |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
547 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
548 } |
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2645
diff
changeset
|
549 } |
3662
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
550 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
551 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
552 StorageCommitmentFailureReason Convert(OrthancPluginStorageCommitmentFailureReason reason) |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
553 { |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
554 switch (reason) |
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 case OrthancPluginStorageCommitmentFailureReason_Success: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
557 return StorageCommitmentFailureReason_Success; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
558 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
559 case OrthancPluginStorageCommitmentFailureReason_ProcessingFailure: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
560 return StorageCommitmentFailureReason_ProcessingFailure; |
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 case OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
563 return StorageCommitmentFailureReason_NoSuchObjectInstance; |
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 case OrthancPluginStorageCommitmentFailureReason_ResourceLimitation: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
566 return StorageCommitmentFailureReason_ResourceLimitation; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
567 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
568 case OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
569 return StorageCommitmentFailureReason_ReferencedSOPClassNotSupported; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
570 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
571 case OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
572 return StorageCommitmentFailureReason_ClassInstanceConflict; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
573 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
574 case OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
575 return StorageCommitmentFailureReason_DuplicateTransactionUID; |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
576 |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
577 default: |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
578 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
579 } |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
580 } |
1625 | 581 } |
582 } |