mantidimaging.gui.windows.spectrum_viewer.view module

class mantidimaging.gui.windows.spectrum_viewer.view.SpectrumViewerWindowView(main_window: MainWindowView)[source]

Bases: BaseMainWindowView

add_roi_table_row(name: str, colour: tuple[int, int, int])[source]

Add a new row to the ROI table

@param name: The name of the ROI @param colour: The colour of the ROI

auto_range_image()[source]
cleanup()[source]

Runs when the window is closed.

clear() None[source]
clear_all_rois() None[source]

Clear all ROIs from the table view

property current_dataset_id: 'UUID' | None
display_normalise_error()[source]
exportButton: QPushButton
get_csv_filename() Path | None[source]
get_normalise_stack() 'UUID' | None[source]
imageLayout: QVBoxLayout
normalisation_enabled()[source]
normaliseCheckBox: QCheckBox
normaliseErrorIcon: QLabel
normaliseStackSelector: DatasetSelectorWidgetView
normalise_error_issue: str = ''
remove_roi() None[source]

Clear the selected ROI in the table view

property roi_table_model: TableModel
sampleStackSelector: DatasetSelectorWidgetView
set_export_button_enabled(enabled: bool)[source]

Toggle enabled state of the export button

@param enabled: True to enable the button, False to disable it

set_image(image_data: ndarray | None, autoLevels: bool = True)[source]
set_new_roi() None[source]

Set a new ROI on the image

set_normalise_error(norm_issue: str)[source]
set_roi_alpha(alpha: float, roi) None[source]

Set the alpha value for the selected ROI and update the spectrum to reflect the change. A check is made on the spectrum to see if it exists as it may not have been created yet.

@param alpha: The alpha value

set_spectrum(name: str, spectrum_data: ndarray)[source]

Try to set the spectrum data for a given ROI assuming the roi may not exist in the spectrum widget yet depending on when method is called

show(self)[source]
tableView: RemovableRowTableView
try_to_select_relevant_normalise_stack(name: str) None[source]