+*/
+
+////////////////////////////////////////////////////////////////////////////
+%typemap(out) ListDicomDirPatient & {
+ PyObject* NewItem = (PyObject*)0;
+ $result = PyList_New(0); // The result of this typemap
+
+ for (std::list<gdcmDicomDirPatient *>::iterator New = ($1)->begin();
+ New != ($1)->end(); ++New) {
+ NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirPatient,1);
+ PyList_Append($result, NewItem);
+ }
+}
+
+%typemap(out) ListDicomDirStudy & {
+ PyObject* NewItem = (PyObject*)0;
+ $result = PyList_New(0); // The result of this typemap
+
+ for (std::list<gdcmDicomDirStudy *>::iterator New = ($1)->begin();
+ New != ($1)->end(); ++New) {
+ NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirStudy,1);
+ PyList_Append($result, NewItem);
+ }
+}
+
+%typemap(out) ListDicomDirSerie & {
+ PyObject* NewItem = (PyObject*)0;
+ $result = PyList_New(0); // The result of this typemap
+
+ for (std::list<gdcmDicomDirSerie *>::iterator New = ($1)->begin();
+ New != ($1)->end(); ++New) {
+ NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirSerie,1);
+ PyList_Append($result, NewItem);
+ }
+}
+
+%typemap(out) ListDicomDirImage & {
+ PyObject* NewItem = (PyObject*)0;
+ $result = PyList_New(0); // The result of this typemap
+
+ for (std::list<gdcmDicomDirImage *>::iterator New = ($1)->begin();
+ New != ($1)->end(); ++New) {
+ NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirImage,1);
+ PyList_Append($result, NewItem);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////
+// Deals with function returning a C++ string.
+%typemap(python, in) (gdcmMethod *,void * =NULL,gdcmMethod * =NULL) {
+ if($input!=Py_None)
+ {
+ Py_INCREF($input);
+ $1=gdcmPythonVoidFunc;
+ $2=$input;
+ $3=gdcmPythonVoidFuncArgDelete;
+ }
+ else
+ {
+ $1=NULL;
+ $2=NULL;
+ $3=NULL;
+ }
+}
+