- slightly more robust czi metadata reading
This commit is contained in:
@@ -349,7 +349,7 @@ class OmeParse:
|
|||||||
model.Objective(id=f'Objective:Tubelens:{idx}', model=tube_lens,
|
model.Objective(id=f'Objective:Tubelens:{idx}', model=tube_lens,
|
||||||
nominal_magnification=nominal_magnification))
|
nominal_magnification=nominal_magnification))
|
||||||
elif self.version in ('1.1', '1.2'):
|
elif self.version in ('1.1', '1.2'):
|
||||||
for tubelens in self.instrument.find('TubeLenses'):
|
for tubelens in self.def_list(self.instrument.find('TubeLenses')):
|
||||||
try:
|
try:
|
||||||
nominal_magnification = float(re.findall(r'\d+(?:[,.]\d*)?',
|
nominal_magnification = float(re.findall(r'\d+(?:[,.]\d*)?',
|
||||||
tubelens.attrib['Name'])[0].replace(',', '.'))
|
tubelens.attrib['Name'])[0].replace(',', '.'))
|
||||||
@@ -384,8 +384,8 @@ class OmeParse:
|
|||||||
model.Laser(
|
model.Laser(
|
||||||
id=f"LightSource:{light_source.attrib['Id']}",
|
id=f"LightSource:{light_source.attrib['Id']}",
|
||||||
power=float(self.text(light_source.find('Power'))),
|
power=float(self.text(light_source.find('Power'))),
|
||||||
wavelength=float(light_source.attrib['Id'][-3:])))
|
wavelength=float(light_source.attrib['Id'][-3:]))) # TODO: follow Id reference
|
||||||
except AttributeError:
|
except (AttributeError, ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_filters(self) -> None:
|
def get_filters(self) -> None:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "ndbioimage"
|
name = "ndbioimage"
|
||||||
version = "2025.1.1"
|
version = "2025.1.2"
|
||||||
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