Closed mahirtazwar closed 1 year ago
import gl
gl.resetdefaults()
gl.loadimage('spm152')
gl.overlayload('spmMotor')
gl.minmax(1, -2, -7)
gl.opacity(1,100)
gl.colorname (1,"NIH")
gl.orthoviewmm(-37,-19,50)
import gl
gl.resetdefaults()
gl.loadimage('spm152')
gl.overlayload('spmMotor')
gl.minmax(1, 2, 9)
gl.colorname (1,"magma")
gl.opacity(1,100)
gl.overlayload('spmMotor')
gl.minmax(2, -2, -9)
gl.colorname (2,"mako")
gl.orthoviewmm(-37,-19,50)
Thank you for the detailed response. It looks like there is no command for "Hide Voxels with Zero Intensity", and the solution is to load the overlay twice and specify the minimum and maximum values using gl.minmax()
command while avoiding $0$ value. For example,
gl.minmax(1, -0.0001, -0.62)
gl.minmax(2, 0.0001, 0.03)
As for colormap, I am trying to use a modified version of HSV (without the cyclic component) color scale (CLUT given below for reference). I will check out the resources you've provided to see if my custom color scale can work.
[FLT]
min=0
max=0
[INT]
numnodes=6
[BYT]
nodeintensity0=0
nodeintensity1=51
nodeintensity2=85
nodeintensity3=128
nodeintensity4=204
nodeintensity5=255
[RGBA255]
nodergba0=255|0|0|0
nodergba1=255|255|0|14
nodergba2=0|255|0|28
nodergba3=0|255|255|43
nodergba4=0|0|255|57
nodergba5=255|0|255|71
I am trying to write a script to display a statistical map (with positive and negative values) over a template. The overlay has the colormap "NIH".
On the GUI, I can check the option "Hide Voxels with Zero Intensity" for the overlay, and it shows the positive and negative values like I wanted (as demonstrated below).
However, when trying to script to get the same outcome, I could not find the appropriate command for "Hide Voxels with Zero Intensity". The command
gl.overlaymaskwithbackground(1)
does not work (as shown below, zero in overlay = red color).Over at MRIcroGL10_OLD/COMMANDS.md, I found the command
gl.overlayhidezeros(1)
, which does not appear to work with the current version of MRIcroGL.Is there any command or way to hide the zero intensity voxels? As an alternative, I am using the command
gl.wait(5000)
to check the "Hide Voxels with Zero Intensity" option manually when the window pops up, and this solves my issue. But I would much rather automate the process with scripts. A segment of my script is given below for reference.