Differences between revisions 9 and 10
Deletions are marked like this. Additions are marked like this.
Line 44: Line 44:
attachment:configure_overlay.tiff attachment:tksurfer-gr-configure.jpg

[wiki:FsTutorial top] | [wiki:FsTutorial/Visualization previous]

Visualizing and plotting

The statistical parametric maps used in this exercise have been pre-computed on both hemispheres and saved in different files. The example below demonstrates how to view the pre-computed result from the left hemisphere (lh) mapping. To view the right hemisphere (rh) result, replace lh with rh in the commands and file names below.

In this example, the statistical parametric map will be overlayed onto the average surface. To load the average surface into tksurfer, run the following commands:

cd $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs/group_analysis_tutorials
tksurfer average lh inflated

Tksurfer will display a dark grey inflated surface in its display window. Then load the lh map as an overlay: from the tools window, load in file lh.my_gender_age.glmdir/age/sig.mgh in the stats directory by selecting File -> Load Overlay. Check the button that says "Calculate Identity Matrix". The display window should look something like the image shown below. The surface and overlay can be viewed from different angles in the Display Window by clicking tksurfer's orientation icons.


Next, load FSGD file lh.my_gender_age.glmdir/y.fsgd in the same directory by selecting File -> Load Group Descriptor File. At first, an empty plot will be displayed in a separate window. To generate a plot for a particular vertex, select a point by clicking on the parametric map at that vertex and the plot window will be updated accordingly. Rolling the mouse over data points on the plot will display the corresponding subject ID. Take some time to plot and inspect results for different vertices, both in significant regions of the parametric map and elsewhere. The plot window should look something like the image below:


Thresholding and Setting the Color Scale

The parametric maps's colormap can also be configured for display by selecting View -> Configure -> Overlay. This action brings up a new GUI panel which displays a histogram of the overlay's values, and allows values for min, max, mid and slope to be set as shown below. Experiment with these settings to see how they affect the display.

When setting a color scale, you're basically interested in two things: the threshold (ie, the value below which the voxel will be transparent), and the saturation point (ie, the value beyond which the color will not change). In tkmedit/surfer, there is an extra degree of freedom which allows the color scale to be divided into two parts, each with a different rate of color change. This extra flexibility is more of a curse than a benefit as most people are only interested in having a uniform change in color across the color scale.There are three color scale parameters in tkmedit/tksurfer:

fthresh - the value below which no color is shown ("Min" in the control panel) fmid - the value at which the color gets to its midpoint ("Mid" in the control panel) fslope - the slope of the colorbar above fmid. The color ("Slope" in the control panel) The color scale will saturate at fmid + 1/fslope.

fthresh is the threshold mentioned above. To assure that the color scale will be uniform, set

fmid = (saturation + threshold)/2 fslope = 2/(saturation - threshold)

Note that this forces the slope between fthresh and fmid to be the same as between fmid and the saturation level.

The meaning of these thresholds depends upon the nature of the data you have loaded as the overlay. Eg, the map you are currently viewing is -log10(p), where p is the significance, so a threshold of 2 will display all vertices with p<.01.

attachment:tksurfer-gr-configure.jpg attachment:colorscale-explain-thresh-small.jpg

False Discovery Rate Thresholding

False Discovery Rate (FDR) is a method used to set the vertex-wise (or voxel-wise) threshold (ie, fthresh above) based on the risk of False Discovery that the user is willing to accept. The False Discover Rate is the number of vertices falsely declared active as a proportion of the number of TRULY ACTIVE vertices. Thresholding based on FDR is usually less consertative than False Positive Rate (FPR) methods such as Bonferroni correction. The Bonferroni FPR is the number of vertices falsely declared active as a proportion of the TOTAL number of vertices (active or not). The FDR threshold is based on the data and so can change from data set to data set. For more information on FDR see : Thresholding of Statistical Maps in Functional Neuroimaging Using the False Discovery Rate. Genovese, Lazar, Nichols. NeuroImage 15:870-878, 2002.

FDR is built directly into the tksurfer interface. To use it, choose your desired FDR, enter it into the the FDR entry box and hit "Set Threshold Using FDR". tksurfer will compute the threshold needed to realize this FDR. See how the Min threshold changes. Hit "Apply" to change the threshold applied to the map. Note: the values in the map MUST be -log10(p-value). This is the form of the output from mris_glm.

FsTutorial/VisualizingAndPlotting (last edited 2021-09-22 11:41:23 by DevaniCordero)