organoid_tracker.core.beacon_collection module
- class organoid_tracker.core.beacon_collection.BeaconCollection
Bases:
object
Ordered list of beacons per time point.
- add_beacons(beacons: BeaconCollection)
Adds all beacons from the given collection to this collection. Like for add(..), duplicate beacons are allowed.
- count_beacons_at_time_point(time_point: TimePoint) int
Gets the number of beacons at the given time point.
- find_closest_beacon(position: Position, resolution: ImageResolution) Optional[ClosestBeacon]
Finds the closest beacon at the same time point as the position. Returns None if there are no beacons at that time point.
- find_single_beacon() Optional[Position]
If there is only one beacon in the entire experiment, return it. Otherwise, it returns None.
- get_beacon_by_index(time_point: TimePoint, index: int) Optional[Position]
Gets the beacon with the given index at the given time point. Index 1 is the first beacon.
- get_next_index(time_point: TimePoint) int
Beacons have indices: 1, 2, 3, etc. for every time point. This method returns the index that the next beacon placed at the given time point will get.
- move(old_position: Position, new_position: Position) bool
Moves a beacon from its old to its new position. The old and new positions must have the same time point. Does nothing and returns False if there was no beacon at old_position. Returns True if successful.
- class organoid_tracker.core.beacon_collection.ClosestBeacon(search_position: Position, beacon_position: Position, beacon_index: int, distance_um: float, resolution: ImageResolution)
Bases:
object
Used to represent the distance towards, the identity and the position of the closest beacon.
- difference_um() Vector3
Gets the difference between the search position and the beacon position in micrometers.
- resolution: ImageResolution