mantidimaging.gui.windows.spectrum_viewer.view module#

class mantidimaging.gui.windows.spectrum_viewer.view.AllowedModesTypedDict[source]#

Bases: TypedDict

label: str#
mode: ToFUnitMode#
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

adjust_roi() None[source]#
auto_range_image()[source]#
property bin_size: int#
bin_size_spinBox: QSpinBox#
property bin_step: int#
bin_step_spinBox: QSpinBox#
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#
disable_roi_properties()[source]#
display_normalise_error()[source]#
exportButton: QPushButton#
exportTabs: QTabWidget#
find_row_for_roi(roi_name: str) int | None[source]#

Returns row index for ROI name, or None if not found. @param roi_name: Name ROI find. @return: Row index ROI or None.

flightPathSpinBox: QDoubleSpinBox#
get_csv_filename() Path | None[source]#
get_normalise_stack() UUID | None[source]#
get_rits_export_directory() Path | None[source]#

Get the path to save the RITS file too

get_rits_export_filename() Path | None[source]#

Get the path to save the RITS file too

get_roi_properties_spinboxes()[source]#
handle_table_click(index)[source]#
imageLayout: QVBoxLayout#
property image_output_mode: str#
image_output_mode_combobox: QComboBox#
last_clicked_roi: str#
normalisation_enabled()[source]#
normaliseCheckBox: QCheckBox#
normaliseErrorIcon: QLabel#
normaliseStackSelector: DatasetSelectorWidgetView#
normalise_error_issue: str = ''#
number_roi_properties_procced: int = 0#
on_visibility_change() None[source]#

When the visibility of an ROI is changed, update the visibility of the ROI in the spectrum widget

remove_roi() None[source]#

Clear the selected ROI in the table view

roiPropertiesGroupBox: QGroupBox#
roiPropertiesTableWidget: QTableWidget#
property roi_table_model: TableModel#
sampleStackSelector: DatasetSelectorWidgetView#
set_binning_visibility() None[source]#
set_image(image_data: ndarray, autoLevels: bool = True)[source]#
set_new_roi() None[source]#

Set a new ROI on the image

set_normalise_error(norm_issue: str)[source]#
set_old_table_names()[source]#
set_roi_alpha(alpha: float, roi_name: str) 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_roi_properties() None[source]#
set_roi_spinbox_ranges()[source]#
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

set_spectum_roi_color(roi_name: str) None[source]#
show(self)[source]#
show_visible_spectrums()[source]#
spectrum_widget: SpectrumWidget#
tableView: RemovableRowTableView#
timeDelaySpinBox: QDoubleSpinBox#
tofPropertiesGroupBox: QGroupBox#
property transmission_error_mode: str#
transmission_error_mode_combobox: QComboBox#
try_to_select_relevant_normalise_stack(name: str) None[source]#
update_roi_color(roi_name: str, new_color: tuple) None[source]#

Finds ROI by name in table and updates colour. @param roi_name: Name of the ROI to update. @param new_color: The new color for the ROI in (R, G, B) format.