razvanmarinescu / brain-coloring

BrainPainter - Brain Visualisation Software
55 stars 17 forks source link

Add mouse brain atlas #25

Open araikes opened 2 years ago

araikes commented 2 years ago

Hi @vmallela0,

How hard would it be to add a mouse brain atlas? Specifically, I'm thinking about the Dorr and DSURQE atlases (https://wiki.mouseimaging.ca/display/MICePub/Mouse+Brain+Atlases)

Let me know what you think.

araikes commented 2 years ago

Bump for visibility @vmallela0 or @razvanmarinescu

vmallela0 commented 2 years ago

sorry for the late reply @araikes. if the mouse atlas comes in .ply (or a similar format) files, it wouldn't be difficult at all but if we need to run segmentation on a nifti mouse atlas, it's going to be extremely difficult since softwares like free surfer don't have the capabilities to segment mice brains.

araikes commented 2 years ago

So a massive challenge :D

Understood. Thanks.

razvanmarinescu commented 2 years ago

@araikes, actually I think it's possible, cause you can just manually segment one scan only. Those segmentations can then be used to create those ply objects for blender.

If you, or a labmate/collaborator, can create that segmentation, that is enough. And it has to follow those atlases. Also, can you check if they provide a segmentation template? Most studies generally do.

araikes commented 2 years ago

@razvanmarinescu,

I have a NIFTI template image and a multi-label atlas image. Are you suggesting that this is feasible if I simply break apart the atlas into individual segmentations and use the template?

razvanmarinescu commented 2 years ago

@araikes yes, exactly. you only need the segmentation files (don't need the original NIFTI). You just need to break the multi-label segmentation apart into individual segmentations, then convert each of them to the .ply format, which is a polygon mesh format. @vmallela0 how did you convert the voxelized segmentations to the ply format?

araikes commented 2 years ago

@razvanmarinescu,

Does it need to be in Allen Brain space (the one for the existing mouse brain painter) or does it just create the brain out of the parcellations colored to whatever the background color is and then add the color for those that aren't background?

razvanmarinescu commented 2 years ago

it doesn't need to be in Allen Brain space. But the 3D models for each ROI cannot be centered all in the origin, they need to be placed in the right location, so as to create a coherent brain.

razvanmarinescu commented 2 years ago

But with those atlases you mentioned, you might get them already translated & rotated, so you might not need to do anything special on that

araikes commented 2 years ago

It'll definitely create a coherent brain just using the labeled ROIs.

@vmallela0, pinging you once more for input... Only because I'm trying to get this done this week for a progress report that would benefit from the really good images from brainpainter.

vmallela0 commented 2 years ago

@araikes when I transformed the ply files from the allen atlas I manually fit them together in order to make the full brain through the blender software. when you segment your atlas, though, you might need to scale it to fit into the BrainPainter renderer. I can assist with the scaling if you can send me the ply files

araikes commented 2 years ago

@vmallela0, so contrary to @razvanmarinescu's comment, you didn't convert voxelized segmentations to PLYs?

vmallela0 commented 2 years ago

@araikes when we did the mice brain atlas, we retrieved the already converted voxelized segmentations from the allen institute and ran transformations on them in order to be compatible with the brainpainter software

araikes commented 2 years ago

Ok @vmallela0,

I think I have this done and it ended up being much easier than I thought (though I'm not sure if the level of smoothness in the meshes will work). I used ITK Snap to export the segmentation to individual meshes in STL format. I then used Blender to convert the STL files to PLYs.

I opened all of the PLY files together in Blender and they appear to converge to form a mouse brain. I have two different atlases that I'd like to be able to use (different levels of granularity) and each has the associated PLY files. How can I send them to you?

vmallela0 commented 2 years ago

perfect! you can send them to me at vmallela@csail.mit.edu. I'll get those up to brainpainter asap and i'll ping you here once they're uploaded on the software. Thanks!

araikes commented 2 years ago

Sure thing. I'm working on renaming the files for intuitive use but I'll send you a .gz file when I'm done.

vmallela0 commented 2 years ago

that'd be perfect. Thank you

araikes commented 2 years ago

Added you to a Box folder. GZ files are too big to email.

I am double-checking with the Mouse Imaging Center (https://wiki.mouseimaging.ca/display/MICePub/Welcome+to+the+Mouse+Imaging+Centre) to make sure there is no license issue with adding these meshes to BrainPainter. I can't imagine that there'd be an issue but I'm confirming nonetheless.

vmallela0 commented 2 years ago

got it! thanks. I'll try to get some of this done by tonight.

araikes commented 2 years ago

Quick update: I have confirmation from two sources that both the Dorr 2008 and DSURQE atlas can be included without licensing issues as long as appropriate citation for the atlases is made by the end users.