Source code for cilissa.roi

from dataclasses import dataclass
from typing import Tuple


@dataclass
[docs] class ROI:
[docs] x0: int
[docs] y0: int
[docs] x1: int
[docs] y1: int
@property
[docs] def start_point(self) -> Tuple[int, int]: return (self.x0, self.y0)
@property
[docs] def end_point(self) -> Tuple[int, int]: return (self.x1, self.y1)
@property
[docs] def slices(self) -> Tuple[slice, slice]: return (slice(self.y0, self.y1), slice(self.x0, self.x1))