mantidimaging.gui.windows.spectrum_viewer.spectrum_widget module¶
- class mantidimaging.gui.windows.spectrum_viewer.spectrum_widget.SpectrumROI(name: str, sensible_roi: SensibleROI, *args, **kwargs)[source]¶
Bases:
ROI
Spectrum ROI object subclassed from pyqtgraph ROI containing ROI and associated data.
@param name: Name of the ROI @param sensible_roi: Sensible ROI object containing the ROI data @param args: Arguments to pass to the ROI object @param kwargs: Keyword arguments to pass to the ROI object
- property roi: ROI¶
- class mantidimaging.gui.windows.spectrum_viewer.spectrum_widget.SpectrumWidget[source]¶
Bases:
GraphicsLayoutWidget
The widget containing the spectrum plot and the image projection.
@param parent: The parent widget
- add_roi(roi: SensibleROI, name: str) None [source]¶
Add an ROI to the image view.
@param roi: The ROI to add. @param name: The name of the ROI.
- get_roi(roi_name: str) SensibleROI [source]¶
Get the ROI with the given name. If no name is given, the default ROI is returned.
@param roi_name: The name of the ROI to return. @return: The ROI with the given name.
- image: MIMiniImageView¶
- random_colour_generator() tuple[int, int, int] [source]¶
A random colour generator to colour ROIs boarders. Generates colours that are easy to see for colour blind people if colour_blind_friendly is True. By default colour_blind_friendly is set to False
@return: A random colour in RGB format. (0-255, 0-255, 0-255)
- range_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.
- range_control: LinearRegionItem¶
- remove_roi(roi_name: str) None [source]¶
Remove a given ROI by name unless it is ‘roi’ or ‘all’.
@param roi_name: The name of the ROI to remove.
- rename_roi(old_name: str, new_name: str) None [source]¶
Rename a given ROI and corresponding spectrum by name unless it is called ‘roi’ or ‘all’
@param old_name: The name of the ROI to rename. @param new_name: The new name of the ROI. @raise KeyError: If the new name is already in use or equal to ‘roi’ or ‘all’.
- reset_roi_size(image_shape) None [source]¶
Reset the size of the ROI to the maximum size of the image.
@param image_shape: The shape of the image.
- 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.
- spectrum: PlotItem¶