help > Problem with overlapping color for overlay
Showing 1-2 of 2 posts
Display:
Results per page:
Jan 29, 2019  11:01 PM | Chuanji Gao
Problem with overlapping color for overlay
Hi Chris,
I had a problem of the overlapping color when I overlay two images.
When I run in one circumstance, the overlay color is yellow. The code I used is below:
BEGIN
RESETDEFAULTS;
MESHLOAD('BrainMesh_ICBM152_smoothed.mz3');
OVERLAYLOAD('.\Figure 3\rightPSTG_ALE_pN001.nii');
OVERLAYCOLORNAME(1, 'Winter');
OVERLAYMINMAX(1, 0.04, 0.08);
OVERLAYLOAD('.\Figure 3\meta_map_rightPSTGfinal.nii');
OVERLAYCOLORNAME(2, 'Red');
OVERLAYADDITIVE(true);
SHADERNAME('Minimal');
OVERLAYTRANSPARENCYONBACKGROUND(50);
SHADERXRAY(1, 0.3);
END.

However, when I tried to overlay another two images, the overlapping region color changed to purple.
The code I used is exactly the same as above but different files.
BEGIN
RESETDEFAULTS;
MESHLOAD('BrainMesh_ICBM152_smoothed.mz3');
OVERLAYLOAD('.\3_figure\Figure 3\leftASTG_ALE_pN001.nii');
OVERLAYCOLORNAME(1, 'Winter');
OVERLAYMINMAX(1, 0.06, 0.12);
OVERLAYLOAD('.\Figure 3\meta_map_leftASTGfinal.nii');
OVERLAYCOLORNAME(2, 'Red');
OVERLAYADDITIVE(true);
SHADERNAME('Minimal');
OVERLAYTRANSPARENCYONBACKGROUND(50);
SHADERXRAY(1, 0.3);
END.

I'm wondering if there are some way to control the color of overlapping?
Thanks,
Jan 31, 2019  02:01 AM | Chris Rorden
RE: Problem with overlapping color for overlay
Hi Chuanji,

The colors are additive, so the yellow regions are highlighting areas that are in both of your open overlays. The "rightSTG" has a center in the right hemisphere superior temporal gyrus, so that is where you see an overlap between the two overlays. The "leftASTG" has a center in the left anterior portion of the superior temporal gyrus, so that is where you see both overlays at the same time. I would tend to use "Green" and "Red" as your overlays, so the combination is pure "YELLOW" - the winter overlay has a broader spectrum of colors. I would also consider using a binary threshold for the anatomical overlays. If I were scripting these I would write:

Both regions overlap in right STG:

BEGIN
RESETDEFAULTS;
MESHLOAD('BrainMesh_ICBM152_smoothed.mz3');
OVERLAYLOAD('rightPSTG_ALE_pN001.nii');
OVERLAYCOLORNAME(1, 'Green');
OVERLAYMINMAX(1, 0.04, 0.04);
OVERLAYLOAD('meta_map_rightPSTGfinal.nii');
OVERLAYCOLORNAME(2, 'Red');
OVERLAYMINMAX(2, 0.06, 0.06);
OVERLAYADDITIVE(true);
SHADERNAME('Minimal');
OVERLAYTRANSPARENCYONBACKGROUND(50);
SHADERXRAY(1, 0.3);
END.

Both regions overlap in left temporal pole:

BEGIN
RESETDEFAULTS;
MESHLOAD('BrainMesh_ICBM152_smoothed.mz3');
OVERLAYLOAD('leftASTG_ALE_pN001.nii');
OVERLAYCOLORNAME(1, 'Green');
OVERLAYMINMAX(1, 0.06, 0.06);
OVERLAYLOAD('meta_map_leftASTGfinal.nii');
OVERLAYCOLORNAME(2, 'Red');
OVERLAYMINMAX(2, 0.06, 0.06);
OVERLAYADDITIVE(true);
SHADERNAME('Minimal');
OVERLAYTRANSPARENCYONBACKGROUND(50);
SHADERXRAY(1, 0.3);
END.