mantidimaging.core.io.loader.loader module¶
- class mantidimaging.core.io.loader.loader.FileInformation(filenames: List[str], shape: Tuple[int, int, int], sinograms: bool)[source]¶
Bases:
object
- mantidimaging.core.io.loader.loader.create_loading_parameters_for_file_path(file_path: str, logger: Logger | None = None) LoadingParameters | None [source]¶
- mantidimaging.core.io.loader.loader.find_and_verify_sample_log(sample_directory: str, image_filenames: List[str]) str [source]¶
- mantidimaging.core.io.loader.loader.load(input_path: str | None = None, input_path_flat_before: str | None = None, input_path_flat_after: str | None = None, input_path_dark_before: str | None = None, input_path_dark_after: str | None = None, in_prefix: str = '', in_format: str = 'tif', dtype: npt.DTypeLike = <class 'numpy.float32'>, file_names: ~typing.List[str] | None = None, indices: ~typing.List[int] | ~mantidimaging.core.utility.data_containers.Indices | None = None, progress: ~mantidimaging.core.utility.progress_reporting.progress.Progress | None = None) StrictDataset [source]¶
Loads a stack, including sample, white and dark images.
- Parameters:
input_path – Path for the input data folder
input_path_flat_before – Optional: Path for the input Flat Before images folder
input_path_flat_after – Optional: Path for the input Flat After images folder
input_path_dark_before – Optional: Path for the input Dark Before images folder
input_path_dark_after – Optional: Path for the input Dark After images folder
in_prefix – Optional: Prefix for loaded files
in_format – Default:’tiff’, format for the input images
dtype – Default:np.float32, data type for the input images
file_names – Use provided file names for loading
indices – Specify which indices are loaded from the found files. This DOES NOT check for the number in the image filename, but removes all indices from the filenames list that are not selected
progress – The progress reporting instance
- Returns:
a tuple with shape 3: (sample, flat, dark), if no flat and dark were loaded, they will be None
- mantidimaging.core.io.loader.loader.load_log(log_file: str) IMATLogFile [source]¶
- mantidimaging.core.io.loader.loader.load_p(parameters: ImageParameters, dtype: npt.DTypeLike, progress: Progress) Images [source]¶
- mantidimaging.core.io.loader.loader.load_stack(file_path: str, progress: Progress | None = None) Images [source]¶
- mantidimaging.core.io.loader.loader.read_in_file_information(input_path: str, in_prefix: str = '', in_format: str = 'tif', data_dtype: npt.DTypeLike = <class 'numpy.float32'>) FileInformation [source]¶