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
Last revisionBoth sides next revision
fmriquality [2010/06/17 15:15] – added final comment about thresholds being fixed for now jochenfmriquality [2010/10/26 19:23] jochen
Line 2: Line 2:
  
 ===== Motivation ===== ===== Motivation =====
-There are several things that can go wrong during the acquisition phase (scanning) of a subjectsome of which severely impact the usability of subject'dataset. While any given project (study) is still in the stage of data collection (subjects are still being scanned), there is always the chance to decide that a particular subject might introduce too much noise into the eventually performed group statistic and should be discarded (and in this case replaced by another subject). +As said on the [[Processing stream - quality assessment|quality assessment]] pagethis function is used to determine whether or not given dataset (run) is suitable for subsequent data analysis.
- +
-Relevant for that decision could be one of the following issues: +
-  * the subject had to exit the scanner before the experiment was completed -> usually such a dataset needs to be discarded +
-  * the subject couldn't restrain from moving their head during the experiment -> depending on how difficult it is to find a replacement subject, it is advised to discard such a dataset +
-  * the scanner produced disproportionally strong noise in the data -> if possible, such a dataset should also be discarded +
- +
-Of course there are still many other possible reasons to discard any given subject (e.g. a score on a questionnaire/behavioral measure indicates that the subject does not fall into the distribution of the examined population of subjects), but especially the second and third issue mentioned above can be detected even before entering a subject's dataset into any given group analysis+
- +
-This function, ''fmriquality'' allows to assess some of the more general quality measures in a unified way.+
  
 ===== 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 41:
 ===== 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 56:
 % 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 89:
 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>
  
fmriquality.txt · Last modified: 2010/11/26 18:50 by jochen