- fix seqread bug
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@
|
|||||||
/.pytest_cache/
|
/.pytest_cache/
|
||||||
/ndbioimage/_version.py
|
/ndbioimage/_version.py
|
||||||
/ndbioimage/jars
|
/ndbioimage/jars
|
||||||
|
/tests/files/*
|
||||||
|
|||||||
@@ -521,6 +521,8 @@ class Imread(np.lib.mixins.NDArrayOperatorsMixin, metaclass=ABCMeta):
|
|||||||
self.cache = DequeDict(16)
|
self.cache = DequeDict(16)
|
||||||
self._frame_decorator = None
|
self._frame_decorator = None
|
||||||
self.frameoffset = 0, 0 # how far apart the centers of frame and sensor are
|
self.frameoffset = 0, 0 # how far apart the centers of frame and sensor are
|
||||||
|
self.flags = dict(C_CONTIGUOUS=False, F_CONTIGUOUS=False, OWNDATA=False, WRITEABLE=False,
|
||||||
|
ALIGNED=False, WRITEBACKIFCOPY=False, UPDATEIFCOPY=False)
|
||||||
|
|
||||||
self.open()
|
self.open()
|
||||||
|
|
||||||
@@ -721,7 +723,7 @@ class Imread(np.lib.mixins.NDArrayOperatorsMixin, metaclass=ABCMeta):
|
|||||||
s.append(f'pixel size: {1000 * self.pxsize_um:.2f} nm')
|
s.append(f'pixel size: {1000 * self.pxsize_um:.2f} nm')
|
||||||
if self.zstack and self.deltaz_um:
|
if self.zstack and self.deltaz_um:
|
||||||
s.append(f'z-interval: {1000 * self.deltaz_um:.2f} nm')
|
s.append(f'z-interval: {1000 * self.deltaz_um:.2f} nm')
|
||||||
if self.exposuretime_s:
|
if self.exposuretime_s and not all(e is None for e in self.exposuretime_s):
|
||||||
s.append(f'exposuretime: {self.exposuretime_s[0]:.2f} s')
|
s.append(f'exposuretime: {self.exposuretime_s[0]:.2f} s')
|
||||||
if self.timeseries and self.timeinterval:
|
if self.timeseries and self.timeinterval:
|
||||||
s.append(f'time interval: {self.timeinterval:.3f} s')
|
s.append(f'time interval: {self.timeinterval:.3f} s')
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class Reader(Imread, ABC):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _can_open(path):
|
def _can_open(path):
|
||||||
return isinstance(path, Path) and path.suffix == ""
|
return isinstance(path, Path) and path.is_dir()
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def ome(self):
|
def ome(self):
|
||||||
@@ -107,7 +107,7 @@ class Reader(Imread, ABC):
|
|||||||
return ome
|
return ome
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
if not self.path.name.startswith("Pos"):
|
if re.match(r'(?:\d+\-)?Pos.*', self.path.name) is None:
|
||||||
path = self.path / f"Pos{self.series}"
|
path = self.path / f"Pos{self.series}"
|
||||||
else:
|
else:
|
||||||
path = self.path
|
path = self.path
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "ndbioimage"
|
name = "ndbioimage"
|
||||||
version = "2023.7.2"
|
version = "2023.7.3"
|
||||||
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