brainbrowser icon indicating copy to clipboard operation
brainbrowser copied to clipboard

Add regions in surface viewer for freesurfer.asc

Open ram-pi opened this issue 11 years ago • 5 comments

There is any method to add labels at surface viewer loading freesurfer.asc? I' m try to use the surface viewer to select a region and take the label that should be compatible with these http://www.slicer.org/slicerWiki/index.php/Slicer3:Freesurfer_labels. Reading on the documentation I see that is possible to load a freesurfer asc, it will be very useful to have something like the atlas_label also for the this use case. @paulmougel

ram-pi avatar Aug 08 '14 10:08 ram-pi

Have you taken a look at the Brain Atlas sample in the Surface Viewer demo?

If you haven't, go to the demo, and click on Brain Atlas in the menu on the right. You can shift-click on the brain regions to get the labels.

Is that the kind of thing you're looking for?

tsherif avatar Aug 11 '14 12:08 tsherif

Yes i' m searching for the same thing but with the freesurfer labels. Such that from a vertex I can get the labels. In the demo you get the value from the pick_info and then you take the label right? It is my understanding that If I load the freesurfer asc in the surface viewer I won't be able to load the label starting from a vertex, am I correct? If i want to add this feature do I have to load another atlas and get the label from the new atlas?

ram-pi avatar Aug 11 '14 12:08 ram-pi

Would you be able to provide me with a sample of the kind of label data you want to load?

Right now, the MNI OBJ atlas loads the labels separately. An "intensity" file is loaded to demarcate different regions by assigning numbers to them, then these numbers have labels assigned to them based on a separate label file. Is this similar to how it works in Freesurfer or is everything kept in one file?

tsherif avatar Aug 13 '14 19:08 tsherif

The labels I should load are these http://www.slicer.org/slicerWiki/index.php/Slicer3:Freesurfer_labels. These are in a file called FreeSurferColorLUT which is part of the freesurfer application. Actually I' m getting the coordinates of the clicked point (or the vertex' s index) and then I' m trying to find a match with the label. Is it the right way to procede?

ram-pi avatar Aug 13 '14 19:08 ram-pi

Yes, that sounds right. Let me know if you can get it to work. We might need to write a parser for your label data.

Here's the code I used to load the labels. And this is the code that finds the label once a vertex is picked.

Also here are the two files used for the labelling: https://brainbrowser.cbrain.mcgill.ca/assets/aal_atlas.txt https://brainbrowser.cbrain.mcgill.ca/assets/aal_label.txt

tsherif avatar Aug 13 '14 19:08 tsherif