Read NDTiff#

class iohub.ndtiff.NDTiffDataset(data_path: Path | str)[source]#

Reader for ND-TIFF datasets acquired with Micro/Pycro-Manager, effectively a wrapper of the ndtiff.Dataset class.

get(k[, d]) D[k] if k in D, else d.  d defaults to None.#
get_image_metadata(p: int | str, t: int, c: int | str, z: int) dict[source]#

Return image plane metadata at the requested PTCZ coordinates

Parameters:
pint or str

position index

tint

time index

cint or str

channel index

zint

slice/z index

Returns:
dict

image plane metadata

property hcs_position_labels#

Parse plate position labels generated by the HCS position generator and split them into (row, column, FOV) components.

This method supports multiple label formats commonly produced by micromanager. The returned values are a 3-part tuple with the following interpretation: - row: usually a letter (e.g. ‘A’), or ‘0’ if not explicitly given - column: the well column number or site index - fov: the field-of-view index, typically zero-padded

Supported label formats and their outputs:

Format → Output —————————– ———————- “A1-Site_0” → (‘A’, ‘1’, ‘0’) “1-Pos000_000” → (‘0’, ‘1’, ‘000000’) “2-Pos000_001” → (‘0’, ‘2’, ‘000001’) “1-Pos001” → (‘0’, ‘1’, ‘001000’) “Pos-5-000_005” → (‘0’, ‘5’, ‘000005’)

Returns:
list[tuple[str, str, str]]

A list of (row, column, fov) tuples corresponding to parsed label components in a uniform format.

Raises:
ValueError

If stage position metadata is missing or labels are not found.

items() a set-like object providing a view on D's items#
keys() a set-like object providing a view on D's keys#
property micromanager_summary: dict | None#

Micro-manager summary metadata.

property root: Path#

Root directory of the dataset.

property str_channel_axis: bool#

Channel axis is string-valued

property str_position_axis: bool#

Position axis is string-valued

property t_scale: float#

Time scale in seconds.

values() an object providing a view on D's values#
property zyx_scale: tuple[float, float, float]#

ZXY pixel size in micrometers.

class iohub.ndtiff.NDTiffFOV(parent: NDTiffDataset, key: int)[source]#
channel_index(key: str) int#

Return index of given channel.

frame_metadata(t: int, c: int, z: int) dict[str, Any][source]#

Return image plane metadata for a given camera frame.

Parameters:
tint

Time index.

zint

Z slice index.

cint

Channel index.

Returns:
dict | None

Image plane metadata. None if not available.

property t_scale: float#

Helper function for FOV time scale (seconds).

property zyx_scale: tuple[float, float, float]#

Helper function for FOV spatial scale (micrometer).