From f2f6792f70885e5e8cdf4a2d19a849e55b3b2d0f Mon Sep 17 00:00:00 2001
From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk>
Date: Thu, 12 Jan 2023 16:33:55 +0000
Subject: [PATCH] [WIP] feat(aliby): instantiate Tiler object from dummy image

WHY IS THIS CHANGE NEEDED?:
- need a way to produce a dummy form of the next step after creating an
  image instance to test pipeline; this next step is the tiler

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- make template method

REFERENCES:
- issue #53
---
 src/aliby/io/image.py   |  1 +
 src/aliby/tile/tiler.py | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/src/aliby/io/image.py b/src/aliby/io/image.py
index a2b1e6e1..15296f94 100644
--- a/src/aliby/io/image.py
+++ b/src/aliby/io/image.py
@@ -75,6 +75,7 @@ class BaseLocalImage(ABC):
         return self._rechunked_img
 
     @abstractmethod
+    # Should this function take Tiler parameters as an argument?
     def get_data_lazy(self) -> da.Array:
         """Return 5D dask array. For lazy-loading multidimensional tiff files. Dummy image."""
         examples_dir = get_examples_dir()
diff --git a/src/aliby/tile/tiler.py b/src/aliby/tile/tiler.py
index fea4aaad..d2e222b0 100644
--- a/src/aliby/tile/tiler.py
+++ b/src/aliby/tile/tiler.py
@@ -247,6 +247,17 @@ class Tiler(StepABC):
 
         self.tile_size = self.tile_size or min(self.image.shape[-2:])
 
+    @classmethod
+    def from_dummy(cls, image, parameters: TilerParameters):
+        """
+        Instantiate Tiler from dummy image
+
+        Parameters
+        ----------
+        ...
+        """
+        pass
+
     @classmethod
     def from_image(cls, image, parameters: TilerParameters):
         """
-- 
GitLab