organoid_tracker.core.beacon_collection module
- class organoid_tracker.core.beacon_collection.Beacon(position: Position, beacon_type: Optional[str])
Bases:
NamedTuple
A beacon is a named point in space.
- class organoid_tracker.core.beacon_collection.BeaconCollection
Bases:
object
Ordered list of beacons per time point.
- add(position: Position, beacon_type: Optional[str] = None)
Adds a new beacon. If there is already a beacon at the given position, it is overwritten.
- add_beacons(beacons: BeaconCollection)
Adds all beacons from the given collection to this collection.
- 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.
- find_single_beacon_of_time_point(time_point: TimePoint) Optional[Position]
If there is only one beacon in the given time point, return it. Otherwise, it returns None.
- get_beacon_type(beacon_position: Position) Optional[str]
Gets the name of the beacon at the given position.
- 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.
- of_time_point_with_type(time_point: TimePoint) Iterable[Beacon]
Gets all beacons at the given time point, including their beacon types.
- remove(position: Position) bool
Removes the beacon at the given position. Returns True if succesful, returns False if there was no beacon at that position.
- class organoid_tracker.core.beacon_collection.ClosestBeacon(search_position: Position, beacon_position: Position, beacon_type: Optional[str], 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