LineOfInterest#

class movement.roi.line.LineOfInterest(points, loop=False, name=None)[source]#

Bases: BaseRegionOfInterest

Representation of boundaries or other lines of interest.

This class can be used to represent boundaries or other internal divisions of the area in which the experimental data was gathered. These might include segments of a wall that are removed partway through a behavioural study, or coloured marking on the floor of the experimental enclosure that have some significance. Instances of this class also constitute the boundary of two-dimensional regions (polygons) of interest.

An instance of this class can be used to represent these “one dimensional regions” (lines of interest, LoIs) in an analysis. The basic usage is to construct an instance of this class by passing in a list of points, which will then be joined (in sequence) by straight lines between consecutive pairs of points, to form the LoI that is to be studied.

property coords: CoordinateSequence#

Coordinates of the points that define the region.

These are the points passed to the constructor argument points.

Note that for Polygonal regions, these are the coordinates of the exterior boundary, interior boundaries must be accessed via self.region.interior.coords.

property dimensions: int#

Dimensionality of the region.

property is_closed: bool#

Return True if the region is closed.

A closed region is either: - A polygon (2D RoI). - A 1D LoI whose final point connects back to its first.

property name: str#

Name of the instance.

property region: LinearRing | LineString | Polygon#

shapely.Geometry representation of the region.