open-discussion > Colors do not display correctly
May 8, 2020  02:05 PM | Chuanji Gao
Colors do not display correctly
Hi Chris,

I hope you are well.
I'm trying to display four different images with different colors on the brain.
However, I noticed the colors did not display as I specified.
The color of first image is correct, but the colors for the other three images switched for some reason.
For example, I specified image 3 color to be green, but the resulting image showed its color as blue.
I haven't figured why, I appreciate if you can help.
The code used is below:
I also attached the image I got.

import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')
gl.overlayloadsmooth(1)
#open overlay: show positive regions
gl.overlayload('C:\\Users\\CHUANJI\\Desktop\\SnPM_thresh1.nii')
gl.minmax(1, 0.01,0.1)
gl.colorname(1,'red')
gl.colorfromzero(1,1)
gl.overlayload('C:\\Users\\CHUANJI\\Desktop\\SnPM_thresh2.nii')
gl.minmax(2, 0.01,0.1)
gl.colorname(2,'hot')
gl.colorfromzero(2,1)
gl.overlayload('C:\\Users\\CHUANJI\\Desktop\\SnPM_thresh3.nii')
gl.minmax(3, 0.01,0.1)
gl.colorname(3,'green')
gl.colorfromzero(3,1)
gl.overlayload('C:\\Users\\CHUANJI\\Desktop\\SnPM_thresh4.nii')
gl.minmax(4, 0.01,0.1)
gl.colorname(4,'blue')
gl.colorfromzero(4,1)
#gl.hiddenbycutout(1,1)
#cutout (l, a, s, r, p, i: float) Selects a sector to remove from rendering view.
#gl.cutout(1,0.5,0.5,0.5,0,1)
gl.azimuthelevation(60,30)
gl.shadername('OverlaySurface')
gl.backcolor(255,255,255)
Attachment: mricrongl_color.jpg

Threaded View

TitleAuthorDate
Colors do not display correctly
Chuanji Gao May 8, 2020
Chris Rorden May 8, 2020
Chuanji Gao May 8, 2020