annotate Plugins/Engine/PluginsEnumerations.cpp @ 1626:8dc468f44661

mapping of error codes from plugins to Orthanc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 18 Sep 2015 14:28:47 +0200
parents c17b1142caab
children ffd23c0104af
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
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #include "../../Core/OrthancException.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 namespace Orthanc
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 namespace Plugins
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 {
1626
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
42 ErrorCode Convert(OrthancPluginErrorCode error)
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
43 {
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
44 switch (error)
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
45 {
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
46 case OrthancPluginErrorCode_InternalError:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
47 return ErrorCode_InternalError;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
48
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
49 case OrthancPluginErrorCode_Success:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
50 return ErrorCode_Success;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
51
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
52 case OrthancPluginErrorCode_Plugin:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
53 return ErrorCode_Plugin;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
54
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
55 case OrthancPluginErrorCode_NotImplemented:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
56 return ErrorCode_NotImplemented;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
57
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
58 case OrthancPluginErrorCode_ParameterOutOfRange:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
59 return ErrorCode_ParameterOutOfRange;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
60
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
61 case OrthancPluginErrorCode_NotEnoughMemory:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
62 return ErrorCode_NotEnoughMemory;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
63
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
64 case OrthancPluginErrorCode_BadParameterType:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
65 return ErrorCode_BadParameterType;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
66
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
67 case OrthancPluginErrorCode_BadSequenceOfCalls:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
68 return ErrorCode_BadSequenceOfCalls;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
69
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
70 case OrthancPluginErrorCode_InexistentItem:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
71 return ErrorCode_InexistentItem;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
72
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
73 case OrthancPluginErrorCode_BadRequest:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
74 return ErrorCode_BadRequest;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
75
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
76 case OrthancPluginErrorCode_NetworkProtocol:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
77 return ErrorCode_NetworkProtocol;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
78
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
79 case OrthancPluginErrorCode_SystemCommand:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
80 return ErrorCode_SystemCommand;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
81
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
82 case OrthancPluginErrorCode_Database:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
83 return ErrorCode_Database;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
84
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
85 case OrthancPluginErrorCode_UriSyntax:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
86 return ErrorCode_UriSyntax;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
87
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
88 case OrthancPluginErrorCode_InexistentFile:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
89 return ErrorCode_InexistentFile;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
90
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
91 case OrthancPluginErrorCode_CannotWriteFile:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
92 return ErrorCode_CannotWriteFile;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
93
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
94 case OrthancPluginErrorCode_BadFileFormat:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
95 return ErrorCode_BadFileFormat;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
96
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
97 case OrthancPluginErrorCode_Timeout:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
98 return ErrorCode_Timeout;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
99
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
100 case OrthancPluginErrorCode_UnknownResource:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
101 return ErrorCode_UnknownResource;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
102
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
103 case OrthancPluginErrorCode_IncompatibleDatabaseVersion:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
104 return ErrorCode_IncompatibleDatabaseVersion;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
105
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
106 case OrthancPluginErrorCode_FullStorage:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
107 return ErrorCode_FullStorage;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
108
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
109 case OrthancPluginErrorCode_CorruptedFile:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
110 return ErrorCode_CorruptedFile;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
111
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
112 case OrthancPluginErrorCode_InexistentTag:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
113 return ErrorCode_InexistentTag;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
114
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
115 case OrthancPluginErrorCode_ReadOnly:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
116 return ErrorCode_ReadOnly;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
117
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
118 case OrthancPluginErrorCode_IncompatibleImageFormat:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
119 return ErrorCode_IncompatibleImageFormat;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
120
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
121 case OrthancPluginErrorCode_IncompatibleImageSize:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
122 return ErrorCode_IncompatibleImageSize;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
123
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
124 case OrthancPluginErrorCode_SharedLibrary:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
125 return ErrorCode_SharedLibrary;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
126
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
127 case OrthancPluginErrorCode_UnknownPluginService:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
128 return ErrorCode_UnknownPluginService;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
129
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
130 case OrthancPluginErrorCode_UnknownDicomTag:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
131 return ErrorCode_UnknownDicomTag;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
132
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
133 case OrthancPluginErrorCode_BadJson:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
134 return ErrorCode_BadJson;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
135
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
136 case OrthancPluginErrorCode_Unauthorized:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
137 return ErrorCode_Unauthorized;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
138
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
139 case OrthancPluginErrorCode_BadFont:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
140 return ErrorCode_BadFont;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
141
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
142 case OrthancPluginErrorCode_SQLiteNotOpened:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
143 return ErrorCode_SQLiteNotOpened;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
144
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
145 case OrthancPluginErrorCode_SQLiteAlreadyOpened:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
146 return ErrorCode_SQLiteAlreadyOpened;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
147
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
148 case OrthancPluginErrorCode_SQLiteCannotOpen:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
149 return ErrorCode_SQLiteCannotOpen;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
150
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
151 case OrthancPluginErrorCode_SQLiteStatementAlreadyUsed:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
152 return ErrorCode_SQLiteStatementAlreadyUsed;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
153
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
154 case OrthancPluginErrorCode_SQLiteExecute:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
155 return ErrorCode_SQLiteExecute;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
156
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
157 case OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
158 return ErrorCode_SQLiteRollbackWithoutTransaction;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
159
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
160 case OrthancPluginErrorCode_SQLiteCommitWithoutTransaction:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
161 return ErrorCode_SQLiteCommitWithoutTransaction;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
162
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
163 case OrthancPluginErrorCode_SQLiteRegisterFunction:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
164 return ErrorCode_SQLiteRegisterFunction;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
165
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
166 case OrthancPluginErrorCode_SQLiteFlush:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
167 return ErrorCode_SQLiteFlush;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
168
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
169 case OrthancPluginErrorCode_SQLiteCannotRun:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
170 return ErrorCode_SQLiteCannotRun;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
171
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
172 case OrthancPluginErrorCode_SQLiteCannotStep:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
173 return ErrorCode_SQLiteCannotStep;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
174
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
175 case OrthancPluginErrorCode_SQLiteBindOutOfRange:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
176 return ErrorCode_SQLiteBindOutOfRange;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
177
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
178 case OrthancPluginErrorCode_SQLitePrepareStatement:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
179 return ErrorCode_SQLitePrepareStatement;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
180
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
181 case OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
182 return ErrorCode_SQLiteTransactionAlreadyStarted;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
183
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
184 case OrthancPluginErrorCode_SQLiteTransactionCommit:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
185 return ErrorCode_SQLiteTransactionCommit;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
186
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
187 case OrthancPluginErrorCode_SQLiteTransactionBegin:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
188 return ErrorCode_SQLiteTransactionBegin;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
189
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
190 case OrthancPluginErrorCode_DirectoryOverFile:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
191 return ErrorCode_DirectoryOverFile;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
192
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
193 case OrthancPluginErrorCode_FileStorageCannotWrite:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
194 return ErrorCode_FileStorageCannotWrite;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
195
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
196 case OrthancPluginErrorCode_DirectoryExpected:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
197 return ErrorCode_DirectoryExpected;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
198
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
199 case OrthancPluginErrorCode_HttpPortInUse:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
200 return ErrorCode_HttpPortInUse;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
201
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
202 case OrthancPluginErrorCode_DicomPortInUse:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
203 return ErrorCode_DicomPortInUse;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
204
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
205 case OrthancPluginErrorCode_BadHttpStatusInRest:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
206 return ErrorCode_BadHttpStatusInRest;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
207
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
208 case OrthancPluginErrorCode_RegularFileExpected:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
209 return ErrorCode_RegularFileExpected;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
210
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
211 case OrthancPluginErrorCode_PathToExecutable:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
212 return ErrorCode_PathToExecutable;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
213
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
214 case OrthancPluginErrorCode_MakeDirectory:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
215 return ErrorCode_MakeDirectory;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
216
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
217 case OrthancPluginErrorCode_BadApplicationEntityTitle:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
218 return ErrorCode_BadApplicationEntityTitle;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
219
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
220 case OrthancPluginErrorCode_NoCFindHandler:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
221 return ErrorCode_NoCFindHandler;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
222
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
223 case OrthancPluginErrorCode_NoCMoveHandler:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
224 return ErrorCode_NoCMoveHandler;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
225
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
226 case OrthancPluginErrorCode_NoCStoreHandler:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
227 return ErrorCode_NoCStoreHandler;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
228
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
229 case OrthancPluginErrorCode_NoApplicationEntityFilter:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
230 return ErrorCode_NoApplicationEntityFilter;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
231
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
232 case OrthancPluginErrorCode_NoSopClassOrInstance:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
233 return ErrorCode_NoSopClassOrInstance;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
234
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
235 case OrthancPluginErrorCode_NoPresentationContext:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
236 return ErrorCode_NoPresentationContext;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
237
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
238 case OrthancPluginErrorCode_DicomFindUnavailable:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
239 return ErrorCode_DicomFindUnavailable;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
240
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
241 case OrthancPluginErrorCode_DicomMoveUnavailable:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
242 return ErrorCode_DicomMoveUnavailable;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
243
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
244 case OrthancPluginErrorCode_CannotStoreInstance:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
245 return ErrorCode_CannotStoreInstance;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
246
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
247 case OrthancPluginErrorCode_CreateDicomNotString:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
248 return ErrorCode_CreateDicomNotString;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
249
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
250 case OrthancPluginErrorCode_CreateDicomOverrideTag:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
251 return ErrorCode_CreateDicomOverrideTag;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
252
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
253 case OrthancPluginErrorCode_CreateDicomUseContent:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
254 return ErrorCode_CreateDicomUseContent;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
255
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
256 case OrthancPluginErrorCode_CreateDicomNoPayload:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
257 return ErrorCode_CreateDicomNoPayload;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
258
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
259 case OrthancPluginErrorCode_CreateDicomUseDataUriScheme:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
260 return ErrorCode_CreateDicomUseDataUriScheme;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
261
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
262 case OrthancPluginErrorCode_CreateDicomBadParent:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
263 return ErrorCode_CreateDicomBadParent;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
264
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
265 case OrthancPluginErrorCode_CreateDicomParentIsInstance:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
266 return ErrorCode_CreateDicomParentIsInstance;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
267
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
268 case OrthancPluginErrorCode_CreateDicomParentEncoding:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
269 return ErrorCode_CreateDicomParentEncoding;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
270
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
271 case OrthancPluginErrorCode_UnknownModality:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
272 return ErrorCode_UnknownModality;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
273
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
274 case OrthancPluginErrorCode_BadJobOrdering:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
275 return ErrorCode_BadJobOrdering;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
276
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
277 case OrthancPluginErrorCode_JsonToLuaTable:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
278 return ErrorCode_JsonToLuaTable;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
279
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
280 case OrthancPluginErrorCode_CannotCreateLua:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
281 return ErrorCode_CannotCreateLua;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
282
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
283 case OrthancPluginErrorCode_CannotExecuteLua:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
284 return ErrorCode_CannotExecuteLua;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
285
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
286 case OrthancPluginErrorCode_LuaAlreadyExecuted:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
287 return ErrorCode_LuaAlreadyExecuted;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
288
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
289 case OrthancPluginErrorCode_LuaBadOutput:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
290 return ErrorCode_LuaBadOutput;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
291
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
292 case OrthancPluginErrorCode_NotLuaPredicate:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
293 return ErrorCode_NotLuaPredicate;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
294
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
295 case OrthancPluginErrorCode_LuaReturnsNoString:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
296 return ErrorCode_LuaReturnsNoString;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
297
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
298 default:
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
299 return ErrorCode_Plugin;
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
300 }
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
301 }
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
302
8dc468f44661 mapping of error codes from plugins to Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
303
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 OrthancPluginResourceType Convert(ResourceType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 case ResourceType_Patient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 return OrthancPluginResourceType_Patient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
311 case ResourceType_Study:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 return OrthancPluginResourceType_Study;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314 case ResourceType_Series:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 return OrthancPluginResourceType_Series;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317 case ResourceType_Instance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318 return OrthancPluginResourceType_Instance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
322 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
323 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
324
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326 OrthancPluginChangeType Convert(ChangeType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
328 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
329 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
330 case ChangeType_CompletedSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331 return OrthancPluginChangeType_CompletedSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
332
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333 case ChangeType_Deleted:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 return OrthancPluginChangeType_Deleted;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336 case ChangeType_NewChildInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337 return OrthancPluginChangeType_NewChildInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339 case ChangeType_NewInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
340 return OrthancPluginChangeType_NewInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
341
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 case ChangeType_NewPatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 return OrthancPluginChangeType_NewPatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345 case ChangeType_NewSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346 return OrthancPluginChangeType_NewSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
348 case ChangeType_NewStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
349 return OrthancPluginChangeType_NewStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
350
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 case ChangeType_StablePatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 return OrthancPluginChangeType_StablePatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 case ChangeType_StableSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 return OrthancPluginChangeType_StableSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 case ChangeType_StableStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358 return OrthancPluginChangeType_StableStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366 OrthancPluginPixelFormat Convert(PixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370 case PixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 return OrthancPluginPixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 case PixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374 return OrthancPluginPixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 case PixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
377 return OrthancPluginPixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
378
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
379 case PixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 return OrthancPluginPixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382 case PixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
383 return OrthancPluginPixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
384
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
385 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
386 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
387 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
388 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
389
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
390
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
391 PixelFormat Convert(OrthancPluginPixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
392 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
393 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
394 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
395 case OrthancPluginPixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
396 return PixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
397
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
398 case OrthancPluginPixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
399 return PixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
400
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
401 case OrthancPluginPixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
402 return PixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
403
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
404 case OrthancPluginPixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 return PixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
407 case OrthancPluginPixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
408 return PixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
410 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
411 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
412 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
415
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
416 OrthancPluginContentType Convert(FileContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
417 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
418 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
419 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
420 case FileContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
421 return OrthancPluginContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
422
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
423 case FileContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
424 return OrthancPluginContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
425
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
426 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
427 return OrthancPluginContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
428 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
429 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
430
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
431
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
432 FileContentType Convert(OrthancPluginContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
433 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
434 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
435 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
436 case OrthancPluginContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
437 return FileContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
438
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
439 case OrthancPluginContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
440 return FileContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
441
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
442 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
443 return FileContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
444 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
445 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
446 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
447 }