EtienneCmb / visbrain

A multi-purpose GPU-accelerated open-source suite for brain data visualization
http://visbrain.org
Other
241 stars 64 forks source link

Using Macaque and its ROI #96

Closed ZhengL97 closed 3 years ago

ZhengL97 commented 3 years ago

Hi, I am trying to plot macaque's brain and its ROI with the data from [here].(https://scalablebrainatlas.incf.org/macaque/MERetal14) Also, the brain atlas exists in this example. This is my outcome. image The atlas is registered to F99, is this may be the cause of it?

ZhengL97 commented 3 years ago

Also, I've got some spiking data of some regions of the macaque brain, is it possible if I want to draw the activation of the ROI through time bynamically? Like an animation.

EtienneCmb commented 3 years ago

Hi @ZhengL97 , maybe you could checkout #95 to see if it helps

ZhengL97 commented 3 years ago

Hi, thank you for the response. Apart from the questions above, I' ve got this now. 图片 This is volumetric, what should I do if I only want the surface is colored, like this 图片 This is parcellation, but I want it only colored the roi I chosen. Is this available in visbrain?

EtienneCmb commented 3 years ago

Do you mean following the color scheme of the parcellation and setting one color per roi?

ZhengL97 commented 3 years ago

I mean choosing some specific regions to show colors, and the others stay white, but on the surface.

EtienneCmb commented 3 years ago

Did you checked this example? http://visbrain.org/auto_examples/objects/plot_brain_obj.html#parcellize-the-brain

ZhengL97 commented 3 years ago

Like the brain is not translucent, and show the colored ROI on the surface.

ZhengL97 commented 3 years ago

Oh, yes, but I cannot do this without the .annot file, right? For i just have the label and nii.gz file

EtienneCmb commented 3 years ago

Ah yes, true. Maybe you could try to create your .annot : https://nipy.org/nibabel/reference/nibabel.freesurfer.html#nibabel.freesurfer.io.write_annot

ZhengL97 commented 3 years ago

Thank you for your help!

ZhengL97 commented 3 years ago

Hi, sorry for bothering again. I was trying to create my own .annot file, what I have is a .x3d, a .nii.gz, and a json contains all the label and its color, the link is https://scalablebrainatlas.incf.org/macaque/FVE91_on_F99#downloads. As to the https://nipy.org/nibabel/reference/nibabel.freesurfer.html#nibabel.freesurfer.io.write_annot to create the .annot file, I've already have ctab and names. But how to set the variable labels, which means Annotation id at each vertex. How do I get this information? Thanks

EtienneCmb commented 3 years ago

Hi @ZhengL97 , if I understand correctly, the names should be the name of the brain region associated to each color in the ctab. You don't have the name of your brain regions?

ZhengL97 commented 3 years ago

I have names and ctab what I don't have is the Annotation id at each vertex, aka the variable labels

EtienneCmb commented 3 years ago

Ok. The labels should be an array of shape(n_vertices,) composed of integers where each digit specify the brain region the vertex belongs to. For example :

Labels     Names 
--------  ----------
0          Insula
0          Insula
0          Insula
1          VCcm
1          VCcm
1          VCcm
[continue for all vertices]

However, I don't know where you can find those informations since I don't know the parcellation your're using.

EtienneCmb commented 3 years ago

Wait, I've a suggestion, if you have the names associated to each vertex, then labels = np.unique(names, return_inverse=True)[1]?

ZhengL97 commented 3 years ago

The information I have is from https://scalablebrainatlas.incf.org/macaque/FVE91_on_F99#downloads, it's a macaque brain propoesd in 1991. The file we can get is T1(.nii.gz), a coronal_svg.zip, and a x3d file. It seems no information of the names associated to each vertex. I'll try to find it maybe somewhere in the Internet, but I am not confident aboout that.