Displaying FreeSurfer aparc.a2009s+aseg atlas with correct colors
Posted: Tue Oct 23, 2018 6:44 pm
Hello
I'm trying to display the FreeSurfer Destrieux atlas (aparc.a2009s+aseg.mgz) in Anatomist, with appropriate colors:
https://surfer.nmr.mgh.harvard.edu/fswi ... erColorLUT
The voxel values in this atlas go from 0 to 14175.
To display the atlas correctly in anatomist windows, I read the FreeSurferColorLUT.txt file into a palette with 14176 RGB values (list with 42528 elements with [0,0,0] for all the undefined values), and assigned it to the volume using the following code:
After that, the colors in the volume are incorrectly set. In the anatomist window, I right-click on my FreeSurfer volume object > Color > Palette.
My palette is visible in the list and selected, min=0, max=12175, bounds=[0,12175]
Why 12175 instead of 14176?
What am I doing wrong?
Is there a more straightforward way to color correctly this FreeSurfer aparc.a2009s+aseg atlas?
Thanks
Francois
I'm trying to display the FreeSurfer Destrieux atlas (aparc.a2009s+aseg.mgz) in Anatomist, with appropriate colors:
https://surfer.nmr.mgh.harvard.edu/fswi ... erColorLUT
The voxel values in this atlas go from 0 to 14175.
To display the atlas correctly in anatomist windows, I read the FreeSurferColorLUT.txt file into a palette with 14176 RGB values (list with 42528 elements with [0,0,0] for all the undefined values), and assigned it to the volume using the following code:
Code: Select all
customPalette = a.createPalette("FreeSurferDestrieux")
customPalette.setColors(colors=colors, color_mode='RGB')
obj.setPalette(customPalette, minVal=0, maxVal=1)
My palette is visible in the list and selected, min=0, max=12175, bounds=[0,12175]
Why 12175 instead of 14176?
What am I doing wrong?
Is there a more straightforward way to color correctly this FreeSurfer aparc.a2009s+aseg atlas?
Thanks
Francois