annotate Plugins/Engine/PluginsEnumerations.cpp @ 1636:8c4f1de71f8d

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