diff --git a/aliby/io/omero.py b/aliby/io/omero.py index 266d7d163db6137b584b357c9361a726101bed5c..d9677af2cb1af1c42172eee4b5fecefd69955404 100644 --- a/aliby/io/omero.py +++ b/aliby/io/omero.py @@ -31,8 +31,8 @@ class Argo: class Dataset(Argo): - def __init__(self, expt_id): - super().__init__() + def __init__(self, expt_id, **server_info): + super().__init__(**server_info) self.expt_id = expt_id self._files = None @@ -87,8 +87,8 @@ class Dataset(Argo): class Image(Argo): - def __init__(self, image_id): - super().__init__() + def __init__(self, image_id, **server_info): + super().__init__(**server_info) self.image_id = image_id self._image_wrap = None diff --git a/aliby/pipeline.py b/aliby/pipeline.py index 7d0c31588f92d9ff14e0ff7bbfbe150d4599bffd..73cd003e2859e486ced0434a31c9a85ff2dea3bd 100644 --- a/aliby/pipeline.py +++ b/aliby/pipeline.py @@ -57,7 +57,7 @@ class PipelineParameters(ParametersABC): """ expt_id = general.get("expt_id", 19993) directory = Path(general.get("directory", "../data")) - with Dataset(int(expt_id)) as conn: + with Dataset(int(expt_id), **general.get("server_info")) as conn: directory = directory / conn.unique_name if not directory.exists(): directory.mkdir(parents=True) @@ -132,7 +132,7 @@ class Pipeline(ProcessABC): print("Searching OMERO") # Do all initialis - with Dataset(int(expt_id)) as conn: + with Dataset(int(expt_id), **self.general["server_info"]) as conn: image_ids = conn.get_images() directory = root_dir / conn.unique_name if not directory.exists(): @@ -165,7 +165,7 @@ class Pipeline(ProcessABC): earlystop = general_config["earlystop"] try: directory = general_config["directory"] - with Image(image_id) as image: + with Image(image_id, **self.general['server_info']) as image: filename = f"{directory}/{image.name}.h5" try: os.remove(filename)