help > gl.overlayminmax invalid syntax
Showing 1-3 of 3 posts
Display:
Results per page:
Aug 19, 2020  11:08 PM | Andrew Sun
gl.overlayminmax invalid syntax
Hello,

I'm having issues with the gl.overlayminmax function. I'm using it as follows:


import gl
gl.resetdefaults()
gl.loadimage('MNI152')
gl.opacity(0,70)
gl.backcolor (0, 0, 0)
gl.overlayload('GM_Fix_Left_bin.nii.gz')
gl.colorname (1,"6bluegrn")
gl.overlayminmax(1,0 2)
gl.colorbarposition(0)
gl.opacity(0,70)


which is returning an invalid syntax error. Would appreciate any help on this.

Thanks,
Andrew
Aug 20, 2020  10:08 AM | Chris Rorden
RE: gl.overlayminmax invalid syntax
You want to use the function "minmax". You can see an example of a script that uses this by choosing the Scripting/Templates/basic menu item. You can see a list of all functions with comments regarding their usage by choosing the Scripting/Templates/help menu items. I would use the 'mni152' if you images are the shape of the MNI brain, and spm152 if SPM was used to warp images to the size of an average sized brain (which is smaller than the MNI template).


import gl
gl.resetdefaults()
gl.loadimage('mni152')
gl.opacity(0,70)
gl.backcolor (0, 0, 0)
gl.overlayload('spmMotor')
gl.colorname (1,"6bluegrn")
gl.minmax(1, 4, 4)
gl.colorbarposition(0)
gl.opacity(0,70)
Aug 20, 2020  04:08 PM | Andrew Sun
RE: gl.overlayminmax invalid syntax
Much appreciated, thanks Chris.