- Slicing bugfix.
This commit is contained in:
@@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
Exposes (bio) images as a numpy ndarray-like object, but without loading the whole
|
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
|
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
|
and stored in an [ome](https://genomebiology.biomedcentral.com/articles/10.1186/gb-2005-6-5-r47) structure.
|
||||||
transform that corrects for chromatic aberrations etc. and apply it on the fly to the image.
|
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
|
Currently, it supports imagej tif files, czi files, micromanager tif sequences and anything
|
||||||
bioformats can handle.
|
[bioformats](https://www.openmicroscopy.org/bio-formats/) can handle.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
@@ -277,8 +277,7 @@ class Imread(np.lib.mixins.NDArrayOperatorsMixin, ABC):
|
|||||||
new_slice.append(s[e])
|
new_slice.append(s[e])
|
||||||
|
|
||||||
# TODO: check output dimensionality when requested shape in some dimension is 1
|
# 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)]])
|
if all([isinstance(s, Number) or a < 0 and s.size == 1 for s, a in zip(new_slice, axes_idx)]):
|
||||||
and all([isinstance(s, Number) or s.size == 1 for s in new_slice[len(self.axes):]])):
|
|
||||||
return self.block(*new_slice).item()
|
return self.block(*new_slice).item()
|
||||||
else:
|
else:
|
||||||
new = View(self)
|
new = View(self)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "ndbioimage"
|
name = "ndbioimage"
|
||||||
version = "2023.11.0"
|
version = "2023.11.1"
|
||||||
description = "Bio image reading, metadata and some affine registration."
|
description = "Bio image reading, metadata and some affine registration."
|
||||||
authors = ["W. Pomp <w.pomp@nki.nl>"]
|
authors = ["W. Pomp <w.pomp@nki.nl>"]
|
||||||
license = "GPLv3"
|
license = "GPLv3"
|
||||||
|
|||||||
Reference in New Issue
Block a user