Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions bioio/bio_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,11 +904,20 @@ def get_image_data(

See `bioio_base.transforms.reshape_data` for more details.
"""
# If no out orientation, simply return current data as dask array

# Determine if image needs to be stitched
stitching_mosaic = (
self._reconstruct_mosaic
and biob.dimensions.DimensionNames.MosaicTile in self.reader.dims.order
)
# direct reader sub-region read for kwarg slice. The only accepted kwargs
# is slice definitions so we can assert directly on their presence.
if dimension_order_out is not None and kwargs and not stitching_mosaic:
return self.reader.get_image_data(dimension_order_out, **kwargs)

# Otherwise read the full image: return it as-is, or reshape/slice it.
if dimension_order_out is None and not kwargs:
return self.data

# Transform and return
return biob.transforms.reshape_data(
data=self.data,
given_dims=self.dims.order,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dynamic = ["version"]
dependencies = [
# We always pin a specific version of bioio-base with
# each release so that we avoid bioio + bioio-base misalignment.
"bioio-base~=3.3.0",
"bioio-base~=3.4.0",
"dask[array]>=2021.4.1",
"numpy>=1.21.0",
"ome-types[lxml]>=0.4.0",
Expand Down
Loading