neuralib.imglib.io.load_sequence

neuralib.imglib.io.load_sequence(path, suffix='*.tif')[source]

Recursively load a TIFF sequence from a file or directory using memory mapping.

  • If path is a TIFF file, returns a memmapped NumPy array.

  • If path is a directory, loads and stacks all valid TIFF files matching suffix.

  • Ignores hidden files (starting with ‘.’) or AppleDouble files (._).

Parameters:
  • path (str | Path | PathLike[str]) – Path to a .tif file or a directory of .tif files.

  • suffix (str) – Glob pattern for selecting TIFF files (default: *.tif).

Returns:

Stacked array of TIFF frames. Array[Any, [H, W]]

Raises:

RuntimeError – If the path is not found or no valid TIFFs were found.

Return type:

ndarray