mantidimaging.gui.windows.main.view module#

class mantidimaging.gui.windows.main.view.MainWindowView(open_dialogs: bool = True)[source]#

Bases: BaseMainWindowView

LOAD_PROJECTION_ANGLES_DIALOG_MESSAGE = 'Which stack are the projection angles in DEGREES being loaded for?'#
LOAD_PROJECTION_ANGLES_FILE_DIALOG_CAPTION = 'File with projection angles in DEGREES'#
NOT_THE_LATEST_VERSION = 'This is not the latest version'#
actionCompareImages: QAction#
actionExit: QAction#
actionFilters: QAction#
actionLiveViewer: QAction#
actionLoad180deg: QAction#
actionLoadDataset: QAction#
actionLoadImages: QAction#
actionLoadNeXusFile: QAction#
actionLoadProjectionAngles: QAction#
actionRecon: QAction#
actionSampleLoadLog: QAction#
actionSaveImages: QAction#
actionSaveNeXusFile: QAction#
actionSettings: QAction#
actionSpectrumViewer: QAction#
add_item_to_tree_view(item: QTreeWidgetItem)[source]#
static add_recon_group(dataset_item: QTreeDatasetWidgetItem, recon_id: UUID) QTreeDatasetWidgetItem[source]#

Adds a recon group to a dataset item in the tree view. :param dataset_item: The dataset item. :return: The recon group that was added.

add_recon_to_dataset(recon_data: ImageStack, stack_id: UUID)[source]#
add_to_dataset_dialog: AddImagesToDatasetDialog | None = None#
ask_to_use_closest_to_180(diff_rad: float)[source]#

Asks the user if they want to use the projection that is closest to 180 degrees as the 180deg. :param diff_rad: The difference from the closest projection to 180 in radians. :return: True if the answer wants to use the closest projection, False otherwise.

backend_message#

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

cleanup()[source]#

Runs when the window is closed.

closeEvent(event)[source]#

Handles a request to quit the application from the user.

static create_child_tree_item(parent: QTreeDatasetWidgetItem, dataset_id: UUID, name: str)[source]#
create_dataset_tree_widget_item(title: str, id: UUID) QTreeDatasetWidgetItem[source]#
create_new_stack(images: ImageStack)[source]#
create_stack_window(stack: ImageStack, position: DockWidgetArea = 2, floating: bool = False) StackVisualiserView[source]#
current_showing_stack() StackVisualiserView | None[source]#
default_theme_enabled: int = 1#
dragEnterEvent(self, a0: Optional[QDragEnterEvent])[source]#
dropEvent(self, a0: Optional[QDropEvent])[source]#
execute_add_to_dataset()[source]#
execute_image_file_load()[source]#
execute_image_file_save()[source]#
execute_move_stack(origin_dataset_id: UUID, stack_id: UUID, destination_stack_type: str, destination_dataset_id: UUID)[source]#
execute_nexus_load()[source]#
execute_nexus_save()[source]#
filters: FiltersWindowView | None = None#
get_all_180_projections()[source]#
get_all_stacks() list[ImageStack][source]#
get_dataset(dataset_id: uuid.UUID) MixedDataset | StrictDataset | None[source]#
get_dataset_id_from_stack_uuid(stack_id: UUID) UUID[source]#
get_dataset_tree_view_item(dataset_id: UUID) QTreeDatasetWidgetItem[source]#

Looks for the dataset tree view item matching a given ID. :param dataset_id: The dataset ID. :return: The tree view item if found.

get_images_from_stack_uuid(stack_uuid) ImageStack[source]#
static get_recon_group(dataset_item: QTreeDatasetWidgetItem) QTreeDatasetWidgetItem | None[source]#

Looks for an existing recon group in a dataset tree view item. :param dataset_item: The dataset item to look for the recon group in. :return: The recon group if found.

static get_sinograms_item(parent: QTreeDatasetWidgetItem) QTreeDatasetWidgetItem | None[source]#

Tries to look for a sinograms entry in a dataset tree view item. :return: The sinograms entry if found, None otherwise.

get_stack(stack_uuid: UUID) ImageStack[source]#
get_stack_history(stack_uuid)[source]#
get_stack_visualiser(stack_uuid)[source]#
get_stack_with_images(images: ImageStack) StackVisualiserView[source]#
image_load_dialog: ImageLoadDialog | None = None#
image_save_dialog: ImageSaveDialog | None = None#
is_dataset_strict(ds_id: UUID) bool[source]#
live_view_choose_directory() None[source]#
live_viewer: LiveViewerWindowView | None = None#
load_180_deg_dialog()[source]#
load_image_stack()[source]#
load_projection_angles()[source]#
load_sample_log_dialog()[source]#
menuFile: QMenu#
menuHelp: QMenu#
menuImage: QMenu#
menuTreeView: QMenu | None = None#
menuWorkflow: QMenu#
model_changed#

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

move_stack_dialog: MoveStackDialog | None = None#
nexus_load_dialog: NexusLoadDialog | None = None#
nexus_save_dialog: NexusSaveDialog | None = None#
static open_online_documentation()[source]#
populate_image_menu()[source]#
recon: ReconstructWindowView | None = None#
rename_stack(current_name: str, new_name: str)[source]#
settings_window: SettingsWindowView | None = None#
setup_shortcuts()[source]#
show_about()[source]#
show_add_stack_to_existing_dataset_dialog(dataset_id: UUID)[source]#

Displays the dialog for adding an image stack to an existing dataset. :param dataset_id: The ID of the dataset to update.

show_filters_window()[source]#
show_image_load_dialog()[source]#
show_image_load_dialog_with_path(file_path: str) bool[source]#

Open the dataset loading dialog with a given file_path preset as the sample

show_image_save_dialog()[source]#
show_live_viewer(live_data_path: Path) None[source]#
show_move_stack_dialog(origin_dataset_id: UUID, stack_id: UUID, origin_dataset_name: str, stack_data_type: str)[source]#
show_nexus_load_dialog()[source]#
show_nexus_save_dialog()[source]#
show_recon_window()[source]#
show_settings_window()[source]#
show_spectrum_viewer_window()[source]#
show_stack_select_dialog()[source]#
show_wizard()[source]#
property sino_text: str#
Returns:

The sinogram entry text. Used to avoid circular imports.

spectrum_viewer: SpectrumViewerWindowView | None = None#
stack_changed#

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

property stack_list#
property stack_names#
property strict_dataset_list#
uncaught_exception(user_error_msg: str, log_error_msg: str) None[source]#
update_shortcuts()[source]#
class mantidimaging.gui.windows.main.view.QTreeDatasetWidgetItem(parent: QTreeWidget, dataset_id: UUID)[source]#

Bases: QTreeWidgetItem

property id#