help > Project stats map on top of other overlays; change opacity and order of overlays individually
Showing 1-2 of 2 posts
Display:
Results per page:
Jul 29, 2019  11:07 AM | Jurjen Heij
Project stats map on top of other overlays; change opacity and order of overlays individually
Dear experts,

I have several masks of different regions (binarized masks created with the JHU atlas in FSL) on top of which I'd like to project my statistical map. I would like the maps to be translucent, without affecting the statistical map. So, the statistical map should still have 0 opacity, while the masks underneath are translucent. 

I tried the following script:

BEGIN
RESETDEFAULTS;
MESHLOAD('BrainMesh_ICBM152_smoothed.mz3');
SHADERLIGHTAZIMUTHELEVATION(1, 25);
SHADERXRAY(1, 0.3);

OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\atlas_masks\bin.thr.INS_LR.nii.gz');
OVERLAYCOLORNAME(1, 'Bronze-Gold')
OVERLAYTRANSLUCENT(1, true);
OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\atlas_masks\bin.thr.ACC_LR.nii.gz');
OVERLAYCOLORNAME(2, 'Violet [r+b]')
OVERLAYTRANSLUCENT(2, true);
OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\atlas_masks\bin.thr.S1_BA2_LR.nii.gz');
OVERLAYCOLORNAME(3, 'Cyan [g+b]')
OVERLAYTRANSLUCENT(3, true);
OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\atlas_masks\bin.thr.S2_OP1_LR.nii.gz');
OVERLAYCOLORNAME(4, 'Blue-Green')
OVERLAYTRANSLUCENT(4, true);
OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\atlas_masks\bin.thr.Tha_LR.nii.gz');
OVERLAYCOLORNAME(5, 'Blue')
OVERLAYTRANSLUCENT(5, true);
OVERLAYLOAD('D:\FSL\shared\Studies\pipeline_data\H1c\bold\processing\2ndLevelFeat\Group.gfeat\cope1.feat\thresh_zstat1.nii.gz');
OVERLAYCOLORNAME(6, 'Red-Yellow')
OVERLAYMINMAX(6, 3.1, 5);

COLORBARVISIBLE(false);
OVERLAYTRANSPARENCYONBACKGROUND(0);

END.

This gives me almost what I want, but the overlapping regions between statistical map and masks are still blurred into each other. 

Is it possible to put the masks in the background in a way that the statistical map has it's native color coding, and not that the color of the mask is mixing with the statistical map? 

Thanks in advance and I hope to hear from you soon.

Kind regards,

Jurjen Heij
Aug 2, 2019  01:08 PM | Chris Rorden
RE: Project stats map on top of other overlays; change opacity and order of overlays individually
You can not get the result you desire with the Surfice surface painting. It is attempting to reveal how different regions overlap. What I would suggest you do is use the Advanced/ConvertVoxelwiseVolumeToMesh option to convert your thresholded statistics to a mesh. This can then be shown as a separate volume floating above the surface of the cortex.

import gl
gl.resetdefaults()
#opacity adjusts whether overlays are translucent (0)
opacity = 30
pth = '/Users/rorden/Downloads/sf/'
gl.azimuthelevation(70, 15)
gl.meshload('BrainMesh_ICBM152_smoothed.mz3')
gl.overlayload(pth+'bin.thr.ACC_LR.nii.gz')
gl.overlaycolorname(1, 'Violet [r+b]')
gl.overlayminmax(1,0.5,0.5)
gl.overlayopacity(1, opacity)
gl.overlayload(pth+'bin.thr.S2_OP1_LR.nii.gz')
gl.overlaycolorname(2, 'Violet [r+b]')
gl.overlayminmax(2,0.5,0.5)
gl.overlayopacity(2, opacity)
gl.overlayload(pth+'bin.thr.INS_LR.nii.gz')
gl.overlaycolorname(3, 'Bronze-Gold')
gl.overlayminmax(3,0.5,0.5)
gl.overlayopacity(3, opacity)
gl.overlayload(pth+'bin.thr.Tha_LR.nii.gz')
gl.overlaycolorname(4, 'Blue')
gl.overlayminmax(4,0.5,0.5)
gl.overlayopacity(4, opacity)
gl.overlayload(pth+'bin.thr.S1_BA2_LR.nii.gz')
gl.overlaycolorname(5, 'Cyan [g+b]')
gl.overlayminmax(5,0.5,0.5)
gl.overlayopacity(5, opacity)
gl.overlayload(pth+'thresh_zstat1_2.mz3')
gl.overlaycolorname(6, 'Red')
gl.meshcurv()
Attachment: img3.jpg