- set dtype according to pixel type in file

- cziread bugfix
- add reader for broken files saved by Fiji
- make ndread work for arrays with less dimensions than 5
- relative imports
- remove some old functions
- make bfread check if it can open the file
This commit is contained in:
Wim Pomp
2023-08-14 17:01:03 +02:00
parent 0bd22d766a
commit bdd7a5399c
10 changed files with 143 additions and 78 deletions

View File

@@ -1,10 +1,12 @@
import pytest
from pathlib import Path
from ndbioimage import Imread
from ndbioimage import Imread, ReaderNotFoundError
@pytest.mark.parametrize("file",
[file for file in (Path(__file__).parent / 'files').iterdir() if file.suffix != '.pzl'])
@pytest.mark.parametrize("file", (Path(__file__).parent / 'files').iterdir())
def test_open(file):
with Imread(file) as im:
print(im[dict(c=0, z=0, t=0)].mean())
try:
with Imread(file) as im:
print(im[dict(c=0, z=0, t=0)].mean())
except ReaderNotFoundError:
assert len(Imread.__subclasses__()), "No subclasses for Imread found."