Skip to content

Commit

Permalink
- Slicing bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wim Pomp committed Nov 21, 2023
1 parent 5a34ade commit a6457ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

Exposes (bio) images as a numpy ndarray-like object, but without loading the whole
image into memory, reading from the file only when needed. Some metadata is read
and stored in an ome structure. Additionally, it can automatically calculate an affine
transform that corrects for chromatic aberrations etc. and apply it on the fly to the image.
and stored in an [ome](https://genomebiology.biomedcentral.com/articles/10.1186/gb-2005-6-5-r47) structure.
Additionally, it can automatically calculate an affine transform that corrects for chromatic aberrations etc. and apply
it on the fly to the image.

Currently, supports imagej tif files, czi files, micromanager tif sequences and anything
bioformats can handle.
Currently, it supports imagej tif files, czi files, micromanager tif sequences and anything
[bioformats](https://www.openmicroscopy.org/bio-formats/) can handle.

## Installation

Expand Down
3 changes: 1 addition & 2 deletions ndbioimage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ def __getitem__(self, n):
new_slice.append(s[e])

# TODO: check output dimensionality when requested shape in some dimension is 1
if (all([isinstance(s, Number) for s in new_slice[:len(self.axes)]])
and all([isinstance(s, Number) or s.size == 1 for s in new_slice[len(self.axes):]])):
if all([isinstance(s, Number) or a < 0 and s.size == 1 for s, a in zip(new_slice, axes_idx)]):
return self.block(*new_slice).item()
else:
new = View(self)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ndbioimage"
version = "2023.11.0"
version = "2023.11.1"
description = "Bio image reading, metadata and some affine registration."
authors = ["W. Pomp <w.pomp@nki.nl>"]
license = "GPLv3"
Expand Down

0 comments on commit a6457ea

Please sign in to comment.