diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i index a893d7f8139a04e304a69286da9a1fa76701f903..0ef8abf8fe3bcc33064d7cf055d758cd7377d5ac 100644 --- a/Modules/Wrappers/SWIG/src/otbApplication.i +++ b/Modules/Wrappers/SWIG/src/otbApplication.i @@ -19,7 +19,7 @@ */ -%module otbApplication +%module("threads"=1) otbApplication %{ #include "itkBase.includes" @@ -260,22 +260,22 @@ public: #if SWIGPYTHON Logger* GetLogger(); #endif - unsigned long itk::Object::AddObserver(const EventObject & event, + unsigned long itk::Object::AddObserver(const EventObject & event, Command * command); bool IsDeprecated(); #if SWIGPYTHON - %extend + %extend { - /** SetupLogger : Add the PythonLogOutput and setup the progress + /** SetupLogger : Add the PythonLogOutput and setup the progress * reporting for the application */ %pythoncode { def SetupLogger(self): logger = self.GetLogger() logger.AddLogOutput(_libraryLogOutput.GetPointer()) - + self.progressReportManager = ProgressReporterManager_New() self.progressReportManager.SetLogOutputCallback(_libraryLogCallback) self.AddObserver(AddProcessToWatchEvent(), @@ -727,7 +727,7 @@ class ApplicationProxy(object): """ if (name == "thisown"): return self.this.own() - + if hasattr(Application, "__swig_getmethods__"): method = Application.__swig_getmethods__.get(name, None) if method: @@ -758,7 +758,7 @@ class ApplicationProxy(object): if (name == "progressReportManager"): super().__setattr__(name, value) return - + if hasattr(Application, "__swig_setmethods__"): method = Application.__swig_setmethods__.get(name, None) if method: @@ -814,7 +814,7 @@ class ApplicationProxy(object): ImagePixelType_cfloat : SetVectorImageFromCFloatNumpyArray_, ImagePixelType_cdouble : SetVectorImageFromCDoubleNumpyArray_, } - + def SetImageFromNumpyArray(self, paramKey, npArray, index=0): """ This method takes a numpy array and set ImageIOBase of