RangeROI#
- class glue.core.roi.RangeROI(orientation, min=None, max=None)#
Bases:
RoiA region of interest representing all points within a range in either x or y.
- Parameters:
- orientationstr
One of ‘x’ or ‘y’, setting the axis on which to apply the range.
- minfloat, optional
Start value of the range.
- maxfloat, optional
End value of the range.
Attributes Summary
Methods Summary
center()Return the (x, y) coordinates of the ROI center
contains(x, y)Test which of a set of (x, y) points fall within the region of interest.
defined()Returns True if the ROI is defined
move_to(center)Translate the ROI to a center of (x, y)
range()reset()set_range(lo, hi)Returns vertices vx, vy of a polygon approximating the Roi, where each is an array of vertex coordinates in x and y.
transformed([xfunc, yfunc])A transformed version of the Roi
Attributes Documentation
- ori#
Methods Documentation
- center()#
Return the (x, y) coordinates of the ROI center
- contains(x, y)#
Test which of a set of (x, y) points fall within the region of interest.
- Parameters:
- xfloat or array-like
x coordinate(s) of point(s).
- yfloat or array-like
y coordinate(s) of point(s).
- Returns:
- insidebool or ~numpy.ndarray
An boolean iterable, where each element is True if the corresponding (x, y) tuple is inside the Roi.
- Raises:
- UndefinedROI
If not defined.
- defined()#
Returns True if the ROI is defined
- move_to(center)#
Translate the ROI to a center of (x, y)
- range()#
- reset()#
- set_range(lo, hi)#
- to_polygon()#
Returns vertices vx, vy of a polygon approximating the Roi, where each is an array of vertex coordinates in x and y.
- transformed(xfunc=None, yfunc=None)#
A transformed version of the Roi