Next: 4 D. Multi Subject/Multi Up: 3 C. Functional MRI Previous: 3 C. Functional MRI Contents
Subsections
- 13.1 Introduction
- 13.2 The fMRI Tool User Interface
13. The Single Subject fMRI Tool
13.1 Introduction
The Single Subject fMRI Tool can be used to analyze fMRI data using the General Linear Model [38]. It has a user friendly graphical interface for defining the study (e.g. image filenames, tasks, blocks etc) and the ability to either (i) perform the GLM computations internally or (ii) to create a shell script file that can be used to perform those computations in AFNI [3]. The internal computation and AFNI-based results agree to a few decimal points, however some users may prefer to use BioImage Suite to create the scripts and then use additional options in AFNI as they see fit.
13.2 The fMRI Tool User Interface
The interface has 5 tabs: ``Study Definition'', ``Anatomical Data'', ``Session Information'', ``Single Subject GLM'' and ``AGNI GLM''. It can be accessed either as a standalone application from the main BioImage Suite menu under the fMRI tab (in which case it has a viewer in a sixth tab) or as part of the BrainRegister application.
The ``File'' menu has choices is designed to load/save setup files, as well as to import setup files from an older fMRI Processing package in use at Yale ([98].
NOTE: the New/Load options clear all current parameters, and then loads the new project. Be sure to save all work before loading or clicking the ``New'' button.
The ``Tools'' menu is designed to make changes to the entire project. It has a single option - ``Replace..'' - which brings up a dialogue which allows the user to search and replace a specified string in all parameters in the current fMRI Tool project. The user types text into the search field and specifies what to replace with. The two strings do not have to be the same length. ``Replace!'' prompts the user with what it is going to do, and then proceeds to replace the string.
The ``Help'' menu has one option which gives information about the XML Generator and BioImage Suite.
13.2.1 The Study Definition Tab
The Study Definition tab has inputs for the file header and reference brain.
![]()
![]() |
13.2.1.0.1 Study Title:
distinguishing title of the current study. This is a completely text input and there are no restrictions stopping the user from inputing irrelevant information. The information input into such text dialogues in throughout the fMRI Tool are simply written to the setup file without any processing.
13.2.1.0.2 Subject ID:
non-identifying subject identification. All inputs are values here
13.2.1.0.3 Reference Brain:
brain for common space and comparison to other patients. The user can specify a reference brain one of two ways: either by clicking the down arrow or by browsing using the ellipses button. In the former case, the name of the corresponding reference brain is for display purposes. The file path is automatically generated using the pre-set paths in BioImage Suite. If the user browses for the reference brain manually using the ellipses button, the filename is displayed in the dialogue. Once the reference brain is identified, the user can then choose to view the current image in the selection by pressing the ``View'' button. A high resolution reference brain that can be used is the MNI-T1 1mm template (``Colin Brain''[44].) It has better resolution than the MNI-305 or ICBM-152 templates which allows for better non-linear registrations.
13.2.2 The Anatomical Data Tab
![]() |
The anatomical data tab has input fields for five images and transforms necessary for fMRI processing. Each input is selected using the ellipses button to browse. The image load function is pre-filtered to look for ``.hdr''/``.nii.gz'' files, while the transformations are pre-filtered for ``.matr'' and ``.grd'' files. The images can also be viewed using the ``view'' button. If the image is identified and the user selects to view the image, it is then sent to the Viewer tab. Note that in this tab, the fields are disabled and the only way to select the appropriate file is by browsing for it. Also, although only the filenames are displayed, the entire filepath is saved when the setup file is saved.
Definitions:
- Conventional Image - the anatomical image acquired with the same slice-specification as the underlying fMRI study.
- Anatomical Image - high resolution 3D image of the whole brain.
- Reference Transform - maps the Reference/Template Brain to 3D Individual Anatomical Image. This is a non-linear registration that performs inter-brain warping.
- Internal Transform - maps the 3D Individual Anatomical Image to the ``2D'' Conventional Image. This is a rigid (linear) transformation which accounts for the differences in position and orientation between the two scans.
- Distortion Transform - maps the ``2D'' Conventional Image to the Functional/Echoplanar Image. This aims to capture the distortion in the echoplanar acquisitions used for fMRI
13.2.3 Session Information Tab
13.2.3.0.1 Top Half: General Session Information
The session information tab contains fields for seven session specific parameters in the upper part of the window. These include the session ID, description, repetition time, number of slices, number of frames, a global flag as to whether all block definitions are in seconds or frames and a global skip frames which applies to all runs. These fields are text fields in which the user is free to type in any information desired. If the skip frames checkbox is not checked, the field is disabled and this information will not be used when performing the analysis.
13.2.3.0.2 Bottom Half: Task and Run Information
The user needs to specify task names (descriptions) and runs. The two list windows are similar except that the run image files can be viewed. To add a task, the user presses the ``New Task'' button to bring up a separate window. The task window contains an entry field that is open to all text. Once the user specifies the task name, and presses ``Add Task'', the task is appended to the list with its identifying number, i.e. task 1 is labeled T1, and the user entered task identifier is listed. Double clicking on the task brings up the same task window and the task name can be changed. A task can be edited using the ``Edit Task'' button and can be deleted by clicking once on the desired task to highlight it and pressing the ``Delete Task'' button. If this happens the tasks are re-numbered to reflect the change.The functions of the ``Define Runs'' list window are similar. The ``New'' button brings up a frame to define a new run. Here, browse for a filename to specify it in the entry field. If skip frames is desired within that run, check the box and list the frames to be skipped. Once this is all completed, press the ``Add Run'' button in the window. Double clicking on a run allows the user to change the run specifications, highlighting the run and pressing ``Delete'' deletes the run, highlighting and pressing ``View'' sends the image file to the viewer. The ``Add Run'' and ``Edit Run'' dialog boxes are shown in Figure 13.6.
Definitions:
- Session ID - Name of session for subject (not currently used)
- Session Description - Description of session for subject (not currently used)
- Repetition Time - Repetition Time of the Functional/Echoplanar trials in seconds
- Number of Slices - Number of Slices of the Functional/Echoplanar images
- Number of Frames - Number of Images per slice of the Functional/Echoplanar images
- Skip frames - A block of images to skip within the Functional/Echoplanar trail. This block will be skipped for all trials unless a Skip Frames within run is defined.
- Task name - Short name to be used to define task that will be analyzed
- Run file - Functional/Echoplanar trial filename
- Skip Frames within run - To specify a different block of images to be skipped for each run separately.
13.2.3.0.3 The Block Definition Control:
Once tasks and runs can be defined, the user can then press the ``Define Blocks'' button to identify the corresponding tframes for every combination of tasks and runs. This pops up the Block Definition dialog shown in Figure 13.7. The user needs to simply list the tframes and press ``Done''. ``Clear All'' clears all tframes in the current window. The ``Validate'' button checks the block definitions for basic errors (e.g. frames outside the valid ranges, insufficient entry etc.)The block definitions can be examined and verified graphically by pressing the ``Plot'' button shown in Figure 13.8. This by default shows the block design for the first run - the option menu in the bottom left corner can be used to select the other runs.
13.2.4 The Single Subject GLM Tab
The FMRI Tool Single Subject GLM Tab has options for performing the GLM analysis.
The following options can be set:
- The HRF (Hemodynamic Response Function) Mode. This is one of:
- ``Wav'' - the Cox ``special'' function which is the AFNI [3] default. The parameters for this can be set in the ``Wav parameters'' frame below.
- ``Gamma'' - a single gamma variate function.
- ``Double Gamma'' - a double gamma variate function.
- ``Triple Gamma'' - a triple gamma variate function.
- ``SPM'' - a double gamma variate function as specified in SPM [104].
Selecting an HRF from the option menu results in it being plotted in the plot window in the right of the dialog box.
- Mask Threshold (0-1): This masks all data whose intensity is less
than a certain percentage of the peak value in the fMRI time series. A
value of 0.05 is the default which essentially masks all background
voxels and speeds up the process.
- Drift Polynomial Order (0-3): This is used to capture the image
signal drift. The default is 3 (cubic Legendre polynomials)
Once the basic parameters are set, there are three more options in the Outputs frame:
- Results Directory : this defines the location of all output files.
- Compute T-statistics for each beta value: if on the tool will also save the t-test output for each regression coefficient.
- Do not Save Temporary Files: If disabled then some temporary files are not deleted - this enables debugging.
![]() |
Finally there are three buttons on the bottom:
- ``Compute GLM'' - this performs the computation which can take a couple of minutes or more depending on the speed of your computer.
- ``Show Model as Image'' - displays the GLM design matrix model as an image - see Figure 13.10.
- ``Reset Defaults'' - this resets all options on this tab to their default values.
If the fMRI Tool is used within the Brain Register tool (as opposed to a standalone application) then once GLM Computation is completed, the results are automatically loaded into the MultiSubject Tool for further display - see chapter 14 for more details on the MultiSubject Tool.
13.2.5 The AFNI GLM Tab
This tab contains duplicate functionality to that present in the Single Subject GLM Tab. The only difference is that instead of a ``Compute GLM'' button the corresponding option is ``Create AFNI Script File''. This will create a text file containing a set of AFNI commands that can be used to compute the GLM. We use this extensively as a validation tool for our own GLM implementation.
Users familiar with AFNI can examine the script file and modify it as they please.
The two interesting options are:
- ``Use AFNI Waver'' - if off then BioImage Suite code will be used to generate the block design, if on then the AFNI program waver will be used to do this.
- ``Use AFNI Normalize'' - as part of the script all runs are normalized to have mean 100 and concatenated. If the ``Use AFNI Normalize'' option is selected this will be done with a series of ANFI commands, otherwise the normalized and concatenated file is generated using internal BioImage Suite code.
13.2.6 Viewer Tab
If the fMRI Tool is run as a standalone application, then there is an extra tab - the ``Viewer'' tab. The viewer tab contains one of the BioImage Suite viewers. More information can on these can be found in the ``The Viewers'' Chapter of the manual - see Chapter 5. Throughout the fMRI Tool, certain fields have a ``View'' option, which automatically sends the image in that field to the viewer. If the image does not exist, the user will be notified.
Next: 4 D. Multi Subject/Multi Up: 3 C. Functional MRI Previous: 3 C. Functional MRI Contents













