From f1500426f0dc2a253f9e8db95626e4174f868c76 Mon Sep 17 00:00:00 2001
From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk>
Date: Tue, 17 Jan 2023 09:55:54 +0000
Subject: [PATCH] fix!(aliby): dummy tiler object has shape attributes

WHY IS THIS CHANGE NEEDED?:
- it complained that ImageDummy object has no .shape attribute when
  Tiler methods like ._run_tp() were called

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- first argument of the object to be returned by .dummy() is mistakenly
  an Image instance (i.e. ImageDummy); it should be a dask array like
  those returned by e.g. .from_image(), .from_h5()
- fixed by using the .data attribute, consistent with the other methods mentioned

WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:
- order of dimensions is inconsistent: it is tczxy in io.image.py but
  ctzxy in the .shape() method in tiler.py.  this may break things down
  the line
---
 src/aliby/tile/tiler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/aliby/tile/tiler.py b/src/aliby/tile/tiler.py
index 74aae3e8..a6ca276b 100644
--- a/src/aliby/tile/tiler.py
+++ b/src/aliby/tile/tiler.py
@@ -272,7 +272,7 @@ class Tiler(StepABC):
         }
 
         return cls(
-            imgdmy_obj,
+            imgdmy_obj.data,
             dummy_omero_metadata,
             TilerParameters.from_dict(parameters),
         )
-- 
GitLab