help > Applying AFNI stats file as overlay and range does not reflect f-stat values
Showing 1-2 of 2 posts
Display:
Results per page:
Feb 25, 2021  05:02 PM | igallagher
Applying AFNI stats file as overlay and range does not reflect f-stat values
Hi everyone!

I am running into an error with visualizing my 3dANOVA3 f-stat test in MRIcronGL. 

In AFNI, with setting p = 0.005 and a cluster threshold, 2 clusters are produced with peak f-stats of 9.63 and 9.75. 

I want to load my stats file (3dANOVA3.ples.psc.Diet_by_Food.UM.obese.15subjects.reward_mask+tlrc.HEAD) produced from AFNI with contrasts/sub-bricks.


Below is a brief script:

import gl
gl.resetdefaults()
gl.loadimage('TT_N27+tlrc')
#open overlay: show f-stat
gl.overlayload('/Users/#username/Desktop/CFRdata/New_CFR_files/3dANOVA3.ples.psc.Diet_by_Food.UM.obese.15subjects.reward_mask+tlrc.HEAD[Diet_Effect:F-stat]')
gl.minmax(1, 0, 10)

After the script is run, I want to use sub-brick 2/48 (the second in the file) called "Diet_Effect:F-stat" and I select this after the script is run. Then, the range goes from 0-10 to 0-0.0012. (Attached screenshot)

I have tw questions:
1. How do I indicate what sub-brick to select in the script?
2. Why does the min and max not display they values I see in AFNI?

Thank you so much for your help!
Mar 4, 2021  12:03 PM | Chris Rorden
RE: Applying AFNI stats file as overlay and range does not reflect f-stat values
You can choose the Scripting/Templates/help menu item to see available commands. I suspect that the volume function will select a specific 3D volume in a 3D series:

volume (built-in function):
volume(layer, vol) -> For 4D images, set displayed volume (layer 0 = background; volume 0 = first volume in layer).

As shown in your screenshot, loading an AFNI 4D statistical map will show a AFNI-specific pull down menu in the Layers panel. From the rendering, it is unclear whether you are just setting a very low threshold. Looking at the 2D slice views and clicking on the image might help. 

You can use the minmax script function to set the minimum and maximum value for intensities in the image. For example
  gl.minmax(1, 3, 4)
will adjust layer 1 so that the color gradient will go from 3 (darkest) to 4 (brightest).