From ef6116c6bc6b7b4abd56931217b992740cf6058c Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Mon, 21 Aug 2023 11:14:32 +0200 Subject: [PATCH] - some ome fixes --- .gitignore | 1 + README.md | 4 ++-- ndbioimage/readers/cziread.py | 8 ++++---- pyproject.toml | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 690a717..54248cb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /ndbioimage/jars /tests/files/* /poetry.lock +/dist/ diff --git a/README.md b/README.md index 719dc03..1617bed 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ # ndbioimage - Work in progress -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 and stored in an ome structure. Additionally, it can automatically calculate an affine -transform that corrects for chromatic abberrations etc. and apply it on the fly to the image. +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. diff --git a/ndbioimage/readers/cziread.py b/ndbioimage/readers/cziread.py index 8381da0..ef45ccd 100644 --- a/ndbioimage/readers/cziread.py +++ b/ndbioimage/readers/cziread.py @@ -101,7 +101,7 @@ class Reader(AbstractReader, ABC): for light_source in instrument.find("LightSources"): if light_source.find("LightSourceType").find("Laser") is not None: - ome.instruments[0].light_source_group.append( + ome.instruments[0].lasers.append( model.Laser( id=f'LightSource:{light_source.attrib["Id"]}', power=float(text(light_source.find("Power"))), @@ -214,7 +214,7 @@ class Reader(AbstractReader, ABC): x=float(text(geometry.find("Left"))), y=float(text(geometry.find("Top"))))) ome.rois.append(roi) - ome.images[0].roi_ref.append(model.ROIRef(id=f"ROI:{idx}")) + ome.images[0].roi_refs.append(model.ROIRef(id=f"ROI:{idx}")) idx += 1 return ome @@ -262,7 +262,7 @@ class Reader(AbstractReader, ABC): for light_source in instrument.find("LightSources"): if light_source.find("LightSourceType").find("Laser") is not None: - ome.instruments[0].light_source_group.append( + ome.instruments[0].lasers.append( model.Laser( id=light_source.attrib["Id"], model=text(light_source.find("Manufacturer").find("Model")), @@ -409,7 +409,7 @@ class Reader(AbstractReader, ABC): x=float(text(geometry.find("Left"))), y=float(text(geometry.find("Top"))))) ome.rois.append(roi) - ome.images[0].roi_ref.append(model.ROIRef(id=f"ROI:{idx}")) + ome.images[0].roi_refs.append(model.ROIRef(id=f"ROI:{idx}")) idx += 1 return ome diff --git a/pyproject.toml b/pyproject.toml index 884d916..367d862 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ndbioimage" -version = "2023.8.1" +version = "2023.8.2" description = "Bio image reading, metadata and some affine registration." authors = ["W. Pomp "] license = "GPLv3" @@ -17,7 +17,7 @@ pandas = "*" tifffile = "*" czifile = "*" tiffwrite = "*" -ome-types = "^0.4" +ome-types = "^0.4.0" pint = "*" tqdm = "*" lxml = "*"