process_contours¶
tiatoolbox.utils.misc.process_contours
- process_contours(contours, hierarchy, scale_factor=(1, 1), offset=None, properties=None)[source]¶
Process contours and hierarchy to create annotations.
- Parameters:
contours (list[np.ndarray]) – A list of contours.
hierarchy (list[np.ndarray]) – A list of hierarchy.
scale_factor (tuple[float, float]) – The scale factor to use when loading the annotations.
offset (np.ndarray | None) – Optional offset to be added to the coordinates of the annotations.
properties (dict | None) – Optional properties to include with each annotation type.
- Returns:
A list of annotations.
- Return type: