acia.segm.tiff_metadata#
Best-effort calibration reader for OME-TIFF / ImageJ-hyperstack metadata.
This is the inverse of acia.segm.tiff_export’s calibration tags: it reads
back the PhysicalSizeX/TimeIncrement (OME) or unit/finterval
(ImageJ) tags that module writes, so acia’s own OME/ImageJ TIFF exports round
-trip through it, and any scope-native OME-TIFF or ImageJ hyperstack benefits
too. Reads headers only – never the pixel array. Missing calibration is
simply omitted, never fabricated (same discipline as the writer side).
- class acia.segm.tiff_metadata.TiffCalibration[source]#
Bases:
objectBest-effort physical calibration read from a TIFF’s own metadata.
- acia.segm.tiff_metadata.read_tiff_calibration(path, storage_options=None)[source]#
Read pixel size / frame timing from a TIFF’s OME-XML or ImageJ metadata.
Reads only the file’s headers/metadata (no pixel array). OME-XML is tried first; if the file is not an OME-TIFF (or nothing usable is found there), ImageJ hyperstack tags are tried next. If neither is present, every field is
None.- Parameters:
path (str | PathLike) – Path to the
.tif/.tifffile. May be a plain local path or any fsspec-supported URL (e.g.smb://).storage_options (dict | None) – extra fsspec storage options (e.g. credentials), resolved the same way as
LocalSequenceSource.
- Returns:
TiffCalibration – best-effort calibration; missing values are
None.- Return type: