mantidimaging.gui.windows.image_load_dialog.presenter module#

class mantidimaging.gui.windows.image_load_dialog.presenter.LoadPresenter(view: ImageLoadDialog)[source]#

Bases: object

do_update_field(field: Field) None[source]#

Called when user clicks select button.

Does nothing if the select file dialog is canceled.

do_update_flat_or_dark(field: Field, selected_file: str) None[source]#

Update the field with the images from the selected file. :param field (Field): The field to update. :param selected_file (str): The path of the selected file. :return None

do_update_sample(selected_file: str) None[source]#

Updates the memory usage and the indices in the dialog.

do_update_sample_log(field: Field, file_name: str) None[source]#

Update the sample log if a sample is set. Also check log is consistent with sample

do_update_shutter_counts(field: Field, selected_file: str) None[source]#

Updates the shutter counts for the selected file.

Parameters:
  • (Field) (field) – The field to update with the shutter counts.

  • (str) (selected_file) – The path of the selected file.

:return None

ensure_sample_log_consistency(field: Field, file_name: str, image_filenames: list[str]) None[source]#
ensure_sample_shuttercount_consistency(field: Field, file_name: str) None[source]#
get_parameters() LoadingParameters[source]#

Get the loading parameters for the selected sample. :return LoadingParameters: The loading parameters for the selected sample. :raises RuntimeError: If no sample is selected.

sample_fg: FilenameGroup | None = None#
update_field_with_filegroup(file_info: FILE_TYPES, file_group: FilenameGroup)[source]#

Update the field with the given file group by finding all files in the group and setting them in the field.

Parameters:
  • (FILE_TYPES) (file_info) – The file information.

  • (FilenameGroup) (file_group) – The file group containing the files.

:return None

view: ImageLoadDialog#