diff --git a/simpa/utils/settings.py b/simpa/utils/settings.py index 447ff48d..27f0871f 100644 --- a/simpa/utils/settings.py +++ b/simpa/utils/settings.py @@ -69,6 +69,11 @@ def __delitem__(self, key): except KeyError: raise KeyError("The key '{}' is not in the Settings dictionary".format(key)) from None + def get(self, key, default=None): + if self.__contains__(key): + return self[key] + return default + def get_volume_dimensions_voxels(self): """ returns: tuple