diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i index 56005534a7479d56fa9e5ef347d8903400716e92..fc90aa65e6311f68ef1542b2a17643f42aec0040 100644 --- a/Modules/Wrappers/SWIG/src/otbApplication.i +++ b/Modules/Wrappers/SWIG/src/otbApplication.i @@ -503,6 +503,7 @@ class ApplicationProxy(object): ParameterType_Empty : 'ParameterType_Empty', ParameterType_Choice : 'ParameterType_Choice', ParameterType_Group : 'ParameterType_Group', + ParameterType_Bool : 'ParameterType_Bool' }.get(parameter_type, 'ParameterType_UNKNOWN') def __str__(self): @@ -530,6 +531,8 @@ class ApplicationProxy(object): return self.SetParameterFloat(paramKey, value) elif paramType in [ParameterType_Empty]: return self.EnableParameter(paramKey) + elif paramType in [ParameterType_Bool]: + return self.SetParameterString(paramKey, str(value) ) elif paramType in [ParameterType_Group]: return ApplicationProxy(self, paramKey) elif paramType in [ParameterType_Choice]: @@ -557,6 +560,8 @@ class ApplicationProxy(object): return self.GetParameterFloat(paramKey) elif paramType in [ParameterType_Empty]: return self.IsParameterEnabled(paramKey) + elif paramType in [ParameterType_Bool]: + return bool(self.GetParameterInt(paramKey)) elif paramType in [ParameterType_Group, ParameterType_Choice]: return ApplicationProxy(self, paramKey) else: