mantidimaging.gui.widgets.mi_image_view.presenter module¶
- class mantidimaging.gui.widgets.mi_image_view.presenter.MIImagePresenter[source]¶
Bases:
object
- static get_nearest_timeline_tick(x_pos_clicked: float, x_axis, view_range: List[int])[source]¶
Calculate the closes point to the clicked position on the histogram’s timeline.
- Parameters:
x_pos_clicked – The X position where the mouse clicked on the histogram widget
x_axis – The X-axis object that knows pixel sizes of the widget
view_range – The view range represented on the histogram
- static get_roi(image, roi_pos, roi_size)[source]¶
Get a ROI based on the current real ROI selected. Clips it to be in-bounds of the shape of the image, to prevent issues when passed to filters :param image: The current image that is displayed :param roi_pos: The top-left position of the ROI :param roi_size: The size of the ROI in [right, bottom] direction :return: The corrected position and size to have an in-bounds ROI