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'#
class UUID(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None, *, is_safe=SafeUUID.unknown)#

Bases: object

Instances of the UUID class represent UUIDs as specified in RFC 4122. UUID objects are immutable, hashable, and usable as dictionary keys. Converting a UUID to a string with str() yields something in the form ‘12345678-1234-1234-1234-123456789abc’. The UUID constructor accepts five possible forms: a similar string of hexadecimal digits, or a tuple of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and 48-bit values respectively) as an argument named ‘fields’, or a string of 16 bytes (with all the integer fields in big-endian order) as an argument named ‘bytes’, or a string of 16 bytes (with the first three fields in little-endian order) as an argument named ‘bytes_le’, or a single 128-bit integer as an argument named ‘int’.

UUIDs have these read-only attributes:

bytes the UUID as a 16-byte string (containing the six

integer fields in big-endian byte order)

bytes_le the UUID as a 16-byte string (with time_low, time_mid,

and time_hi_version in little-endian byte order)

fields a tuple of the six integer fields of the UUID,

which are also available as six individual attributes and two derived attributes:

time_low the first 32 bits of the UUID time_mid the next 16 bits of the UUID time_hi_version the next 16 bits of the UUID clock_seq_hi_variant the next 8 bits of the UUID clock_seq_low the next 8 bits of the UUID node the last 48 bits of the UUID

time the 60-bit timestamp clock_seq the 14-bit sequence number

hex the UUID as a 32-character hexadecimal string

int the UUID as a 128-bit integer

urn the UUID as a URN as specified in RFC 4122

variant the UUID variant (one of the constants RESERVED_NCS,

RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)

version the UUID version number (1 through 5, meaningful only

when the variant is RFC_4122)

is_safe An enum indicating whether the UUID has been generated in

a way that is safe for multiprocessing applications, via uuid_generate_time_safe(3).

property bytes#
property bytes_le#
property clock_seq#
property clock_seq_hi_variant#
property clock_seq_low#
property fields#
property hex#
int#
is_safe#
property node#
property time#
property time_hi_version#
property time_low#
property time_mid#
property urn#
property variant#
property 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#
actionShutterCounts: QAction#
actionSpectrumViewer: QAction#
add_item_to_tree_view(item: QTreeWidgetItem) None[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) None[source]#
add_to_dataset_dialog: AddImagesToDatasetDialog | None = None#
ask_to_use_closest_to_180(diff_rad: float) bool[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() None[source]#

Runs when the window is closed.

closeEvent(event) None[source]#

Handles a request to quit the application from the user.

static create_child_tree_item(parent: QTreeDatasetWidgetItem, dataset_id: UUID, name: str) None[source]#
create_dataset_tree_widget_item(title: str, id: UUID) QTreeDatasetWidgetItem[source]#
create_new_stack(images: ImageStack) None[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() None[source]#
execute_image_file_load() None[source]#
execute_image_file_save() None[source]#
execute_move_stack(origin_dataset_id: UUID, stack_id: UUID, destination_stack_type: str, destination_dataset_id: UUID) None[source]#
execute_nexus_load() None[source]#
execute_nexus_save() None[source]#
filters: FiltersWindowView | None = None#
get_all_180_projections() list[ImageStack][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) dict[str, Any][source]#
get_stack_visualiser(stack_uuid) StackVisualiserView[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() None[source]#
load_image_stack() None[source]#
load_projection_angles() None[source]#
load_sample_log_dialog() None[source]#
load_shuttercounts_dialog() None[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() None[source]#
populate_image_menu() None[source]#
recon: ReconstructWindowView | None = None#
rename_stack(current_name: str, new_name: str) None[source]#
settings_window: SettingsWindowView | None = None#
setup_shortcuts() None[source]#
show_about() None[source]#
show_add_stack_to_existing_dataset_dialog(dataset_id: UUID) None[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() None[source]#
show_image_load_dialog() None[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() None[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) None[source]#
show_nexus_load_dialog() None[source]#
show_nexus_save_dialog() None[source]#
show_recon_window() None[source]#
show_settings_window() None[source]#
show_spectrum_viewer_window() None[source]#
show_stack_select_dialog() StackComparePresenter | None[source]#
show_wizard() None[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: list[StackId]#
property stack_names: list[str]#
property strict_dataset_list: list[DatasetId]#
uncaught_exception(user_error_msg: str, log_error_msg: str) None[source]#
update_shortcuts() None[source]#
welcome_window: WelcomeScreenPresenter | None = None#
wizard: WizardPresenter | None = None#
class mantidimaging.gui.windows.main.view.QTreeDatasetWidgetItem(parent: QTreeWidget, dataset_id: UUID)[source]#

Bases: QTreeWidgetItem

property id#