annotate Sources/ICallbackRegistration.cpp @ 142:6288b8132659

replaced "int" by "int32_t" in the SDK to prevent any ABI issue
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 Sep 2023 18:18:51 +0200
parents cf6decdf9e15
children 566df919b286 71d305c29cfa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Python plugin for Orthanc
114
65ec5597ec70 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 101
diff changeset
3 * Copyright (C) 2020-2023 Osimis S.A., Belgium
65ec5597ec70 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 101
diff changeset
4 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU Affero General Public License
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * as published by the Free Software Foundation, either version 3 of
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * the License, or (at your option) any later version.
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * Affero General Public License for more details.
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 *
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * You should have received a copy of the GNU Affero General Public License
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 **/
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 #include "ICallbackRegistration.h"
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h"
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "PythonLock.h"
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 PyObject *ICallbackRegistration::Apply(ICallbackRegistration& registration,
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 PyObject* args,
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 PyObject*& singletonCallback,
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 const std::string& details)
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 // https://docs.python.org/3/extending/extending.html#calling-python-functions-from-c
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 PyObject* callback = NULL;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 if (!PyArg_ParseTuple(args, "O", &callback) ||
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 callback == NULL)
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 const std::string message = "Expected a callback function to register one " + details;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 PyErr_SetString(PyExc_ValueError, message.c_str());
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 return NULL;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 }
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 else if (singletonCallback != NULL)
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 const std::string message = "Can only register one " + details;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 PyErr_SetString(PyExc_RuntimeError, message.c_str());
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 return NULL;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 }
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 else
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 OrthancPlugins::LogInfo("Registering one " + details);
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 registration.Register();
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 singletonCallback = callback;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 Py_XINCREF(singletonCallback);
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Py_INCREF(Py_None);
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 return Py_None;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 }
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 }
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
119
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
61 PyObject *ICallbackRegistration::Apply2(ICallbackRegistration& registration,
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
62 PyObject* args,
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
63 PyObject*& singletonCallback1,
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
64 PyObject*& singletonCallback2,
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
65 const std::string& details)
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
66 {
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
67 // https://docs.python.org/3/extending/extending.html#calling-python-functions-from-c
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
68 PyObject* callback1 = NULL;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
69 PyObject* callback2 = NULL;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
70
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
71 if (!PyArg_ParseTuple(args, "OO", &callback1, &callback2) ||
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
72 callback1 == NULL || callback2 == NULL)
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
73 {
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
74 const std::string message = "Expected two callback functions to register " + details;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
75 PyErr_SetString(PyExc_ValueError, message.c_str());
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
76 return NULL;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
77 }
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
78 else if (singletonCallback1 != NULL || singletonCallback2 != NULL)
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
79 {
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
80 const std::string message = "Can only register once for " + details;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
81 PyErr_SetString(PyExc_RuntimeError, message.c_str());
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
82 return NULL;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
83 }
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
84 else
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
85 {
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
86 OrthancPlugins::LogInfo("Registering callbacks " + details);
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
87 registration.Register();
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
88
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
89 singletonCallback1 = callback1;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
90 Py_XINCREF(singletonCallback1);
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
91
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
92 singletonCallback2 = callback2;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
93 Py_XINCREF(singletonCallback2);
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
94
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
95 Py_INCREF(Py_None);
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
96 return Py_None;
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
97 }
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
98 }
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
99
cf6decdf9e15 wrapped new SDK callback: orthanc.RegisterStorageCommitmentScpCallback()
Alain Mazy <am@osimis.io>
parents: 114
diff changeset
100
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 void ICallbackRegistration::Unregister(PyObject*& singletonCallback)
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 PythonLock lock;
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 if (singletonCallback != NULL)
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 {
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 Py_XDECREF(singletonCallback);
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 }
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 }