annotate Plugins/Engine/PluginsEnumerations.cpp @ 1657:5360cdba70d8

New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 29 Sep 2015 16:31:48 +0200
parents da799f767e5d
children a412ad57f0f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * In addition, as a special exception, the copyright holders of this
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * program give permission to link the code of its release with the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * the linked executables. You must obey the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * you do not wish to do so, delete this exception statement from your
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * version. If you delete this exception statement from all source files
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * in the program, then also delete it here.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #include "../../OrthancServer/PrecompiledHeadersServer.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include "PluginsEnumerations.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
1632
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
36 #if ORTHANC_PLUGINS_ENABLED != 1
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
37 #error The plugin support is disabled
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
38 #endif
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
39
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
40
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include "../../Core/OrthancException.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 namespace Orthanc
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 namespace Plugins
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 OrthancPluginResourceType Convert(ResourceType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 case ResourceType_Patient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 return OrthancPluginResourceType_Patient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 case ResourceType_Study:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 return OrthancPluginResourceType_Study;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 case ResourceType_Series:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 return OrthancPluginResourceType_Series;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 case ResourceType_Instance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 return OrthancPluginResourceType_Instance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 OrthancPluginChangeType Convert(ChangeType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 case ChangeType_CompletedSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 return OrthancPluginChangeType_CompletedSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 case ChangeType_Deleted:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 return OrthancPluginChangeType_Deleted;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 case ChangeType_NewChildInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 return OrthancPluginChangeType_NewChildInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 case ChangeType_NewInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 return OrthancPluginChangeType_NewInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 case ChangeType_NewPatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 return OrthancPluginChangeType_NewPatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 case ChangeType_NewSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 return OrthancPluginChangeType_NewSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 case ChangeType_NewStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 return OrthancPluginChangeType_NewStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 case ChangeType_StablePatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 return OrthancPluginChangeType_StablePatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 case ChangeType_StableSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 return OrthancPluginChangeType_StableSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 case ChangeType_StableStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 return OrthancPluginChangeType_StableStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 OrthancPluginPixelFormat Convert(PixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 case PixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 return OrthancPluginPixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 case PixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 return OrthancPluginPixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 case PixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 return OrthancPluginPixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 case PixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 return OrthancPluginPixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 case PixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 return OrthancPluginPixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 PixelFormat Convert(OrthancPluginPixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 case OrthancPluginPixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 return PixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 case OrthancPluginPixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 return PixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 case OrthancPluginPixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 return PixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 case OrthancPluginPixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 return PixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 case OrthancPluginPixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 return PixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 OrthancPluginContentType Convert(FileContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 case FileContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 return OrthancPluginContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 case FileContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 return OrthancPluginContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 return OrthancPluginContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 FileContentType Convert(OrthancPluginContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 case OrthancPluginContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 return FileContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 case OrthancPluginContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 return FileContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 return FileContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 }
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
189
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
190
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
191
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
192 DcmEVR Convert(OrthancPluginValueRepresentation vr)
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
193 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
194 switch (vr)
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
195 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
196 case OrthancPluginValueRepresentation_AE:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
197 return EVR_AE;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
198
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
199 case OrthancPluginValueRepresentation_AS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
200 return EVR_AS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
201
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
202 case OrthancPluginValueRepresentation_AT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
203 return EVR_AT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
204
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
205 case OrthancPluginValueRepresentation_CS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
206 return EVR_CS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
207
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
208 case OrthancPluginValueRepresentation_DA:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
209 return EVR_DA;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
210
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
211 case OrthancPluginValueRepresentation_DS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
212 return EVR_DS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
213
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
214 case OrthancPluginValueRepresentation_DT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
215 return EVR_DT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
216
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
217 case OrthancPluginValueRepresentation_FD:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
218 return EVR_FD;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
219
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
220 case OrthancPluginValueRepresentation_FL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
221 return EVR_FL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
222
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
223 case OrthancPluginValueRepresentation_IS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
224 return EVR_IS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
225
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
226 case OrthancPluginValueRepresentation_LO:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
227 return EVR_LO;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
228
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
229 case OrthancPluginValueRepresentation_LT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
230 return EVR_LT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
231
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
232 case OrthancPluginValueRepresentation_OB:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
233 return EVR_OB;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
234
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
235 case OrthancPluginValueRepresentation_OF:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
236 return EVR_OF;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
237
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
238 case OrthancPluginValueRepresentation_OW:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
239 return EVR_OW;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
240
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
241 case OrthancPluginValueRepresentation_PN:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
242 return EVR_PN;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
243
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
244 case OrthancPluginValueRepresentation_SH:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
245 return EVR_SH;
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 case OrthancPluginValueRepresentation_SL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
248 return EVR_SL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
249
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
250 case OrthancPluginValueRepresentation_SQ:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
251 return EVR_SQ;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
252
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
253 case OrthancPluginValueRepresentation_SS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
254 return EVR_SS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
255
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
256 case OrthancPluginValueRepresentation_ST:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
257 return EVR_ST;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
258
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
259 case OrthancPluginValueRepresentation_TM:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
260 return EVR_TM;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
261
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
262 case OrthancPluginValueRepresentation_UI:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
263 return EVR_UI;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
264
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
265 case OrthancPluginValueRepresentation_UL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
266 return EVR_UL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
267
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
268 case OrthancPluginValueRepresentation_UN:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
269 return EVR_UN;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
270
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
271 case OrthancPluginValueRepresentation_US:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
272 return EVR_US;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
273
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
274 case OrthancPluginValueRepresentation_UT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
275 return EVR_UT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
276
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
277 default:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
278 throw OrthancException(ErrorCode_ParameterOutOfRange);
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
279 }
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
280 }
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 }