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], 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], 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