f89e60075cc6fb850f8dcfc8740c39b4b9d0c38a
ome-metadata
Open Microscopy XML metadata (https://www.openmicroscopy.org/Schemas/) as a collection of Rust structs and enums, with translation to Python.
Rust
use std::fs::read_to_string;
use ome_metadata::Ome;
let xml = read_to_string($file)?;
let ome: Ome = xml.parse()?;
let image = &ome.image[0];
println!("acquisition date: {:#?}", image.acquisition_date);
Python
from ome_metadata import Ome
with open($file) as f:
xml = f.read()
ome = Ome.from_xml(xml)
image = ome.image[0]
print(f"acquisition date: {image.acquisition_date}")
Description
Open Microscopy XML metadata (https://www.openmicroscopy.org/Schemas/) as a collection of Rust structs and enums, with translation to Python.
466 KiB
0 Stars
1 Watchers
0 Forks
Languages
Rust
100%