locan.data.transform.spatial_transformation.overlay#

locan.data.transform.spatial_transformation.overlay(locdatas, centers='centroid', orientations=None)[source]#

Translate locdatas to their common center and rotate according to their orientation.

Parameters:
  • locdatas (Iterable[LocData]) – Localization data to overlay.

  • centers (UnionType[Iterable[Any], str, None]) – centers to which locdatas are translated. Must have the same length as locdatas. One of centroid, ch, ‘bb’, ‘obb’, or ‘region’. If None, no translation is applied.

  • orientations (UnionType[Sequence[UnionType[int, float, str, None]], str, None]) – Orientation value to use in degree. Must have the same length as locdatas. If str, it must be one of orientation_im, orientation_obb. If None, no rotation is applied.

Returns:

Collection with transformed locdatas.

Return type:

LocData