mantidimaging.core.io.loader.img_loader module#

This module handles the loading of FIT, FITS, TIF, TIFF

class mantidimaging.core.io.loader.img_loader.ImageLoader(load_func: Callable[[str], np.ndarray], img_format: str, img_shape: tuple[int, ...], data_dtype: npt.DTypeLike, indices: list[int] | Indices | None, progress: Progress | None = None)[source]#

Bases: object

load_files(files: list[str]) SharedArray[source]#
load_sample_data(input_file_names: list[str]) SharedArray[source]#
mantidimaging.core.io.loader.img_loader.execute(load_func: Callable[[str], np.ndarray], sample_path: list[str], img_format: str, dtype: npt.DTypeLike, indices: list[int] | Indices | None, progress: Progress | None = None) ImageStack[source]#

Reads a stack of images into memory, assuming dark and flat images are in separate directories.

Usual type in fits is 16-bit pixel depth, data type is denoted with:

‘>i2’ - uint16 ‘>f2’ - float16 ‘>f4’ - float32

Returns:

ImageStack object