paste3.visualization.stack_slices_center
- paste3.visualization.stack_slices_center(center_slice, slices, pis)[source]
Align spatial coordinates of a list of slices to a center_slice.
In other words, align:
slices[0] --> center_slice
slices[1] --> center_slice
slices[2] --> center_slice
...
- Parameters:
center_slice (
AnnData
) -- Inferred center slice.slices (
list
[AnnData
]) -- List of original slices to be aligned.pis (
list
[ndarray
]) -- List of pi (center_align()
output) between center_slice and slices.output_params -- If
True
, additionally return angles of rotation (theta) and translations for each slice.matrix -- If
True
and output_params is alsoTrue
, the rotation is return as a matrix instead of an angle for each slice.
- Return type:
tuple
[AnnData
,list
[AnnData
],Optional
[list
[float
]],Optional
[list
[ndarray
]]]- Returns:
Center slice with aligned spatial coordinates.
List of other slices with aligned spatial coordinates.
If
output_params = True
, additionally return:List of angles of rotation (theta) for each slice.
List of translations [x_translation, y_translation] for each slice.