Estimate location of brain sagittal or coronal slice

Hi All,

We are working with a spatial transcriptomics dataset (Xenium and/or CosMx) where we have several samples, say using a coronal brain slice. Some slices were taken at slightly different locations/angles than others, resulting in different cell type compositions (using MapMyCells) simply owing to the slice plane being different, rather than biology.
To account for this, we were wondering if it would be possible, given the cell type composition and their location, to estimate the plane we are currently looking at.

The ideal output could be, for example, a number for each sample. Assuming that 0 is the ‘center of the brain’, sample 1 could have a value of -0.5 as it is before the center (to the forebrain) while sample 2 could have a value of 0.8 as it is more located towards the hindbrain, for example. This does not account for the angle of the slice, but it seems like a start.

Ideally, we would have a framework that could work both for a coronal slice, but also for a sagittal slice.

Happy to hear what you think.
Thank you in advance.
Best wishes,
Koen