RectangularROI

class caqtus.types.image.roi.RectangularROI(
original_image_size: tuple[Width, Height],
x: int,
width: int,
y: int,
height: int,
)

Bases: ROI

Rectangular region of interest inside an image.

x

Horizontal coordinate of the left column of the roi, in pixels.

Type:

int

width

Number of columns in the roi.

Type:

int

y

Vertical coordinate of the bottom row of the roi, in pixels.

Type:

int

height

Number of rows in the roi.

Type:

int

get_mask() ndarray

A boolean array with the same shape as the original image.

True values indicate that the pixel is part of the region of interest.

get_indices() tuple[Iterable[int], Iterable[int]]

Return the pixels in the original image that are part of the ROI.

property left: int

Return the left column (included) of the roi.

property right: int

Return the right column (included) of the roi.

property bottom: int

Return the bottom row (included) of the roi.

property top: int

Return the top row (included) of the roi.