mantidimaging.gui.widgets.spectrum_widgets.roi_form_widget module#

class mantidimaging.gui.widgets.spectrum_widgets.roi_form_widget.ROIFormWidget(parent=None)[source]#

Bases: BaseWidget

Collection of widgets for adding, removing and adjusting ROIs in the spectrum viewer

addBtn: QPushButton#
bin_size_spinBox: QSpinBox#
bin_step_spinBox: QSpinBox#
exportButton: QPushButton#
exportButtonRITS: QPushButton#
exportTabs: QTabWidget#
property image_output_mode: str#
image_output_mode_combobox: QComboBox#
removeBtn: QPushButton#
roi_properties_widget: ROIPropertiesTableWidget#
set_binning_visibility() None[source]#
table_view: ROITableWidget#
transmission_error_mode_combobox: QComboBox#
class mantidimaging.gui.widgets.spectrum_widgets.roi_form_widget.ROIPropertiesTableWidget(parent=None)[source]#

Bases: BaseWidget

Widget for manually adjusting the current selected ROI

enable_roi_spinboxes(enable: bool) None[source]#
group_box: QGroupBox#
label_height: QLabel#
label_width: QLabel#
roi_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.

set_roi_limits(shape: tuple[int, ...]) None[source]#
set_roi_name(name: str) None[source]#
set_roi_values(roi: SensibleROI) None[source]#
spin_bottom: QSpinBox#
spin_left: QSpinBox#
spin_right: QSpinBox#
spin_top: QSpinBox#
to_roi() SensibleROI[source]#
class mantidimaging.gui.widgets.spectrum_widgets.roi_form_widget.ROITableWidget(parent=None)[source]#

Bases: RemovableRowTableView

A class to represent the ROI table widget in the spectrum viewer window.

ElementType = str | tuple[int, int, int] | bool#
RowType#

alias of list[str | tuple[int, int, int] | bool]

add_row(name: str, colour: tuple[int, int, int, int], roi_names: list[str]) None[source]#

Add a new row to the ROI table

clear_table() None[source]#

Clears the ROI table in the spectrum viewer.

property current_roi_name: str#
find_row_for_roi(roi_name: str) int | None[source]#

Returns row index for ROI name, or None if not found.

get_roi_name_by_row(row: int) str[source]#

Retrieve the name an ROI by its row index.

get_roi_names() list[str][source]#
get_roi_visibility_by_row(row: int) bool[source]#

Retrieve the visibility status of an ROI by its row index.

name_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.

on_row_change(item: QModelIndex, _: Any) None[source]#
remove_row(row: int) None[source]#

Remove a row from the ROI table

row_count() int[source]#

Returns the number of rows in the ROI table model.

select_roi(roi_name: str) None[source]#
selected_row: int#
selection_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.

update_roi_color(roi_name: str, new_color: tuple[int, int, int, int]) None[source]#

Finds ROI by name in table and updates it’s colour (R, G, B) format.

visibility_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.