Mercurial > hg > orthanc-python
annotate Sources/Autogenerated/sdk_GlobalFunctions.impl.h @ 77:e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Aug 2021 18:16:42 +0200 |
parents | cbfc72a53970 |
children | eb6ac5a801d1 |
rev | line source |
---|---|
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Python plugin for Orthanc |
56
23f3099bed47
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
49
diff
changeset
|
3 * Copyright (C) 2020-2021 Osimis S.A., Belgium |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * This program is free software: you can redistribute it and/or |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * modify it under the terms of the GNU Affero General Public License |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * as published by the Free Software Foundation, either version 3 of |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * the License, or (at your option) any later version. |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, but |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * WITHOUT ANY WARRANTY; without even the implied warranty of |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * Affero General Public License for more details. |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU Affero General Public License |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 **/ |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 static PyObject* sdk_OrthancPluginCheckVersionAdvanced(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
22 PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersionAdvanced()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 int arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 if (!PyArg_ParseTuple(args, "iii", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 long value = OrthancPluginCheckVersionAdvanced(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 static PyObject* sdk_OrthancPluginCheckVersion(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
40 PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersion()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 long value = OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 static PyObject* sdk_OrthancPluginLogError(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
50 PythonLock::LogCall("Calling Python global function: OrthancPluginLogError()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 OrthancPluginLogError(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 static PyObject* sdk_OrthancPluginLogWarning(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
68 PythonLock::LogCall("Calling Python global function: OrthancPluginLogWarning()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 static PyObject* sdk_OrthancPluginLogInfo(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
86 PythonLock::LogCall("Calling Python global function: OrthancPluginLogInfo()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 OrthancPluginLogInfo(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 static PyObject* sdk_OrthancPluginGetDicomForInstance(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
104 PythonLock::LogCall("Calling Python global function: OrthancPluginGetDicomForInstance()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 OrthancPluginErrorCode code = OrthancPluginGetDicomForInstance(OrthancPlugins::GetGlobalContext(), *buffer, arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
122 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 static PyObject* sdk_OrthancPluginRestApiGet(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
129 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGet()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 OrthancPluginErrorCode code = OrthancPluginRestApiGet(OrthancPlugins::GetGlobalContext(), *buffer, arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
147 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 static PyObject* sdk_OrthancPluginRestApiGetAfterPlugins(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
154 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGetAfterPlugins()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 OrthancPluginErrorCode code = OrthancPluginRestApiGetAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
172 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 static PyObject* sdk_OrthancPluginRestApiPost(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
179 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPost()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 OrthancPluginErrorCode code = OrthancPluginRestApiPost(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
198 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 static PyObject* sdk_OrthancPluginRestApiPostAfterPlugins(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
205 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPostAfterPlugins()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
215 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 OrthancPluginErrorCode code = OrthancPluginRestApiPostAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
218 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
223 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
224 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
227 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
228 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 static PyObject* sdk_OrthancPluginRestApiDelete(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
230 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
231 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDelete()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
235 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
238 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
239 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
240 OrthancPluginErrorCode code = OrthancPluginRestApiDelete(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
241 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
242 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
243 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
244 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
245 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
246 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
247 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
248 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
249 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
250 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
251 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
252 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
253 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
254 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
255 static PyObject* sdk_OrthancPluginRestApiDeleteAfterPlugins(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
256 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
257 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDeleteAfterPlugins()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
258 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
259 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
260 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
261 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
262 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
263 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
264 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
265 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
266 OrthancPluginErrorCode code = OrthancPluginRestApiDeleteAfterPlugins(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
267 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
268 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
269 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
270 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
271 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
272 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
273 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
274 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
275 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
276 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
277 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
278 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
279 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
280 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
281 static PyObject* sdk_OrthancPluginRestApiPut(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
282 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
283 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPut()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
284 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
285 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
286 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
287 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
288 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
289 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
290 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
291 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
292 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
293 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
294 OrthancPluginErrorCode code = OrthancPluginRestApiPut(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
295 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
296 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
297 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
298 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
299 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
300 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
301 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
302 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
303 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
304 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
305 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
306 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
307 static PyObject* sdk_OrthancPluginRestApiPutAfterPlugins(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
308 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
309 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPutAfterPlugins()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
310 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
311 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
312 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
313 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
314 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
315 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
316 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
317 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
318 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
319 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
320 OrthancPluginErrorCode code = OrthancPluginRestApiPutAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
321 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
322 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
323 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
324 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
325 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
326 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
327 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
328 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
329 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
330 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
331 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
332 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
333 static PyObject* sdk_OrthancPluginLookupPatient(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
334 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
335 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupPatient()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
336 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
337 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
338 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
339 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
340 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
341 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
342 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
343 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
344 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
345 s.Assign(OrthancPluginLookupPatient(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
346 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
347 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
348 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
349 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
350 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
351 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
352 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
353 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
354 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
355 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
356 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
357 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
358 static PyObject* sdk_OrthancPluginLookupStudy(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
359 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
360 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudy()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
361 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
362 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
363 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
364 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
365 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
366 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
367 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
368 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
369 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
370 s.Assign(OrthancPluginLookupStudy(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
371 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
372 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
373 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
374 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
375 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
376 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
377 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
378 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
379 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
380 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
381 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
382 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
383 static PyObject* sdk_OrthancPluginLookupStudyWithAccessionNumber(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
384 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
385 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudyWithAccessionNumber()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
386 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
387 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
388 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
389 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
390 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
391 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
392 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
393 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
394 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
395 s.Assign(OrthancPluginLookupStudyWithAccessionNumber(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
396 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
397 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
398 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
399 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
400 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
401 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
402 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
403 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
404 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
405 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
406 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
407 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
408 static PyObject* sdk_OrthancPluginLookupSeries(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
409 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
410 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupSeries()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
411 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
412 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
413 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
414 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
415 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
416 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
417 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
418 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
419 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
420 s.Assign(OrthancPluginLookupSeries(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
421 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
422 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
423 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
424 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
425 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
426 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
427 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
428 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
429 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
430 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
431 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
432 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
433 static PyObject* sdk_OrthancPluginLookupInstance(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
434 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
435 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupInstance()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
436 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
437 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
438 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
439 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
440 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
441 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
442 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
443 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
444 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
445 s.Assign(OrthancPluginLookupInstance(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
446 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
447 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
448 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
449 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
450 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
451 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
452 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
453 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
454 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
455 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
456 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
457 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
458 static PyObject* sdk_OrthancPluginGetOrthancPath(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
459 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
460 PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancPath()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
461 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
462 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
463 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
464 s.Assign(OrthancPluginGetOrthancPath(OrthancPlugins::GetGlobalContext())); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
465 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
466 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
467 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
468 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
469 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
470 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
471 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
472 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
473 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
474 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
475 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
476 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
477 static PyObject* sdk_OrthancPluginGetOrthancDirectory(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
478 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
479 PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancDirectory()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
480 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
481 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
482 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
483 s.Assign(OrthancPluginGetOrthancDirectory(OrthancPlugins::GetGlobalContext())); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
484 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
485 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
486 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
487 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
488 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
489 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
490 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
491 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
492 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
493 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
494 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
495 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
496 static PyObject* sdk_OrthancPluginGetConfigurationPath(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
497 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
498 PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfigurationPath()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
499 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
500 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
501 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
502 s.Assign(OrthancPluginGetConfigurationPath(OrthancPlugins::GetGlobalContext())); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
503 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
504 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
505 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
506 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
507 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
508 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
509 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
510 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
511 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
512 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
513 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
514 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
515 static PyObject* sdk_OrthancPluginSetRootUri(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
516 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
517 PythonLock::LogCall("Calling Python global function: OrthancPluginSetRootUri()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
518 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
519 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
520 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
521 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
522 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
523 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
524 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
525 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
526 OrthancPluginSetRootUri(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
527 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
528 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
529 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
530 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
531 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
532 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
533 static PyObject* sdk_OrthancPluginSetDescription(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
534 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
535 PythonLock::LogCall("Calling Python global function: OrthancPluginSetDescription()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
536 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
537 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
538 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
539 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
540 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
541 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
542 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
543 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
544 OrthancPluginSetDescription(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
545 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
546 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
547 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
548 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
549 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
550 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
551 static PyObject* sdk_OrthancPluginExtendOrthancExplorer(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
552 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
553 PythonLock::LogCall("Calling Python global function: OrthancPluginExtendOrthancExplorer()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
554 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
555 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
556 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
557 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
558 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
559 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
560 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
561 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
562 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
563 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
564 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
565 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
566 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
567 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
568 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
569 static PyObject* sdk_OrthancPluginGetGlobalProperty(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
570 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
571 PythonLock::LogCall("Calling Python global function: OrthancPluginGetGlobalProperty()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
572 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
573 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
574 const char* arg1 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
575 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
576 if (!PyArg_ParseTuple(args, "ls", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
577 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
578 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
579 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
580 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
581 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
582 s.Assign(OrthancPluginGetGlobalProperty(OrthancPlugins::GetGlobalContext(), arg0, arg1)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
583 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
584 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
585 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
586 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
587 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
588 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
589 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
590 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
591 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
592 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
593 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
594 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
595 static PyObject* sdk_OrthancPluginSetGlobalProperty(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
596 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
597 PythonLock::LogCall("Calling Python global function: OrthancPluginSetGlobalProperty()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
598 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
599 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
600 const char* arg1 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
601 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
602 if (!PyArg_ParseTuple(args, "ls", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
603 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
604 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
605 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
606 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
607 OrthancPluginErrorCode code = OrthancPluginSetGlobalProperty(OrthancPlugins::GetGlobalContext(), arg0, arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
608 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
609 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
610 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
611 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
612 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
613 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
614 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
615 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
616 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
617 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
618 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
619 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
620 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
621 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
622 static PyObject* sdk_OrthancPluginGetCommandLineArgumentsCount(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
623 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
624 PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgumentsCount()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
625 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
626 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
627 long value = OrthancPluginGetCommandLineArgumentsCount(OrthancPlugins::GetGlobalContext()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
628 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
629 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
630 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
631 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
632 static PyObject* sdk_OrthancPluginGetCommandLineArgument(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
633 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
634 PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgument()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
635 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
636 unsigned long arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
637 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
638 if (!PyArg_ParseTuple(args, "k", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
639 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
640 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
641 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
642 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
643 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
644 s.Assign(OrthancPluginGetCommandLineArgument(OrthancPlugins::GetGlobalContext(), arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
645 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
646 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
647 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
648 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
649 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
650 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
651 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
652 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
653 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
654 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
655 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
656 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
657 static PyObject* sdk_OrthancPluginGetExpectedDatabaseVersion(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
658 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
659 PythonLock::LogCall("Calling Python global function: OrthancPluginGetExpectedDatabaseVersion()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
660 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
661 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
662 long value = OrthancPluginGetExpectedDatabaseVersion(OrthancPlugins::GetGlobalContext()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
663 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
664 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
665 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
666 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
667 static PyObject* sdk_OrthancPluginGetConfiguration(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
668 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
669 PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfiguration()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
670 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
671 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
672 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
673 s.Assign(OrthancPluginGetConfiguration(OrthancPlugins::GetGlobalContext())); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
674 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
675 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
676 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
677 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
678 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
679 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
680 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
681 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
682 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
683 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
684 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
685 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
686 static PyObject* sdk_OrthancPluginBufferCompression(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
687 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
688 PythonLock::LogCall("Calling Python global function: OrthancPluginBufferCompression()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
689 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
690 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
691 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
692 unsigned char arg3 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
693 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
694 if (!PyArg_ParseTuple(args, "s*lb", &arg0, &arg2, &arg3)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
695 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
696 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
697 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
698 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
699 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
700 OrthancPluginErrorCode code = OrthancPluginBufferCompression(OrthancPlugins::GetGlobalContext(), *buffer, arg0.buf, arg0.len, static_cast<OrthancPluginCompressionType>(arg2), arg3); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
701 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
702 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
703 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
704 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
705 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
706 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
707 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
708 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
709 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
710 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
711 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
712 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
713 static PyObject* sdk_OrthancPluginReadFile(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
714 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
715 PythonLock::LogCall("Calling Python global function: OrthancPluginReadFile()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
716 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
717 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
718 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
719 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
720 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
721 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
722 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
723 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
724 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
725 OrthancPluginErrorCode code = OrthancPluginReadFile(OrthancPlugins::GetGlobalContext(), *buffer, arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
726 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
727 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
728 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
729 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
730 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
731 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
732 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
733 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
734 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
735 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
736 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
737 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
738 static PyObject* sdk_OrthancPluginWriteFile(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
739 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
740 PythonLock::LogCall("Calling Python global function: OrthancPluginWriteFile()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
741 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
742 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
743 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
744 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
745 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
746 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
747 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
748 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
749 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
750 OrthancPluginErrorCode code = OrthancPluginWriteFile(OrthancPlugins::GetGlobalContext(), arg0, arg1.buf, arg1.len); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
751 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
752 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
753 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
754 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
755 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
756 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
757 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
758 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
759 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
760 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
761 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
762 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
763 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
764 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
765 static PyObject* sdk_OrthancPluginGetErrorDescription(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
766 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
767 PythonLock::LogCall("Calling Python global function: OrthancPluginGetErrorDescription()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
768 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
769 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
770 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
771 if (!PyArg_ParseTuple(args, "l", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
772 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
773 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
774 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
775 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
776 const char* s = OrthancPluginGetErrorDescription(OrthancPlugins::GetGlobalContext(), static_cast<OrthancPluginErrorCode>(arg0)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
777 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
778 if (s == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
779 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
780 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
781 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
782 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
783 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
784 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
785 return PyUnicode_FromString(s); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
786 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
787 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
788 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
789 static PyObject* sdk_OrthancPluginUncompressImage(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
790 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
791 PythonLock::LogCall("Calling Python global function: OrthancPluginUncompressImage()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
792 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
793 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
794 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
795 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
796 if (!PyArg_ParseTuple(args, "s*l", &arg0, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
797 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
798 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
799 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
800 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
801 // This is the case of a constructor |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
802 OrthancPluginImage* obj = OrthancPluginUncompressImage(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, static_cast<OrthancPluginImageFormat>(arg2)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
803 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
804 if (obj == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
805 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
806 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
807 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
808 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
809 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
810 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
811 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
812 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
813 Py_DECREF(argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
814 return python; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
815 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
816 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
817 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
818 static PyObject* sdk_OrthancPluginCompressPngImage(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
819 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
820 PythonLock::LogCall("Calling Python global function: OrthancPluginCompressPngImage()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
821 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
822 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
823 unsigned long arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
824 unsigned long arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
825 unsigned long arg3 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
826 Py_buffer arg4; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
827 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
828 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
829 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
830 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
831 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
832 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
833 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
834 OrthancPluginErrorCode code = OrthancPluginCompressPngImage(OrthancPlugins::GetGlobalContext(), *buffer, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
835 PyBuffer_Release(&arg4); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
836 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
837 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
838 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
839 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
840 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
841 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
842 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
843 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
844 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
845 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
846 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
847 static PyObject* sdk_OrthancPluginCompressJpegImage(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
848 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
849 PythonLock::LogCall("Calling Python global function: OrthancPluginCompressJpegImage()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
850 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
851 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
852 unsigned long arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
853 unsigned long arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
854 unsigned long arg3 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
855 Py_buffer arg4; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
856 unsigned char arg5 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
857 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
858 if (!PyArg_ParseTuple(args, "lkkks*b", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
859 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
860 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
861 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
862 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
863 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
864 OrthancPluginErrorCode code = OrthancPluginCompressJpegImage(OrthancPlugins::GetGlobalContext(), *buffer, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
865 PyBuffer_Release(&arg4); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
866 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
867 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
868 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
869 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
870 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
871 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
872 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
873 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
874 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
875 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
876 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
877 static PyObject* sdk_OrthancPluginHttpGet(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
878 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
879 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpGet()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
880 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
881 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
882 const char* arg1 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
883 const char* arg2 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
884 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
885 if (!PyArg_ParseTuple(args, "sss", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
886 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
887 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
888 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
889 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
890 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
891 OrthancPluginErrorCode code = OrthancPluginHttpGet(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
892 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
893 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
894 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
895 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
896 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
897 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
898 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
899 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
900 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
901 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
902 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
903 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
904 static PyObject* sdk_OrthancPluginHttpPost(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
905 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
906 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPost()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
907 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
908 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
909 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
910 const char* arg3 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
911 const char* arg4 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
912 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
913 if (!PyArg_ParseTuple(args, "ss*ss", &arg0, &arg1, &arg3, &arg4)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
914 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
915 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
916 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
917 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
918 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
919 OrthancPluginErrorCode code = OrthancPluginHttpPost(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len, arg3, arg4); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
920 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
921 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
922 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
923 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
924 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
925 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
926 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
927 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
928 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
929 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
930 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
931 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
932 static PyObject* sdk_OrthancPluginHttpPut(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
933 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
934 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPut()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
935 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
936 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
937 Py_buffer arg1; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
938 const char* arg3 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
939 const char* arg4 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
940 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
941 if (!PyArg_ParseTuple(args, "ss*ss", &arg0, &arg1, &arg3, &arg4)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
942 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
943 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
944 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
945 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
946 OrthancPlugins::MemoryBuffer buffer; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
947 OrthancPluginErrorCode code = OrthancPluginHttpPut(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len, arg3, arg4); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
948 PyBuffer_Release(&arg1); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
949 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
950 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
951 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
952 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
953 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
954 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
955 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
956 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
957 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
958 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
959 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
960 static PyObject* sdk_OrthancPluginHttpDelete(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
961 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
962 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpDelete()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
963 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
964 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
965 const char* arg1 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
966 const char* arg2 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
967 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
968 if (!PyArg_ParseTuple(args, "sss", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
969 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
970 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
971 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
972 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
973 OrthancPluginErrorCode code = OrthancPluginHttpDelete(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
974 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
975 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
976 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
977 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
978 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
979 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
980 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
981 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
982 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
983 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
984 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
985 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
986 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
987 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
988 static PyObject* sdk_OrthancPluginGetFontsCount(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
989 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
990 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontsCount()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
991 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
992 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
993 long value = OrthancPluginGetFontsCount(OrthancPlugins::GetGlobalContext()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
994 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
995 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
996 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
997 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
998 static PyObject* sdk_OrthancPluginGetFontName(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
999 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1000 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontName()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1001 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1002 unsigned long arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1003 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1004 if (!PyArg_ParseTuple(args, "k", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1005 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1006 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1007 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1008 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1009 const char* s = OrthancPluginGetFontName(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1010 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1011 if (s == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1012 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1013 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1014 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1015 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1016 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1017 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1018 return PyUnicode_FromString(s); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1019 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1020 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1021 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1022 static PyObject* sdk_OrthancPluginGetFontSize(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1023 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1024 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontSize()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1025 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1026 unsigned long arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1027 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1028 if (!PyArg_ParseTuple(args, "k", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1029 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1030 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1031 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1032 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1033 long value = OrthancPluginGetFontSize(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1034 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1035 return PyLong_FromLong(value); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1036 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1037 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1038 static PyObject* sdk_OrthancPluginRegisterErrorCode(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1039 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1040 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterErrorCode()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1041 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1042 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1043 unsigned short arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1044 const char* arg2 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1045 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1046 if (!PyArg_ParseTuple(args, "lHs", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1047 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1048 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1049 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1050 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1051 OrthancPluginErrorCode code = OrthancPluginRegisterErrorCode(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1052 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1053 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1054 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1055 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1056 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1057 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1058 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1059 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1060 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1061 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1062 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1063 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1064 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1065 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1066 static PyObject* sdk_OrthancPluginRegisterDictionaryTag(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1067 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1068 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterDictionaryTag()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1069 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1070 unsigned short arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1071 unsigned short arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1072 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1073 const char* arg3 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1074 unsigned long arg4 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1075 unsigned long arg5 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1076 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1077 if (!PyArg_ParseTuple(args, "HHlskk", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1078 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1079 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1080 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1081 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1082 OrthancPluginErrorCode code = OrthancPluginRegisterDictionaryTag(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginValueRepresentation>(arg2), arg3, arg4, arg5); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1083 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1084 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1085 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1086 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1087 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1088 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1089 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1090 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1091 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1092 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1093 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1094 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1095 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1096 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1097 static PyObject* sdk_OrthancPluginRegisterPrivateDictionaryTag(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1098 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1099 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterPrivateDictionaryTag()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1100 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1101 unsigned short arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1102 unsigned short arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1103 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1104 const char* arg3 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1105 unsigned long arg4 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1106 unsigned long arg5 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1107 const char* arg6 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1108 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1109 if (!PyArg_ParseTuple(args, "HHlskks", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1110 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1111 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1112 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1113 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1114 OrthancPluginErrorCode code = OrthancPluginRegisterPrivateDictionaryTag(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginValueRepresentation>(arg2), arg3, arg4, arg5, arg6); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1115 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1116 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1117 if (code == OrthancPluginErrorCode_Success) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1118 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1119 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1120 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1121 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1122 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1123 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1124 PythonLock::RaiseException(code); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1125 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1126 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1127 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1128 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1129 static PyObject* sdk_OrthancPluginDicomBufferToJson(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1130 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1131 PythonLock::LogCall("Calling Python global function: OrthancPluginDicomBufferToJson()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1132 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1133 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1134 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1135 long int arg3 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1136 unsigned long arg4 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1137 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1138 if (!PyArg_ParseTuple(args, "s*llk", &arg0, &arg2, &arg3, &arg4)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1139 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1140 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1141 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1142 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1143 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1144 s.Assign(OrthancPluginDicomBufferToJson(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, static_cast<OrthancPluginDicomToJsonFormat>(arg2), static_cast<OrthancPluginDicomToJsonFlags>(arg3), arg4)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1145 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1146 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1147 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1148 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1149 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1150 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1151 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1152 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1153 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1154 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1155 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1156 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1157 static PyObject* sdk_OrthancPluginDicomInstanceToJson(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1158 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1159 PythonLock::LogCall("Calling Python global function: OrthancPluginDicomInstanceToJson()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1160 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1161 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1162 long int arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1163 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1164 unsigned long arg3 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1165 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1166 if (!PyArg_ParseTuple(args, "sllk", &arg0, &arg1, &arg2, &arg3)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1167 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1168 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1169 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1170 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1171 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1172 s.Assign(OrthancPluginDicomInstanceToJson(OrthancPlugins::GetGlobalContext(), arg0, static_cast<OrthancPluginDicomToJsonFormat>(arg1), static_cast<OrthancPluginDicomToJsonFlags>(arg2), arg3)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1173 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1174 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1175 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1176 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1177 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1178 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1179 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1180 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1181 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1182 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1183 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1184 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1185 static PyObject* sdk_OrthancPluginCreateImage(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1186 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1187 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateImage()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1188 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1189 long int arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1190 unsigned long arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1191 unsigned long arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1192 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1193 if (!PyArg_ParseTuple(args, "lkk", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1194 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1195 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1196 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1197 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1198 // This is the case of a constructor |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1199 OrthancPluginImage* obj = OrthancPluginCreateImage(OrthancPlugins::GetGlobalContext(), static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1200 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1201 if (obj == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1202 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1203 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1204 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1205 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1206 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1207 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1208 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1209 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1210 Py_DECREF(argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1211 return python; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1212 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1213 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1214 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1215 static PyObject* sdk_OrthancPluginDecodeDicomImage(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1216 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1217 PythonLock::LogCall("Calling Python global function: OrthancPluginDecodeDicomImage()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1218 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1219 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1220 unsigned long arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1221 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1222 if (!PyArg_ParseTuple(args, "s*k", &arg0, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1223 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1224 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1225 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1226 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1227 // This is the case of a constructor |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1228 OrthancPluginImage* obj = OrthancPluginDecodeDicomImage(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, arg2); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1229 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1230 if (obj == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1231 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1232 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1233 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1234 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1235 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1236 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1237 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1238 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1239 Py_DECREF(argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1240 return python; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1241 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1242 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1243 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1244 static PyObject* sdk_OrthancPluginComputeMd5(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1245 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1246 PythonLock::LogCall("Calling Python global function: OrthancPluginComputeMd5()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1247 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1248 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1249 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1250 if (!PyArg_ParseTuple(args, "s*", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1251 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1252 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1253 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1254 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1255 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1256 s.Assign(OrthancPluginComputeMd5(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1257 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1258 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1259 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1260 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1261 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1262 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1263 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1264 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1265 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1266 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1267 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1268 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1269 static PyObject* sdk_OrthancPluginComputeSha1(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1270 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1271 PythonLock::LogCall("Calling Python global function: OrthancPluginComputeSha1()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1272 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1273 Py_buffer arg0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1274 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1275 if (!PyArg_ParseTuple(args, "s*", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1276 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1277 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1278 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1279 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1280 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1281 s.Assign(OrthancPluginComputeSha1(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1282 PyBuffer_Release(&arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1283 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1284 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1285 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1286 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1287 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1288 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1289 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1290 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1291 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1292 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1293 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1294 static PyObject* sdk_OrthancPluginGenerateUuid(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1295 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1296 PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateUuid()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1297 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1298 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1299 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1300 s.Assign(OrthancPluginGenerateUuid(OrthancPlugins::GetGlobalContext())); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1301 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1302 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1303 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1304 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1305 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1306 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1307 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1308 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1309 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1310 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1311 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1312 |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1313 static PyObject* sdk_OrthancPluginCreateFindMatcher(PyObject* module, PyObject* args) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1314 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1315 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateFindMatcher()"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1316 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1317 Py_buffer arg0; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1318 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1319 if (!PyArg_ParseTuple(args, "s*", &arg0)) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1320 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1321 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1322 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1323 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1324 // This is the case of a constructor |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1325 OrthancPluginFindMatcher* obj = OrthancPluginCreateFindMatcher(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1326 PyBuffer_Release(&arg0); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1327 if (obj == NULL) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1328 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1329 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1330 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1331 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1332 else |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1333 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1334 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1335 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginFindMatcher_Type, argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1336 Py_DECREF(argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1337 return python; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1338 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1339 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1340 |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1341 static PyObject* sdk_OrthancPluginGetPeers(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1342 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1343 PythonLock::LogCall("Calling Python global function: OrthancPluginGetPeers()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1344 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1345 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1346 // This is the case of a constructor |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1347 OrthancPluginPeers* obj = OrthancPluginGetPeers(OrthancPlugins::GetGlobalContext()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1348 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1349 if (obj == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1350 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1351 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1352 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1353 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1354 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1355 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1356 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1357 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginPeers_Type, argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1358 Py_DECREF(argList); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1359 return python; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1360 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1361 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1362 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1363 static PyObject* sdk_OrthancPluginAutodetectMimeType(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1364 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1365 PythonLock::LogCall("Calling Python global function: OrthancPluginAutodetectMimeType()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1366 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1367 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1368 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1369 if (!PyArg_ParseTuple(args, "s", &arg0)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1370 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1371 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1372 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1373 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1374 const char* s = OrthancPluginAutodetectMimeType(OrthancPlugins::GetGlobalContext(), arg0); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1375 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1376 if (s == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1377 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1378 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1379 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1380 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1381 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1382 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1383 return PyUnicode_FromString(s); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1384 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1385 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1386 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1387 static PyObject* sdk_OrthancPluginSetMetricsValue(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1388 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1389 PythonLock::LogCall("Calling Python global function: OrthancPluginSetMetricsValue()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1390 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1391 const char* arg0 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1392 float arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1393 long int arg2 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1394 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1395 if (!PyArg_ParseTuple(args, "sfl", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1396 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1397 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1398 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1399 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1400 OrthancPluginSetMetricsValue(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginMetricsType>(arg2)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1401 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1402 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1403 Py_INCREF(Py_None); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1404 return Py_None; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1405 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1406 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1407 static PyObject* sdk_OrthancPluginGetTagName(PyObject* module, PyObject* args) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1408 { |
28
b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
1409 PythonLock::LogCall("Calling Python global function: OrthancPluginGetTagName()"); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1410 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1411 unsigned short arg0 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1412 unsigned short arg1 = 0; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1413 const char* arg2 = NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1414 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1415 if (!PyArg_ParseTuple(args, "HHs", &arg0, &arg1, &arg2)) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1416 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1417 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)"); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1418 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1419 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1420 OrthancPlugins::OrthancString s; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1421 s.Assign(OrthancPluginGetTagName(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2)); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1422 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1423 if (s.GetContent() == NULL) |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1424 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1425 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1426 return NULL; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1427 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1428 else |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1429 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1430 return PyUnicode_FromString(s.GetContent()); |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1431 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1432 } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1433 |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1434 static PyObject* sdk_OrthancPluginCreateDicomInstance(PyObject* module, PyObject* args) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1435 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1436 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateDicomInstance()"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1437 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1438 Py_buffer arg0; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1439 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1440 if (!PyArg_ParseTuple(args, "s*", &arg0)) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1441 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1442 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1443 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1444 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1445 // This is the case of a constructor |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1446 OrthancPluginDicomInstance* obj = OrthancPluginCreateDicomInstance(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1447 PyBuffer_Release(&arg0); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1448 if (obj == NULL) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1449 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1450 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1451 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1452 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1453 else |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1454 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1455 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1456 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginDicomInstance_Type, argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1457 Py_DECREF(argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1458 return python; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1459 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1460 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1461 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1462 static PyObject* sdk_OrthancPluginTranscodeDicomInstance(PyObject* module, PyObject* args) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1463 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1464 PythonLock::LogCall("Calling Python global function: OrthancPluginTranscodeDicomInstance()"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1465 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1466 Py_buffer arg0; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1467 const char* arg2 = NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1468 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1469 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2)) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1470 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1471 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1472 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1473 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1474 // This is the case of a constructor |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1475 OrthancPluginDicomInstance* obj = OrthancPluginTranscodeDicomInstance(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, arg2); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1476 PyBuffer_Release(&arg0); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1477 if (obj == NULL) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1478 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1479 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1480 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1481 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1482 else |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1483 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1484 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1485 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginDicomInstance_Type, argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1486 Py_DECREF(argList); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1487 return python; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1488 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1489 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1490 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1491 static PyObject* sdk_OrthancPluginCreateMemoryBuffer(PyObject* module, PyObject* args) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1492 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1493 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateMemoryBuffer()"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1494 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1495 unsigned long arg0 = 0; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1496 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1497 if (!PyArg_ParseTuple(args, "k", &arg0)) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1498 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1499 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1500 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1501 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1502 OrthancPlugins::MemoryBuffer buffer; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1503 OrthancPluginErrorCode code = OrthancPluginCreateMemoryBuffer(OrthancPlugins::GetGlobalContext(), *buffer, arg0); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1504 |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1505 if (code == OrthancPluginErrorCode_Success) |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1506 { |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1507 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1508 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1509 else |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1510 { |
77
e7ff5efb100d
Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
75
diff
changeset
|
1511 PythonLock::RaiseException(code); |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1512 return NULL; |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1513 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1514 } |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1515 |
49
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1516 static PyObject* sdk_OrthancPluginGenerateRestApiAuthorizationToken(PyObject* module, PyObject* args) |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1517 { |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1518 PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateRestApiAuthorizationToken()"); |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1519 |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1520 |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1521 OrthancPlugins::OrthancString s; |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1522 s.Assign(OrthancPluginGenerateRestApiAuthorizationToken(OrthancPlugins::GetGlobalContext())); |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1523 |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1524 if (s.GetContent() == NULL) |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1525 { |
75
cbfc72a53970
refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
56
diff
changeset
|
1526 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
49
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1527 return NULL; |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1528 } |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1529 else |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1530 { |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1531 return PyUnicode_FromString(s.GetContent()); |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1532 } |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1533 } |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1534 |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1535 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1536 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] = |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1537 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1538 { "CheckVersionAdvanced", sdk_OrthancPluginCheckVersionAdvanced, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1539 "Generated from C function OrthancPluginCheckVersionAdvanced()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1540 { "CheckVersion", sdk_OrthancPluginCheckVersion, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1541 "Generated from C function OrthancPluginCheckVersion()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1542 { "LogError", sdk_OrthancPluginLogError, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1543 "Generated from C function OrthancPluginLogError()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1544 { "LogWarning", sdk_OrthancPluginLogWarning, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1545 "Generated from C function OrthancPluginLogWarning()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1546 { "LogInfo", sdk_OrthancPluginLogInfo, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1547 "Generated from C function OrthancPluginLogInfo()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1548 { "GetDicomForInstance", sdk_OrthancPluginGetDicomForInstance, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1549 "Generated from C function OrthancPluginGetDicomForInstance()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1550 { "RestApiGet", sdk_OrthancPluginRestApiGet, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1551 "Generated from C function OrthancPluginRestApiGet()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1552 { "RestApiGetAfterPlugins", sdk_OrthancPluginRestApiGetAfterPlugins, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1553 "Generated from C function OrthancPluginRestApiGetAfterPlugins()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1554 { "RestApiPost", sdk_OrthancPluginRestApiPost, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1555 "Generated from C function OrthancPluginRestApiPost()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1556 { "RestApiPostAfterPlugins", sdk_OrthancPluginRestApiPostAfterPlugins, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1557 "Generated from C function OrthancPluginRestApiPostAfterPlugins()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1558 { "RestApiDelete", sdk_OrthancPluginRestApiDelete, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1559 "Generated from C function OrthancPluginRestApiDelete()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1560 { "RestApiDeleteAfterPlugins", sdk_OrthancPluginRestApiDeleteAfterPlugins, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1561 "Generated from C function OrthancPluginRestApiDeleteAfterPlugins()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1562 { "RestApiPut", sdk_OrthancPluginRestApiPut, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1563 "Generated from C function OrthancPluginRestApiPut()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1564 { "RestApiPutAfterPlugins", sdk_OrthancPluginRestApiPutAfterPlugins, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1565 "Generated from C function OrthancPluginRestApiPutAfterPlugins()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1566 { "LookupPatient", sdk_OrthancPluginLookupPatient, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1567 "Generated from C function OrthancPluginLookupPatient()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1568 { "LookupStudy", sdk_OrthancPluginLookupStudy, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1569 "Generated from C function OrthancPluginLookupStudy()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1570 { "LookupStudyWithAccessionNumber", sdk_OrthancPluginLookupStudyWithAccessionNumber, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1571 "Generated from C function OrthancPluginLookupStudyWithAccessionNumber()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1572 { "LookupSeries", sdk_OrthancPluginLookupSeries, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1573 "Generated from C function OrthancPluginLookupSeries()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1574 { "LookupInstance", sdk_OrthancPluginLookupInstance, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1575 "Generated from C function OrthancPluginLookupInstance()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1576 { "GetOrthancPath", sdk_OrthancPluginGetOrthancPath, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1577 "Generated from C function OrthancPluginGetOrthancPath()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1578 { "GetOrthancDirectory", sdk_OrthancPluginGetOrthancDirectory, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1579 "Generated from C function OrthancPluginGetOrthancDirectory()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1580 { "GetConfigurationPath", sdk_OrthancPluginGetConfigurationPath, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1581 "Generated from C function OrthancPluginGetConfigurationPath()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1582 { "SetRootUri", sdk_OrthancPluginSetRootUri, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1583 "Generated from C function OrthancPluginSetRootUri()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1584 { "SetDescription", sdk_OrthancPluginSetDescription, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1585 "Generated from C function OrthancPluginSetDescription()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1586 { "ExtendOrthancExplorer", sdk_OrthancPluginExtendOrthancExplorer, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1587 "Generated from C function OrthancPluginExtendOrthancExplorer()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1588 { "GetGlobalProperty", sdk_OrthancPluginGetGlobalProperty, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1589 "Generated from C function OrthancPluginGetGlobalProperty()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1590 { "SetGlobalProperty", sdk_OrthancPluginSetGlobalProperty, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1591 "Generated from C function OrthancPluginSetGlobalProperty()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1592 { "GetCommandLineArgumentsCount", sdk_OrthancPluginGetCommandLineArgumentsCount, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1593 "Generated from C function OrthancPluginGetCommandLineArgumentsCount()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1594 { "GetCommandLineArgument", sdk_OrthancPluginGetCommandLineArgument, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1595 "Generated from C function OrthancPluginGetCommandLineArgument()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1596 { "GetExpectedDatabaseVersion", sdk_OrthancPluginGetExpectedDatabaseVersion, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1597 "Generated from C function OrthancPluginGetExpectedDatabaseVersion()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1598 { "GetConfiguration", sdk_OrthancPluginGetConfiguration, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1599 "Generated from C function OrthancPluginGetConfiguration()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1600 { "BufferCompression", sdk_OrthancPluginBufferCompression, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1601 "Generated from C function OrthancPluginBufferCompression()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1602 { "ReadFile", sdk_OrthancPluginReadFile, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1603 "Generated from C function OrthancPluginReadFile()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1604 { "WriteFile", sdk_OrthancPluginWriteFile, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1605 "Generated from C function OrthancPluginWriteFile()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1606 { "GetErrorDescription", sdk_OrthancPluginGetErrorDescription, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1607 "Generated from C function OrthancPluginGetErrorDescription()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1608 { "UncompressImage", sdk_OrthancPluginUncompressImage, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1609 "Generated from C function OrthancPluginUncompressImage()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1610 { "CompressPngImage", sdk_OrthancPluginCompressPngImage, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1611 "Generated from C function OrthancPluginCompressPngImage()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1612 { "CompressJpegImage", sdk_OrthancPluginCompressJpegImage, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1613 "Generated from C function OrthancPluginCompressJpegImage()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1614 { "HttpGet", sdk_OrthancPluginHttpGet, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1615 "Generated from C function OrthancPluginHttpGet()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1616 { "HttpPost", sdk_OrthancPluginHttpPost, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1617 "Generated from C function OrthancPluginHttpPost()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1618 { "HttpPut", sdk_OrthancPluginHttpPut, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1619 "Generated from C function OrthancPluginHttpPut()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1620 { "HttpDelete", sdk_OrthancPluginHttpDelete, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1621 "Generated from C function OrthancPluginHttpDelete()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1622 { "GetFontsCount", sdk_OrthancPluginGetFontsCount, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1623 "Generated from C function OrthancPluginGetFontsCount()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1624 { "GetFontName", sdk_OrthancPluginGetFontName, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1625 "Generated from C function OrthancPluginGetFontName()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1626 { "GetFontSize", sdk_OrthancPluginGetFontSize, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1627 "Generated from C function OrthancPluginGetFontSize()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1628 { "RegisterErrorCode", sdk_OrthancPluginRegisterErrorCode, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1629 "Generated from C function OrthancPluginRegisterErrorCode()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1630 { "RegisterDictionaryTag", sdk_OrthancPluginRegisterDictionaryTag, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1631 "Generated from C function OrthancPluginRegisterDictionaryTag()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1632 { "RegisterPrivateDictionaryTag", sdk_OrthancPluginRegisterPrivateDictionaryTag, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1633 "Generated from C function OrthancPluginRegisterPrivateDictionaryTag()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1634 { "DicomBufferToJson", sdk_OrthancPluginDicomBufferToJson, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1635 "Generated from C function OrthancPluginDicomBufferToJson()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1636 { "DicomInstanceToJson", sdk_OrthancPluginDicomInstanceToJson, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1637 "Generated from C function OrthancPluginDicomInstanceToJson()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1638 { "CreateImage", sdk_OrthancPluginCreateImage, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1639 "Generated from C function OrthancPluginCreateImage()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1640 { "DecodeDicomImage", sdk_OrthancPluginDecodeDicomImage, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1641 "Generated from C function OrthancPluginDecodeDicomImage()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1642 { "ComputeMd5", sdk_OrthancPluginComputeMd5, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1643 "Generated from C function OrthancPluginComputeMd5()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1644 { "ComputeSha1", sdk_OrthancPluginComputeSha1, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1645 "Generated from C function OrthancPluginComputeSha1()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1646 { "GenerateUuid", sdk_OrthancPluginGenerateUuid, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1647 "Generated from C function OrthancPluginGenerateUuid()" }, |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1648 { "CreateFindMatcher", sdk_OrthancPluginCreateFindMatcher, METH_VARARGS, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1649 "Generated from C function OrthancPluginCreateFindMatcher()" }, |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1650 { "GetPeers", sdk_OrthancPluginGetPeers, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1651 "Generated from C function OrthancPluginGetPeers()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1652 { "AutodetectMimeType", sdk_OrthancPluginAutodetectMimeType, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1653 "Generated from C function OrthancPluginAutodetectMimeType()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1654 { "SetMetricsValue", sdk_OrthancPluginSetMetricsValue, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1655 "Generated from C function OrthancPluginSetMetricsValue()" }, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1656 { "GetTagName", sdk_OrthancPluginGetTagName, METH_VARARGS, |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1657 "Generated from C function OrthancPluginGetTagName()" }, |
41
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1658 { "CreateDicomInstance", sdk_OrthancPluginCreateDicomInstance, METH_VARARGS, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1659 "Generated from C function OrthancPluginCreateDicomInstance()" }, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1660 { "TranscodeDicomInstance", sdk_OrthancPluginTranscodeDicomInstance, METH_VARARGS, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1661 "Generated from C function OrthancPluginTranscodeDicomInstance()" }, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1662 { "CreateMemoryBuffer", sdk_OrthancPluginCreateMemoryBuffer, METH_VARARGS, |
393d2da0722a
upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
1663 "Generated from C function OrthancPluginCreateMemoryBuffer()" }, |
49
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1664 { "GenerateRestApiAuthorizationToken", sdk_OrthancPluginGenerateRestApiAuthorizationToken, METH_VARARGS, |
9e466631660a
ugrade to Orthanc SDK 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
41
diff
changeset
|
1665 "Generated from C function OrthancPluginGenerateRestApiAuthorizationToken()" }, |
1
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1666 { NULL, NULL } |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1667 }; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1668 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1669 |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1670 PyMethodDef* GetOrthancSdkFunctions() |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1671 { |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1672 return ORTHANC_SDK_FUNCTIONS; |
fef9a239df5c
adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1673 } |