-%typemap(out) std::map<std::string, std::list<std::string> > * {
- PyObject* NewDict = PyDict_New(); // The result of this typemap
- PyObject* NewKey = (PyObject*)0;
- PyObject* NewVal = (PyObject*)0;
-
- for (map<string, list<string> >::iterator tag = ($1)->begin();
- tag != ($1)->end(); ++tag) {
- string first = tag->first;
- // Do not publish entries whose keys is made of spaces
- if (first.length() == 0)
- continue;
- NewKey = PyString_FromString(first.c_str());
- PyObject* NewList = PyList_New(0);
- for (list<string>::iterator Item = tag->second.begin();
- Item != tag->second.end(); ++Item) {
- NewVal = PyString_FromString(Item->c_str());
- PyList_Append( NewList, NewVal);
- }
- PyDict_SetItem( NewDict, NewKey, NewList);
+//%typemap(out) gdcm::TagDocEntryHT &
+//{
+// PyObject *newDict = PyDict_New(); // The result of this typemap
+// std::string rawName; // Element name as gotten from gdcm
+// PyObject *newKey = (PyObject *)0; // Associated name as python object
+// std::string rawValue; // Element value as gotten from gdcm
+// PyObject *newVal = (PyObject *)0; // Associated value as python object
+//
+// for (gdcm::TagDocEntryHT::iterator tag = $1->begin(); tag != $1->end(); ++tag)
+// {
+// // The element name shall be the key:
+// rawName = tag->second->GetName();
+// // gdcm unrecognized (including not loaded because their size exceeds
+// // the user specified treshold) elements are exported with their
+// // TagKey as key.
+// if (rawName == "Unknown")
+// rawName = tag->second->GetKey();
+// newKey = PyString_FromString(rawName.c_str());
+//
+// // Element values are striped from leading/trailing spaces
+// gdcm::ValEntry *valEntryPtr = dynamic_cast< gdcm::ValEntry* >(tag->second);
+// if ( valEntryPtr )
+// {
+// rawValue = valEntryPtr->GetValue();
+// }
+// else
+// continue;
+// newVal = PyString_FromString(rawValue.c_str());
+// PyDict_SetItem( newDict, newKey, newVal);
+// }
+// $result = newDict;
+//}
+
+/////////////////////////////////////
+//%typemap(out) ListDicomDirPatient &
+//{
+// PyObject *newItem = (PyObject *)0;
+// $result = PyList_New(0); // The result of this typemap
+//
+// for (std::list<gdcm::DicomDirPatient *>::iterator newIt = ($1)->begin();
+// newIt != ($1)->end(); ++newIt)
+// {
+// newItem = SWIG_NewPointerObj(*newIt,SWIGTYPE_p_DicomDirPatient,0);
+// PyList_Append($result, newItem);
+// }
+//}
+
+//%typemap(out) ListDicomDirStudy &
+//{
+// PyObject *newItem = (PyObject *)0;
+// $result = PyList_New(0); // The result of this typemap
+//
+// for (std::list<gdcm::DicomDirStudy *>::iterator newIt = ($1)->begin();
+// newIt != ($1)->end(); ++newIt)
+// {
+// newItem = SWIG_NewPointerObj(*newIt,SWIGTYPE_p_DicomDirStudy,0);
+// PyList_Append($result, newItem);
+// }
+//}
+
+//%typemap(out) ListDicomDirSerie &
+//{
+// PyObject* newItem = (PyObject*)0;
+// $result = PyList_New(0); // The result of this typemap
+//
+// for (std::list<gdcm::DicomDirSerie *>::iterator newIt = ($1)->begin();
+// newIt != ($1)->end(); ++newIt)
+// {
+// newItem = SWIG_NewPointerObj(*newIt,SWIGTYPE_p_DicomDirSerie,0);
+// PyList_Append($result, newItem);
+// }
+//}
+
+//%typemap(out) ListDicomDirImage &
+//{
+// PyObject* newItem = (PyObject*)0;
+// $result = PyList_New(0); // The result of this typemap
+//
+// for (std::list<gdcm::DicomDirImage *>::iterator newIt = ($1)->begin();
+// newIt != ($1)->end(); ++newIt)
+// {
+// newItem = SWIG_NewPointerObj(*newIt,SWIGTYPE_p_DicomDirImage,0);
+// PyList_Append($result, newItem);
+// }
+//}
+
+////////////////////////////////////////////////////////////////////////////
+// Multi-argument typemap designed for wrapping the progress related methods
+// in order to control from an external application the computation of
+// a DicomDir object (see DicomDir::SetStartMethod*,
+// DicomDir::SetProgressMethod* and DicomDir::SetEndMethod*).
+// Motivation: since DicomDir parsing can be quite long, a GUI application
+// needs to display the avancement and potentially offer a
+// cancel method to the user (when this one feels things are
+// longer than expected).
+// Example of usage: refer to demo/DicomDirProgressMethod.py
+// Note: Uses gdcmPythonVoidFunc and gdcmPythonVoidFuncArgDelete defined
+// in the Swig verbatim section of this gdcm.i i.e. in the above section
+// enclosed within the %{ ... %} scope operator ).
+%typemap(python, in) ( gdcm::DicomDir::Method *,
+ void * = NULL,
+ gdcm::DicomDir::Method * = NULL )
+{
+ if($input!=Py_None)
+ {
+ Py_INCREF($input);
+ $1=gdcmPythonVoidFunc;
+ $2=$input;
+ $3=gdcmPythonVoidFuncArgDelete;
+ }
+ else
+ {
+ $1=NULL;
+ $2=NULL;
+ $3=NULL;