addpath /home/miller/ICAproject/source/afni_matlab/matlab -END;To run the code using Matlab version 6.0, enter the following commands in the Matlab command window:
addpath /home/miller/ICAproject/source/FastICA_23 -END;
addpath /home/miller/ICAproject/source/ICAwork -END;
Alternately, these directories can be added to the path by using the “Set Path...” option from Matlab's “File” menu.
Example
Infile Name of AFNI functional data file, without the .HEAD, .BRIK extension. Filename must be enclosed in single quotes eg. ('arithN+orig', ...). Both infile.HEAD and infile.BRIK must be found somewhere in the current Matlab path. x,y,z x,y,z dimensions of the original AFNI data. compfunc File containing the comparison function describing the expected time course for the experiment. File must be located in a directory on the MatLab path. Filename must be enclosed in single quotes. cutoff Correlation value which is considered significant. All component time courses with correlation coefficient greater than or equal to this value will be processed; corresponding components will be written to files for later analysis. Absolute value of correlation coefficient is used. endian Specifies whether the machine on which this routine is being run uses big endian or little endian format. Allowed values are 'big, 'little'.
NOTE: Intel processors = little endian
Sun SPARC, Mac (Motorola) processors = big endian
savets Indicates whether or not functional time series data files should be saved. Due to the large size of these files, it is recommended that they not be saved when it is only the activation intensity maps which are of interest. Valid values are 'yes' and 'no'.
SignalReport.txt Lists the correlation coefficient for each of the components. Indicates the correlation cutoff value used, and which components were saved to datafiles. sigXX.mat Component file (where “XX” is the component number). One such file will be created for each component which has a correlation coefficient greater than or equal to the specified cutoff. Data in these files is in Matlab format. These files can be used as input to the convertToAfni.m routine, in order to create an Afni activation map for each component. sigXXfunc.mat Functional time series data for the component (where “XX” is the component number). These files are only created if parameter “savets” is set to “yes”. One such file will be created for each component which has a correlation coefficient greater than or equal to the specified cutoff. Data in these files is in Matlab format. These files can be used as input to the convertFuncToAfni.m routine, in order to create an Afni functional time series image for each component.
Example
sigfile File containing the component voxel values to be converted (i.e. an output file from runICA.m or separateSignals.m). File must be located somewhere within MatLab's current path. Filename must be enclosed in single quotes. x,y,z x,y,z dimensions for the AFNI map. These dimensions should be those of the original AFNI functional data read into MatLab for computation of the components. (Note: The voxel values stored in sigfile must be a matrix with dimensions 1 X (x*y*z) ) inHeadfile Name of .HEAD file of the original AFNI dataset from which the components were determined (without the '.HEAD' extension). The .HEAD file of the output data will be created using most of the information from the original .HEAD file. Changes will be made only where required. inHeadfile.HEAD must be located somewhere on MatLab's current path. Filename must be enclosed in single quotes. outfile Name of the output file, without extension. outfile.HEAD, outfile.BRIK and outfile@1.HEAD, outfile@1.BRIK will be created in Matlab's current working directory. Filename must be enclosed in single quotes. zlimit Z-score (number of standard deviations from mean) which should be considered significant. Voxels with z-scores greater than or equal to this value will be included in the activation map. (Note: In McKeown's paper, a z-score limit of 2 is used; Kiviniemi et al. use 6. A z-score limit of 4 seemed appropriate for the synaethesia data. See details in the “Independent Component Analysis of fMRI Data” document). endian Specifies whether the machine on which this routine is being run uses big endian or little endian format. Allowed values are 'big', 'little'. Required so that Afni will know whether or not byte swapping is required when maps created by this routine are to be displayed on a different machine.
b. Create Afni Functional Time Series Images (if required)
outfile@1.HEAD, outfile@1.BRIK Afni activation maps. Only voxels which make a significant contribution to the component are included in these maps. These voxels have a value which is at least the “zlimit” number of standard deviations greater than the mean voxel value in the component. In these maps, the “significant” voxels will have values set to their z-score; all other voxels will have value of 0. Activation maps are intensity maps (Afni fim format). These maps can be used as an Overlay in Afni, to indicate regions of brain activity which are part of this component. outfile.HEAD, outfile.BRIK Also Afni intensity maps. These maps include the raw voxels values for the component. These maps are of questionable value, and probably should not be created.
Example
funcfile File containing the component functional time series values to be converted (i.e. an output file from runICA.m or separateSignals.m, when “savets” was set to “yes”). File must be located somewhere within MatLab's current path. Filename must be enclosed in single quotes. x,y,z x,y,z dimensions for the Afni data. These dimensions should be those of the original AFNI functional data read into MatLab for computation of the components. t Number of time points. This value corresponds to the number of sub-bricks in the original Afni data. Afni functional time series images created by this routine will have this same number of sub-bricks.
(Note: The voxel values stored in funcfile must be a matrix with dimensions t X (x*y*z) )
inHeadfile Name of .HEAD file of the original AFNI dataset from which the components were determined (without the '.HEAD' extension). The .HEAD file of the output data will be created using most of the information from the original .HEAD file. Changes will be made only where required. inHeadfile.HEAD must be located somewhere on MatLab's current path. Filename must be enclosed in single quotes. outfuncfile Name of the output file, without extension. outfuncfile.HEAD and outfuncfile.BRIK will be created in Matlab's current working directory. Filename must be enclosed in single quotes. endian Specifies whether the machine on which this routine is being run uses big endian or little endian format. Allowed values are 'big', 'little'. Required so that Afni will know whether or not byte swapping is required when images created by this routine are to be displayed on a different machine.
Step 3: Optional - Combine and Compare Activation Maps
outfuncfile.HEAD, outfuncfile.BRIK Afni functional time series image files. These files allow the user to view the time course associated with voxels which are part of the component. Use the associated outfile@1.HEAD file (created in the previous step) as an Overlay in order to see which pixels are part of the component.