User Tools

Site Tools


fmriquality

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
fmriquality [2010/06/17 14:50] – added runtime concerns for some options jochenfmriquality [2010/06/17 19:09] – integrated the information in the QA page jochen
Line 14: Line 14:
  
 ===== Requirements ===== ===== Requirements =====
-To run the fMRI quality checking function, the images need to be in one of the functional imaging data formats currently supported by the xff class (Analyze/NIftI, FMR/STC, VTC).+To run the fMRI quality checking function, the images need to be in one of the functional imaging data formats currently supported by the xff class
 +  * BrainVoyager's FMR (STC) format 
 +  * BrainVoyager's VTC format 
 +  * SPM'Analyze or NIftI (HDR/NII) formats (either as series of 3D volumes or a single 4D file)
  
 ===== Function reference ('help fmriquality') ===== ===== Function reference ('help fmriquality') =====
Line 47: Line 50:
 ===== Usage ===== ===== Usage =====
 The most basic (and pre-configured) way of running fmriquality is by simply passing in the filename(s) or object of the run to check: The most basic (and pre-configured) way of running fmriquality is by simply passing in the filename(s) or object of the run to check:
-  * using Analyze files: <code matlab fmriquality_example1.m>qas = fmriquality(findfiles(sessionfolder, '*.img'));</code>+  * using Analyze files: <code matlab fmriquality_example1.m>qas = fmriquality(findfiles(sessionfolder, '*.img', 'depth=1'));</code>
   * using a BrainVoyager QX FMR file: <code matlab fmriquality_example2.m>fmr = xff('*.fmr', 'Select FMR for which you want to check the data quality...');   * using a BrainVoyager QX FMR file: <code matlab fmriquality_example2.m>fmr = xff('*.fmr', 'Select FMR for which you want to check the data quality...');
 qas = fmriquality(fmr);</code> qas = fmriquality(fmr);</code>
Line 62: Line 65:
 % running fmriquality % running fmriquality
 fmriquality(qafiles, qaopts);</code> fmriquality(qafiles, qaopts);</code>
 +  * create a quality assessment struct for all VTCs in an MDM, applying robust temporal filtering: <code matlab fmriquality_example4.m>% loop over VTCs in MDM
 +for study = 1:size(mdm.XTC_RTC, 1)
 +    
 +    % perform quality assessment
 +    q = fmriquality(mdm.XTC_RTC{study, 1}, struct('robfilt', true));
 +    
 +    % store as VTCNAME_qasheet.mat
 +    save([mdm.XTC_RTC{study, 1}(1:end-4) '_qasheet.mat'], 'q');
 +end</code>
 +
 +In case the QA sheet is not shown by the function (flag ''.qasheet'' set to ''false'', which is the default), the returned struct can be visualized via a call to ''fmriqasheet'':
 +
 +<code matlab fmriqasheet_example.m>% load a QA sheet (contains variable/struct q !)
 +load CPU4212_run3_qasheet.mat
 +
 +% open QA sheet
 +fmriqasheet(q);</code>
 +
  
 If the ''.qasheet'' option is not set to true, the returned variable can later be passed to [[fmriqasheet]] manually (for scripted QA-ing). This variable is of type struct and contains (at least) the following fields: If the ''.qasheet'' option is not set to true, the returned variable can later be passed to [[fmriqasheet]] manually (for scripted QA-ing). This variable is of type struct and contains (at least) the following fields:
Line 77: Line 98:
 Please be aware that the first argument **must** be a list of filenames; so, even for a single NIftI ([[xff - NII format|NII]]) file, a cell array must be passed in: Please be aware that the first argument **must** be a list of filenames; so, even for a single NIftI ([[xff - NII format|NII]]) file, a cell array must be passed in:
  
-<code matlab fmriquality_example4.m>% using a single NII file+<code matlab fmriquality_example5.m>% using a single NII file
 qas = fmriquality({'vols.nii'});</code> qas = fmriquality({'vols.nii'});</code>
  
 Also, please note that motion parameter estimation requires between one and several minutes (depending of the length of the run and whether or not robust motion estimation is employed). The **runtime also easily increases tenfold when robust temporal filtering is used**. In other words, these options are more useful and meant for situations where the fmriquality function is part of a larger script that automatically checks the quality of all incoming data instead of being used from the command line in a more interactive way! Also, please note that motion parameter estimation requires between one and several minutes (depending of the length of the run and whether or not robust motion estimation is employed). The **runtime also easily increases tenfold when robust temporal filtering is used**. In other words, these options are more useful and meant for situations where the fmriquality function is part of a larger script that automatically checks the quality of all incoming data instead of being used from the command line in a more interactive way!
 +
 +Finally, at the moment, the "problem detection" thresholds (to mark a volume as outliers) are fixed, but are likely to change in a future version.
fmriquality.txt · Last modified: 2010/11/26 18:50 by jochen