mantidimaging.gui.windows.main.model module

class mantidimaging.gui.windows.main.model.MainWindowModel[source]

Bases: object

add_180_deg_to_dataset(dataset_id: UUID, _180_deg_file: str) ImageStack[source]

Loads the 180 projection and adds this to a given Dataset ID. :param dataset_id: The ID of the Dataset. :param _180_deg_file: The location of the 180 projection. :return: The loaded 180 ImageStack object.

add_dataset_to_model(dataset: StrictDataset | MixedDataset) None[source]
add_log_to_sample(images_id: UUID, log_file: str)[source]
add_projection_angles_to_sample(images_id: UUID, proj_angles: ProjectionAngles)[source]
add_recon_to_dataset(recon_data: ImageStack, stack_id: UUID) UUID[source]

Adds a recon to a dataset using recon data and an ID from one of the stacks in the dataset. :param recon_data: The recon data. :param stack_id: The ID of one of the member stacks. :return: The ID of the parent dataset if found.

do_images_saving(images_id, output_dir, name_prefix, image_format, overwrite, pixel_depth, progress)[source]
do_load_dataset(parameters: LoadingParameters, progress) StrictDataset[source]
do_nexus_saving(dataset_id: UUID, path: str, sample_name: str) bool | None[source]
get_existing_180_id(dataset_id: UUID) UUID | None[source]

Gets the ID of the 180 projection object in a Dataset. :param dataset_id: The Dataset ID. :return: The 180 ID if found, None otherwise.

get_images_by_uuid(images_uuid: UUID) ImageStack | None[source]
get_parent_dataset(member_id: UUID) UUID[source]

Takes the ID of an image stack and returns the ID of its parent strict dataset. :param member_id: The ID of the image stack. :return: The ID of the parent dataset if found.

get_recon_list_id(parent_id: UUID) UUID[source]
property image_ids: List[UUID]
property images: List[ImageStack]
load_images(file_path: str, progress: Progress) MixedDataset[source]
property proj180s: List[ImageStack]
raise_error_when_images_not_found(images_id: UUID) NoReturn[source]
raise_error_when_parent_dataset_not_found(images_id: UUID) NoReturn[source]
raise_error_when_parent_strict_dataset_not_found(images_id: UUID) NoReturn[source]
property recon_list_ids
remove_container(container_id: UUID) List[UUID][source]

Removes a container from the model. :param container_id: The ID of the dataset or image stack. :return: A list of the IDs of all the image stacks that were deleted from the model if a match was found, None

otherwise.