- OmeCache: detect changes in ome.xml

This commit is contained in:
Wim Pomp
2024-04-10 15:20:12 +02:00
parent 37364d9cfa
commit db4bd63b94
4 changed files with 9 additions and 8 deletions

View File

@@ -159,9 +159,10 @@ class OmeCache(DequeDict):
return super().__contains__(self.path_and_lstat(path))
@staticmethod
def path_and_lstat(path: str | Path) -> tuple[Path, Optional[os.stat_result]]:
def path_and_lstat(path: str | Path) -> tuple[Path, Optional[os.stat_result], Optional[os.stat_result]]:
path = Path(path)
return path, (path.lstat() if path.exists() else None)
return (path, (path.lstat() if path.exists() else None),
(path.with_suffix('.ome.xml').lstat() if path.with_suffix('.ome.xml').exists() else None))
class Imread(np.lib.mixins.NDArrayOperatorsMixin, ABC):