Mercurial > hg > orthanc-python
annotate Sources/Autogenerated/sdk_OrthancPluginImage.methods.h @ 195:d7a6e75558ee java-code-model
documented orthanc.RegisterOnChangeCallback()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jul 2024 18:56:28 +0200 |
parents | 55473de7694f |
children | 3678a028f1f6 |
rev | line source |
---|---|
186
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
1 /** |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
2 * Python plugin for Orthanc |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
3 * Copyright (C) 2020-2023 Osimis S.A., Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
4 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
5 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
6 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
10 * the License, or (at your option) any later version. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
11 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
15 * Affero General Public License for more details. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
16 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
19 **/ |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
20 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
21 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
22 // WARNING: Auto-generated file. Do not modify it by hand. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
23 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
184
diff
changeset
|
24 |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 // Actual implementation of the methods |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePixelFormat( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 PythonLock::LogCall("Calling method OrthancPluginGetImagePixelFormat() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
38 |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
39 OrthancPluginPixelFormat value; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
40 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
41 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
42 value = OrthancPluginGetImagePixelFormat(OrthancPlugins::GetGlobalContext(), self->object_); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
43 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 return PyLong_FromLong(value); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageWidth( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 PythonLock::LogCall("Calling method OrthancPluginGetImageWidth() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
60 |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
61 long value; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
62 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
63 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
64 value = OrthancPluginGetImageWidth(OrthancPlugins::GetGlobalContext(), self->object_); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
65 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 return PyLong_FromLong(value); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageHeight( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 PythonLock::LogCall("Calling method OrthancPluginGetImageHeight() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
82 |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
83 long value; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
84 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
85 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
86 value = OrthancPluginGetImageHeight(OrthancPlugins::GetGlobalContext(), self->object_); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
87 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 return PyLong_FromLong(value); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePitch( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 PythonLock::LogCall("Calling method OrthancPluginGetImagePitch() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
104 |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
105 long value; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
106 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
107 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
108 value = OrthancPluginGetImagePitch(OrthancPlugins::GetGlobalContext(), self->object_); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
109 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 return PyLong_FromLong(value); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 static PyObject *sdk_OrthancPluginImage_OrthancPluginConvertPixelFormat( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 PythonLock::LogCall("Calling method OrthancPluginConvertPixelFormat() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 long int arg0 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 if (!PyArg_ParseTuple(args, "l", &arg0)) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 } |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
132 |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 // This is the case of a constructor |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
134 OrthancPluginImage* obj; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
135 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
136 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
137 obj = OrthancPluginConvertPixelFormat(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0)); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
138 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 if (obj == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 else |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 Py_DECREF(argList); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 return python; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 static PyObject *sdk_OrthancPluginImage_OrthancPluginDrawText( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 sdk_OrthancPluginImage_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 PythonLock::LogCall("Calling method OrthancPluginDrawText() on object of class OrthancPluginImage"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 unsigned long arg0 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 const char* arg1 = NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 long int arg2 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 long int arg3 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 unsigned char arg4 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 unsigned char arg5 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 unsigned char arg6 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 if (!PyArg_ParseTuple(args, "ksllbbb", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6)) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 } |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
178 |
184
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
179 OrthancPluginErrorCode code; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
180 { |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
181 PythonThreadsAllower allower; |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
182 code = OrthancPluginDrawText(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); |
f34f3a149c22
added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
174
diff
changeset
|
183 } |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 if (code == OrthancPluginErrorCode_Success) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 Py_INCREF(Py_None); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 return Py_None; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 else |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 PythonLock::RaiseException(code); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 |