Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_OrthancPluginImage.methods.h @ 184:f34f3a149c22 java-code-model
added class PythonThreadsAllower
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jul 2024 15:49:05 +0200 |
parents | e9be3c9294d4 |
children | 55473de7694f |
comparison
equal
deleted
inserted
replaced
183:d31f216c9462 | 184:f34f3a149c22 |
---|---|
10 return NULL; | 10 return NULL; |
11 } | 11 } |
12 | 12 |
13 | 13 |
14 | 14 |
15 OrthancPluginPixelFormat value = OrthancPluginGetImagePixelFormat(OrthancPlugins::GetGlobalContext(), self->object_); | 15 OrthancPluginPixelFormat value; |
16 { | |
17 PythonThreadsAllower allower; | |
18 value = OrthancPluginGetImagePixelFormat(OrthancPlugins::GetGlobalContext(), self->object_); | |
19 } | |
16 | 20 |
17 return PyLong_FromLong(value); | 21 return PyLong_FromLong(value); |
18 } | 22 } |
19 | 23 |
20 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageWidth( | 24 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageWidth( |
28 return NULL; | 32 return NULL; |
29 } | 33 } |
30 | 34 |
31 | 35 |
32 | 36 |
33 long value = OrthancPluginGetImageWidth(OrthancPlugins::GetGlobalContext(), self->object_); | 37 long value; |
38 { | |
39 PythonThreadsAllower allower; | |
40 value = OrthancPluginGetImageWidth(OrthancPlugins::GetGlobalContext(), self->object_); | |
41 } | |
34 | 42 |
35 return PyLong_FromLong(value); | 43 return PyLong_FromLong(value); |
36 } | 44 } |
37 | 45 |
38 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageHeight( | 46 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageHeight( |
46 return NULL; | 54 return NULL; |
47 } | 55 } |
48 | 56 |
49 | 57 |
50 | 58 |
51 long value = OrthancPluginGetImageHeight(OrthancPlugins::GetGlobalContext(), self->object_); | 59 long value; |
60 { | |
61 PythonThreadsAllower allower; | |
62 value = OrthancPluginGetImageHeight(OrthancPlugins::GetGlobalContext(), self->object_); | |
63 } | |
52 | 64 |
53 return PyLong_FromLong(value); | 65 return PyLong_FromLong(value); |
54 } | 66 } |
55 | 67 |
56 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePitch( | 68 static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePitch( |
64 return NULL; | 76 return NULL; |
65 } | 77 } |
66 | 78 |
67 | 79 |
68 | 80 |
69 long value = OrthancPluginGetImagePitch(OrthancPlugins::GetGlobalContext(), self->object_); | 81 long value; |
82 { | |
83 PythonThreadsAllower allower; | |
84 value = OrthancPluginGetImagePitch(OrthancPlugins::GetGlobalContext(), self->object_); | |
85 } | |
70 | 86 |
71 return PyLong_FromLong(value); | 87 return PyLong_FromLong(value); |
72 } | 88 } |
73 | 89 |
74 static PyObject *sdk_OrthancPluginImage_OrthancPluginConvertPixelFormat( | 90 static PyObject *sdk_OrthancPluginImage_OrthancPluginConvertPixelFormat( |
89 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); | 105 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
90 return NULL; | 106 return NULL; |
91 } | 107 } |
92 | 108 |
93 // This is the case of a constructor | 109 // This is the case of a constructor |
94 OrthancPluginImage* obj = OrthancPluginConvertPixelFormat(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0)); | 110 OrthancPluginImage* obj; |
111 { | |
112 PythonThreadsAllower allower; | |
113 obj = OrthancPluginConvertPixelFormat(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0)); | |
114 } | |
95 | 115 |
96 if (obj == NULL) | 116 if (obj == NULL) |
97 { | 117 { |
98 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); | 118 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
99 return NULL; | 119 return NULL; |
130 { | 150 { |
131 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)"); | 151 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)"); |
132 return NULL; | 152 return NULL; |
133 } | 153 } |
134 | 154 |
135 OrthancPluginErrorCode code = OrthancPluginDrawText(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); | 155 OrthancPluginErrorCode code; |
156 { | |
157 PythonThreadsAllower allower; | |
158 code = OrthancPluginDrawText(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); | |
159 } | |
136 | 160 |
137 | 161 |
138 if (code == OrthancPluginErrorCode_Success) | 162 if (code == OrthancPluginErrorCode_Success) |
139 { | 163 { |
140 Py_INCREF(Py_None); | 164 Py_INCREF(Py_None); |