From e56ef334f4748bfff518324ce415711b09ff2980 Mon Sep 17 00:00:00 2001 From: "w.pomp" Date: Thu, 26 Mar 2026 16:52:18 +0100 Subject: [PATCH] - add support for tiled czi's: bugfix --- ndbioimage/readers/cziread.py | 8 +++++--- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ndbioimage/readers/cziread.py b/ndbioimage/readers/cziread.py index 962a735..d349ea2 100644 --- a/ndbioimage/readers/cziread.py +++ b/ndbioimage/readers/cziread.py @@ -190,9 +190,11 @@ class Reader(AbstractReader, ABC): y = np.unique(y) _, bx = np.histogram(x, self.tiles[0]) _, by = np.histogram(y, self.tiles[1]) - by, bx = list(product([(i, j) for i, j in zip(by, by[1:])], [(i, j) for i, j in zip(bx, bx[1:])]))[ - self.series - ] + b = list(product([(i, j) for i, j in zip(by, by[1:])], [(i, j) for i, j in zip(bx, bx[1:])])) + if self.series < len(b): + by, bx = b[self.series] + else: + raise FileNotFoundError(self.path / f"Pos{self.series}") for directory_entry in self.reader.filtered_subblock_directory: idx = self.get_index(directory_entry, self.reader.start) if bx[0] <= idx[xi][0] <= bx[1] and by[0] <= idx[yi][0] <= by[1]: diff --git a/pyproject.toml b/pyproject.toml index 9c6a005..ff08820 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ndbioimage" -version = "2026.3.3" +version = "2026.3.4" description = "Bio image reading, metadata and some affine registration." authors = [ { name = "W. Pomp", email = "w.pomp@nki.nl" }