organoid_tracker.core.marker module

class organoid_tracker.core.marker.Marker(applies_to: Iterable[Type], save_name: str, display_name: str, color: Tuple[int, int, int], **extra_data)

Bases: object

Used to represent the type of a position, crypt axis or something else. So does this position represent a biological cell? And of which type? Does an axis represent a crypt-villus axis?

applies_to(type: Type) bool

Gets whether this position type can be applied to the

property color: Color

Gets the color used to mark positions of this type.

property display_name: str

Gets a name used solely for display purposes.

extra(key: str) Optional[Any]

Gets some extra data that was passsed to the constructor.

property mpl_color: Tuple[float, float, float]

Gets the color used to mark positions of this type. Color is suitable for use in Matplotlib.

property save_name: str

Gets the name used to save the type. Will always be uppercase.

organoid_tracker.core.marker.draw_marker_2d(x: float, y: float, dz: int, dt: int, area: Axes, color: Union[Tuple[float, float, float], Tuple[float, float, float, float], str, float], edge_color: Union[Tuple[float, float, float], Tuple[float, float, float, float], str, float])

The default (point) representation of a shape. Implementation can fall back on this if they want.