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