Closed adamltyson closed 3 weeks ago
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/allen-spinal-cord-atlas-is-off-axis/99539/2
Currently, the left/right split is done by calculating the center_of_mass
in for the root mesh in brainrender
and taking that as the midpoint. Not sure why that's the case for this specific atlas. As far as I can tell it's symmetric.
For some reason the center_of_mass
doesn't align with the geometric? center. I can correct this by just taking the centre of the mesh bounds for the root mesh. That fixes this issue for the spinal cord atlas, and doesn't change the functionality for most of the other atlases.
However, this breaks this functionality for the mpin_zfish_1um
atlas.
Left hemisphere:
Right hemisphere:
I noticed that the mpin-zfish_1um
atlas is one of the only one that has a hemispheres.tiff
. Is that because the hemispheres aren't symmetrical?
Not sure how to proceed, one idea I had was to take the geometric center for atlases that are marked as symmetric and rely on the hemispheres
property for the asymmetric atlases.
I noticed that the mpin-zfish_1um atlas is one of the only one that has a hemispheres.tiff. Is that because the hemispheres aren't symmetrical?
Yep, if they're symmetrical we programmatically generate the hemisphere image, otherwise it's packaged along with the atlas. TBH I don't know if that's correct for this atlas though.
This specific issue has been closed by https://github.com/brainglobe/brainrender/pull/375, and these issues have been raised to fix specific atlases:
This image.sc issue led me to do some digging, and it looks like:
However, the meshes don't seem be centered. I'm not 100% sure what that means TBH, as I don't know exactly what the coordinate system is that they're in. However, when the meshes are cut down the midline by vedo (via brainrender), you don't get exactly half. To reproduce:
Gives:![Screenshot 2024-07-24 at 10 21 04](https://github.com/user-attachments/assets/69144ba1-b996-451f-9af5-12eadfb105b8)
This then seems to cause the downstream issues in
brainrender-heatmap
. Not sure if other atlas have this issue.