VertexROIBase¶
-
class
glue.core.roi.
VertexROIBase
(vx=None, vy=None)[source]¶ Bases:
glue.core.roi.Roi
Methods Summary
add_point
(self, x, y)Add another vertex to the ROI
defined
(self)Returns whether or not the subset is properly defined
remove_point
(self, x, y[, thresh])Remove the vertex closest to a reference (xy) point
replace_last_point
(self, x, y)reset
(self)Reset the vertex list.
to_polygon
(self)Returns a tuple of x and y points, approximating the ROI as a polygon.
transformed
(self[, xfunc, yfunc])A transformed version of the ROI
Methods Documentation
-
add_point
(self, x, y)[source]¶ Add another vertex to the ROI
- Parameters
x – The x coordinate
y – The y coordinate
-
remove_point
(self, x, y, thresh=None)[source]¶ Remove the vertex closest to a reference (xy) point
- Parameters
x – The x coordinate of the reference point
y – The y coordinate of the reference point
thresh – An optional threshold. If present, the vertex closest to (x,y) will only be removed if the distance is less than thresh
-