mantidimaging.gui.windows.spectrum_viewer.presenter module¶
- 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.
- 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=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
- do_set_roi_alpha(name: str, alpha: float) None [source]¶
Set the alpha value of the ROI with the given name
- Parameters:
name – The name of the ROI
alpha – The new alpha value (0-255)
- 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