darsia.ROI#
- class ROI(coordinates)[source]#
Bases:
objectPolygonal region of interest (ROI) in global (physical) coordinates for darsia.Image.
NOTE: Only 2D polygons are supported at the moment.
Initialize the ROI with a list of coordinates.
- Parameters:
- coordinates
list[darsia.Coordinate] |darsia.CoordinateArray Coordinates defining the polygon. If first and last coordinates are not the same, the first coordinate will be appended to the end to close the polygon.
- coordinates
Methods
contains(point)Check if the point is inside the polygon.
extract_subregion(image)Apply the ROI to an image, returning a new image with the ROI applied.