mantidimaging.gui.windows.spectrum_viewer.presenter module¶
- class mantidimaging.gui.windows.spectrum_viewer.presenter.ExportMode(value)[source]¶
Bases:
Enum
An enumeration.
- IMAGE_MODE = 1¶
- ROI_MODE = 0¶
- class mantidimaging.gui.windows.spectrum_viewer.presenter.SpectrumViewerWindowPresenter(view: SpectrumViewerWindowView, main_window: MainWindowView)[source]¶
Bases:
BasePresenter
The presenter for the spectrum viewer window.
This presenter is responsible for handling user interaction with the view and updating the model and view accordingly to look after the state of the window.
- change_roi_colour(roi_name: str, new_colour: tuple) None [source]¶
Change the colour of a given ROI in both the spectrum widget and the table.
@param roi_name: Name of the ROI to change color. @param new_colour: The new color for the ROI.
- do_add_roi_to_table(roi_name: str) None [source]¶
Add a given ROI to the table by ROI name
@param roi_name: Name of the ROI to add
- do_remove_roi(roi_name: str | None = None) None [source]¶
Remove a given ROI from the table by ROI name or all ROIs from the table if no name is passed as an argument
@param roi_name: Name of the ROI to remove
- export_mode: ExportMode¶
- handle_button_enabled() None [source]¶
Enable the export button if the current stack is not None and normalisation is valid
- handle_roi_moved(force_new_spectrums: bool = False) None [source]¶
Handle changes to any ROI position and size.
- model: SpectrumViewerWindowModel¶
- rename_roi(old_name: str, new_name: str) None [source]¶
Rename a given ROI from the table by ROI name
@param old_name: Name of the ROI to rename @param new_name: New name of the ROI