mantidimaging.gui.windows.main.presenter module#
- class mantidimaging.gui.windows.main.presenter.MainWindowPresenter(view: MainWindowView)[source]#
Bases:
BasePresenter
- LOAD_ERROR_STRING = 'Failed to load stack. Error: {}'#
- SAVE_ERROR_STRING = 'Failed to save data. Error: {}'#
- property active_stacks: dict[UUID, StackVisualiserView]#
- add_180_deg_file_to_dataset(dataset_id: UUID, _180_deg_file: str) None [source]#
Loads a 180 file then adds it to the dataset, creates a stack window, and updates the dataset tree view. :param dataset_id: The ID of the dataset to update. :param _180_deg_file: The filename for the 180 file.
- add_alternative_180_if_required(dataset: Dataset) None [source]#
Checks if the dataset has a 180 projection and tries to find an alternative if one is missing. :param dataset: The loaded dataset.
- add_images_to_existing_dataset(dataset_id: UUID, new_images: ImageStack, images_type: str)[source]#
- add_projection_angles_to_sample(stack_id: UUID, proj_angles: ProjectionAngles) None [source]#
- add_sinograms_to_dataset_and_update_view(sino_stack: ImageStack, original_stack_id: UUID) None [source]#
Adds sinograms to a dataset or replaces an existing one. :param sino_stack: The sinogram stack. :param original_stack_id: The ID of a stack in the dataset.
- add_stack_to_dictionary(stack: StackVisualiserView) None [source]#
- create_dataset_stack_visualisers(dataset: Dataset) StackVisualiserView [source]#
Creates the StackVisualiserView widgets for a new dataset.
- create_single_tabbed_images_stack(images: ImageStack) StackVisualiserView [source]#
Creates a stack for a single ImageStack object and focuses on it. :param images: The ImageStack object for the new stack window. :return: The new StackVisualiserView.
- get_active_stack_visualisers() list[StackVisualiserView] [source]#
- get_all_180_projections() list[ImageStack] [source]#
- get_all_stacks() list[ImageStack] [source]#
- get_stack(stack_id: UUID) ImageStack [source]#
- get_stack_visualiser(stack_id: UUID) StackVisualiserView [source]#
- get_stack_with_images(images: ImageStack) StackVisualiserView [source]#
- handle_add_images_to_existing_dataset_from_dialog() None [source]#
Adds / replaces images to an existing dataset. Updates the tree view and deletes the previous stack if necessary.
- notify(signal: Notification, **baggage)[source]#
- remove_item_from_tree_view(uuid_remove: UUID) None [source]#
Removes an item from the tree view using a given ID. :param uuid_remove: The ID of the item to remove.
- view: MainWindowView#
- class mantidimaging.gui.windows.main.presenter.Notification(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- ADD_RECON = 8#
- DATASET_ADD = 10#
- FOCUS_TAB = 7#
- IMAGE_FILE_LOAD = 1#
- IMAGE_FILE_SAVE = 2#
- MOVE_STACK = 13#
- NEXUS_LOAD = 5#
- NEXUS_SAVE = 6#
- REMOVE_STACK = 3#
- RENAME_STACK = 4#
- SHOW_ADD_STACK_DIALOG = 9#
- SHOW_MOVE_STACK_DIALOG = 12#
- TAB_CLICKED = 11#