deepspatial.core.DeepSpatial.reconstruct_between_slices

deepspatial.core.DeepSpatial.reconstruct_between_slices#

DeepSpatial.reconstruct_between_slices(adata0: AnnData, adata1: AnnData, thickness: float, steps: int = 20, chunk_size: int = 2048, device: str = 'auto') AnnData[source]#

Generates a 3D volume segment between two specific AnnData slices.

Parameters:
  • adata0 – Source slice AnnData (must contain ‘spatial_norm’ and ‘z_norm’).

  • adata1 – Target slice AnnData (must contain ‘spatial_norm’ and ‘z_norm’).

  • steps – Number of integration steps for the ODE solver.

  • thickness – Physical distance (um) between generated cells, controlling density.

  • chunk_size – Batch size for ODE integration to manage VRAM usage.

  • device – Computing device (‘auto’, ‘cuda’, ‘cpu’, or specific ‘cuda:n’).

Returns:

An AnnData object containing the interpolated 3D segment in physical coordinates.