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