comparison Sources/Autogenerated/sdk_OrthancPluginImage.methods.h @ 174:e9be3c9294d4 java-code-model

[IMPORTANT] replaced old auto-generated code with Java code model
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Jun 2024 18:02:06 +0200
parents 5643e97d9367
children f34f3a149c22
comparison
equal deleted inserted replaced
173:3c72d1f4c2a5 174:e9be3c9294d4
7 if (self->object_ == NULL) 7 if (self->object_ == NULL)
8 { 8 {
9 PyErr_SetString(PyExc_ValueError, "Invalid object"); 9 PyErr_SetString(PyExc_ValueError, "Invalid object");
10 return NULL; 10 return NULL;
11 } 11 }
12
12 13
13 14
14 OrthancPluginPixelFormat value = OrthancPluginGetImagePixelFormat(OrthancPlugins::GetGlobalContext(), self->object_); 15 OrthancPluginPixelFormat value = OrthancPluginGetImagePixelFormat(OrthancPlugins::GetGlobalContext(), self->object_);
15 16
16 return PyLong_FromLong(value); 17 return PyLong_FromLong(value);
26 PyErr_SetString(PyExc_ValueError, "Invalid object"); 27 PyErr_SetString(PyExc_ValueError, "Invalid object");
27 return NULL; 28 return NULL;
28 } 29 }
29 30
30 31
32
31 long value = OrthancPluginGetImageWidth(OrthancPlugins::GetGlobalContext(), self->object_); 33 long value = OrthancPluginGetImageWidth(OrthancPlugins::GetGlobalContext(), self->object_);
32 34
33 return PyLong_FromLong(value); 35 return PyLong_FromLong(value);
34 } 36 }
35 37
43 PyErr_SetString(PyExc_ValueError, "Invalid object"); 45 PyErr_SetString(PyExc_ValueError, "Invalid object");
44 return NULL; 46 return NULL;
45 } 47 }
46 48
47 49
50
48 long value = OrthancPluginGetImageHeight(OrthancPlugins::GetGlobalContext(), self->object_); 51 long value = OrthancPluginGetImageHeight(OrthancPlugins::GetGlobalContext(), self->object_);
49 52
50 return PyLong_FromLong(value); 53 return PyLong_FromLong(value);
51 } 54 }
52 55
58 if (self->object_ == NULL) 61 if (self->object_ == NULL)
59 { 62 {
60 PyErr_SetString(PyExc_ValueError, "Invalid object"); 63 PyErr_SetString(PyExc_ValueError, "Invalid object");
61 return NULL; 64 return NULL;
62 } 65 }
66
63 67
64 68
65 long value = OrthancPluginGetImagePitch(OrthancPlugins::GetGlobalContext(), self->object_); 69 long value = OrthancPluginGetImagePitch(OrthancPlugins::GetGlobalContext(), self->object_);
66 70
67 return PyLong_FromLong(value); 71 return PyLong_FromLong(value);
83 if (!PyArg_ParseTuple(args, "l", &arg0)) 87 if (!PyArg_ParseTuple(args, "l", &arg0))
84 { 88 {
85 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 89 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
86 return NULL; 90 return NULL;
87 } 91 }
92
88 // This is the case of a constructor 93 // This is the case of a constructor
89 OrthancPluginImage* obj = OrthancPluginConvertPixelFormat(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0)); 94 OrthancPluginImage* obj = OrthancPluginConvertPixelFormat(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0));
90 95
91 if (obj == NULL) 96 if (obj == NULL)
92 { 97 {
124 if (!PyArg_ParseTuple(args, "ksllbbb", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6)) 129 if (!PyArg_ParseTuple(args, "ksllbbb", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6))
125 { 130 {
126 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)"); 131 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)");
127 return NULL; 132 return NULL;
128 } 133 }
134
129 OrthancPluginErrorCode code = OrthancPluginDrawText(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); 135 OrthancPluginErrorCode code = OrthancPluginDrawText(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
130 136
131 137
132 if (code == OrthancPluginErrorCode_Success) 138 if (code == OrthancPluginErrorCode_Success)
133 { 139 {