organoid_tracker.core.link_data module
- class organoid_tracker.core.link_data.LinkData(forward: Links)
Bases:
objectAll link metadata used to be stored in this class. Now it is stored directly in Links, so you can access it using experiment.links (instead of experiment.link_data). This class only exists for backwards compatibility, and acts as a thin wrapper of the Links class.
- copy() LinkData
Creates a copy of this linking dataset. Changes to the copy will not affect this object, and vice versa.
- find_all_data_of_link(position1: Position, position2: Position) Iterable[Tuple[str, Union[float, int, str, bool, List[float], List[int], List[str], List[bool]]]]
Finds all data associated with the given link. Raises ValueError if the two positions are not in consecutive time points.
- find_all_links_with_data(data_name: str) ItemsView[Tuple[Position, Position], Union[float, int, str, bool, List[float], List[int], List[str], List[bool]]]
Gets a dictionary of all positions with the given data marker. Do not modify the returned dictionary.
- get_link_data(position1: Position, position2: Position, data_name: str) Optional[Union[float, int, str, bool, List[float], List[int], List[str], List[bool]]]
Gets the attribute of the link with the given name. Returns None if not found. Raises ValueError if the two positions are not in consecutive time points.
- replace_link(position_old1: Position, position_old2: Position, position_new1: Position, position_new2: Position)
Replaces a link, for example if the position moved. Raises ValueError if any of the two links are not between consecutive time points. Raises ValueError if the time points of the links are changed.
- set_link_data(position1: Position, position2: Position, data_name: str, value: Optional[Union[float, int, str, bool, List[float], List[int], List[str], List[bool]]])
Adds or overwrites the given attribute for the given position. Set value to None to delete the attribute. Raises ValueError if the two positions are not in consecutive time points.