razvanmarinescu / brain-coloring

BrainPainter - Brain Visualisation Software
54 stars 17 forks source link

Adding custom atlases to local installation #26

Open alegiac95 opened 2 years ago

alegiac95 commented 2 years ago

Hi, In our lab we are really keen on using your toolbox to plot some data we have using some custom parcellations. We have created all the files (i.e., the .ply files) for all our parcellations and would like to know how we can edit your code to use our parcellations for plotting, if this is at all possible.

Thanks in advance.

razvanmarinescu commented 2 years ago

Hi,

Yes, definitely! You need to create a new dictionary in the config file - it can be the identity mapping (in this case the columns' names in the .csv file will have to be the same as the .ply names). The ply files will then be loaded automatically. But note that the .ply models cannot all be centered in the origina ... they will need to be translated and rotated in the correct positions so as to create a cohesive brain.

You can try to run the brainpainter script interactively in Blender, but you cannot do this from the website or through docker. You need to locally install blender and then run the python script interactively in Blender. This will allow you to have an interactive 3D viewer of the brain and to test that it works.

hajerkr commented 1 year ago

Hello @razvanmarinescu !

I am trying to do the same, using the Neuromorphometrics atlas, but I'm not sure how to get the .ply files. Is that something you can help with? It's a long shot but thought I would try anyway.

Thanks!

razvanmarinescu commented 1 year ago

@hajerkr you have to somehow convert your regions to .ply. There are some scripts and tools that can do that for various meshes, you'll have to search on google. @vmallela0 managed to convert segmentation masks to .ply, Vedu, how did you do it?

razvanmarinescu commented 1 year ago

I just googled and I found this repo It's a script that converts .obj to .ply. And .obj is a very generic, widely-used format. So you'll have to get your segmentation-masks/regions somehow to .obj format. You'll need a .obj for each region.