From feab069c8652127df7991382321a8f85545f9ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Nar=C3=A7on?= <nicolas.narcon@inrae.fr> Date: Fri, 11 Feb 2022 14:46:39 +0100 Subject: [PATCH] FIX: enable use of object in in-memory pipelines even after it has been written to disk --- pyotb/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyotb/core.py b/pyotb/core.py index fa3755f..19b582b 100644 --- a/pyotb/core.py +++ b/pyotb/core.py @@ -125,6 +125,7 @@ class otbObject(ABC): self.app.SetParameterOutputImagePixelType(output_parameter_key, pixel_types[output_parameter_key]) self.app.ExecuteAndWriteOutput() + self.app.Execute() # this is just to be able to use the object in in-memory pipelines without problems def __add__(self, other): """Overrides the default addition and flavours it with BandMathX""" @@ -487,6 +488,7 @@ class App(otbObject): # Writing outputs to disk if needed if any([output_param_key in kwargs for output_param_key in self.output_parameters_keys]): self.app.ExecuteAndWriteOutput() + self.app.Execute() # this is just to be able to use the object in in-memory pipelines without problems def get_output_parameters_keys(self): """ -- GitLab