open-discussion > MRIcroGL - make a symmetric scale centered on 0
Showing 1-3 of 3 posts
Display:
Results per page:
Dec 10, 2021  01:12 PM | bcecconi - Center for sleep and consciousness
MRIcroGL - make a symmetric scale centered on 0
Hello,
I'm using MRIcroGL and I would like to center my scale on 0, so that I have e.g. -0.005 0 0.005. I saw that there is an option to make it starts from 0 but I don't see how to put 0 "in the middle", let's say...
If anyone could help me and explain me how to do it I would greatly appreciate it :)
Thanks in adv,
Benedetta
Dec 10, 2021  02:12 PM | Chris Rorden
RE: MRIcroGL - make a symmetric scale centered on 0
Just make the min and max brightness symmetrical around zero. For example, in the script below the range for the overlay is -4..4. Note that for most statistical measures values near zero are very noisy. Therefore, it is often a good idea to load a two-tailed statistical map twice, once with a threshold for positive voxels and the second time with a threshold for the negative values. For an example of this approach, see the "Scripting/Templates/Basic" demo. 

import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, -4, 4)
gl.colorname(1,'magma')
gl.opacity(1,50)
gl.orthoviewmm(0,0,0)
Dec 10, 2021  03:12 PM | bcecconi - Center for sleep and consciousness
RE: MRIcroGL - make a symmetric scale centered on 0
Thank you so much for your answer! 
:)