Index

Name

funcroi-config

Synopsis

funcroi-config [options] -roi roiconfig

Arguments

-roi roiconfig

Name of the configuration file. Eg, left-hippocampus. Later, data files will be named based on this file name. If ".roicfg" is the extension, the name of the roi will have this extension removed.

-force

Delete any existing roiconfig files

Define the Anatomical Label

-label labelname

-annot annotname labelname

(hemi.annotname.annot)

-seg segvol segid

-fillthresh fillthresh

Define the Functional Constraint

-analysis analysisname

Name of analysis configuration

-contrast contrastname

-thresh threshhold

-sign sign

abs, pos, neg

-map map

Default is sig

-frame frameno

Frame within contrast sig (default is 0)

Description

Configures a region-of-interest (ROI) based on subject-specific anatomical and, possibly, functional definitions. This does not perform the analysis; it only configures the parameters needed to define the ROI for later analysis with funcroi-sess and/or funcroi-table-sess. The output is a simple text file (the configuration).

Specifying the Anatomical Constraints

There are four possible ways to define the anatomical part of the ROI, two for surface-based analyses and two for volume based:

  1. Surface label (-label)
  2. Surface annotation (-annot)
  3. Volume label (also -label)
  4. Volume segmentation (-seg)

You must specify an analysis to use. The analysis (-analysis) space must match that of the anatomical ROI space. Ie, if the anatomical ROI is defined by a surface annotation, then the analysis must be a surface-based analysis. If the anatomical ROI is defined in the volume using a segmentation or a volume label, then the analysis must be volume-based (ie, mni305 or native).

The volume methods can be modified with the -fillthresh option, which is a number between 0 (the default) and 1. When mapping an anatomical volume ROI into the functional analysis space, there will be a difference in resolution (1mm for the anatomical and maybe 2mm for the analysis). This means that each analysis voxel may only be partially filled. The fill threshold indicates how full the analysis voxel must be in order for it to be considered part of the ROI. Eg, "-fillthresh 0.5" indicates that the analysis voxel must be at least half full. This will only make a difference on the edges of structures.

Note that these are subject-specific anatmomical ROIs even when you use fsaverage or mni305 as an analysis space because the subject-specific ROIs are mapped into these spaces (and so stay subject-specific).

Specifying the Functional Constraint

The functional constraint is specified through a contrast (-contrast) of the given analysis along with a threshhold (-thresh) and a sign (-sign). You can also change the map (default is sig) and the frame in the map (default is 0). The functional map is thresholed at the given level with the given sign to create a binary mask. This mask is then intersected with the anatmomical constraint to create the final ROI.

Examples

Example 1

Left Hemisphere Fusiform: Create analysis on fsaverage left hemisphere

mkanalysis-sess -analysis wm-sm5.lh -surface fsaverage lh
  -paradigm workmem.par -nconditions 5 -gammafit 2.25 1.25 
  -event-related -TR 2 -refeventdur 16  

Create two contrasts

mkcontrast-sess -an wm-sm5.lh -co encode    -a 1 -c 0
mkcontrast-sess -an wm-sm5.lh -co emot-neut -a 2 -c 3

Analyze

selxavg3-sess -sf sessidlist -analysis wm-sm5.lh

Define an ROI based on an anatomical-functional constraint based on the intersection of the left fusiform gyrus (defined in lh.aparc.annot) with the area postively activated above sig=2 in the encode contrast.

funcroi-config  -seg aparc fusiform \
  -analysis wm-sm5.lh -c encode -thresh 2 -sign pos \
  -roi lh.fusi+encode.th2.pos.roicfg 

This instantly creates the file lh.fusi+encode.th2.pos.roicfg Create this ROI in each subject

funcroi-sess -sf sessidlist -roi lh.fusi+encode.th2.pos.roicfg

This creates session/bold/wm-sm5.lh/lh.fusi+encode.th2.pos.nii. Note that the name is the name of the ROI configuration file without the ".roicfg" extension. This is a binary mask of the ROI which can be viewed with:

tksurfer fsaverage lh inflated -overlay lh.fusi+encode.th2.pos.nii -fthresh .5 

Now compute the mean contrast of the emot-neut contrast in this ROI.

funcroi-table-sess -roi lh.fusi+encode.th2.pos.roicfg
    -analysis wm-sm5.lh -contrast emot-neut 
    -o lh.fusi+encode.th2.pos.emot-neut.dat

This creates lh.fusi+encode.th2.pos.emot-neut.dat, which is a simple text file with two columns: (1) the session name, and (2) the emot-neut contrast (ces.nii) averaged inside of the lh.fusi+encode.th2.pos.nii mask. Note: if you do not run funcroi-sess above, it will be run automatically when you run funcroi-table-sess.

Now summarize the volume of this ROI.

funcroi-table-sess -roi lh.fusi+encode.th2.pos.roicfg
    -o lh.fusi+encode.th2.pos.volume.dat -vol

Example 2

Right Hippocampus: Create analysis on mni305

mkanalysis-sess -analysis wm-sm5.mni305 -mni305 2 
  -paradigm workmem.par -nconditions 5 -gammafit 2.25 1.25 
  -event-related -TR 2 -refeventdur 16  

Create two contrasts

mkcontrast-sess -an wm-sm5.mni305 -co encode   -a 1 -c 0
mkcontrast-sess -an wm-sm5.mni305 -co emot-neut -a 2 -c 3

Analyze

selxavg3-sess -sf sessidlist -analysis wm-sm5.mni305

Define an ROI based on an anatomical-functional constraint based on the intersection of the left right hippocampus (defined in aseg.mgz) with the area negatively activated above sig=2 in the encode contrast. Below, "53" is the index of right hippocampus in $FREESURFER_HOME/FreeSurferColorLUT.txt

funcroi-config -seg aseg.mgz 53 
  -analyisis wm-sm5.mni305 -c encode -thresh 2 -sign neg
  -roi right-hippo+encode.th2.neg.roicfg 

This instantly creates the file right-hippo+encode.th2.neg.roicfg. The next step will be to run funcroi-sess or funcroi-table-sess.

Bugs

None

Links

FsFast

Reporting Bugs

Report bugs to <analysis-bugs@nmr.mgh.harvard.edu>

funcroi-config (last edited 2017-12-19 12:42:44 by MorganFogarty)