read_micromanager_metadata

tifffile.read_micromanager_metadata(fh, /, keys=None)

Return Micro-Manager non-TIFF settings from file.

The settings can be used to read image data without parsing any TIFF structures.

Parameters:
  • fh (FileHandle | IO[bytes]) – Open file handle to Micro-Manager TIFF file.

  • keys (Container[str] | None) – Name of keys to return in result.

Returns:

  • ‘MajorVersion’ (str)

  • ’MinorVersion’ (str)

  • ’Summary’ (dict): Specifies the dataset, such as shape, dimensions, and coordinates.

  • ’IndexMap’ (numpy.ndarray): (channel, slice, frame, position, ifd_offset) indices of all frames.

  • ’DisplaySettings’ (list[dict]): Image display settings such as channel contrast and colors.

  • ’Comments’ (dict): User comments.

Return type:

Micro-Manager non-TIFF settings, which may contain the following keys

Notes

Summary metadata are the same for all files in a dataset. DisplaySettings metadata are frequently corrupted, and Comments are often empty. The Summary and IndexMap metadata are stored at the beginning of the file, while DisplaySettings and Comments are towards the end. Excluding DisplaySettings and Comments from the results may significantly speed up reading metadata of interest.

References