Quick QA using Qdec
Author: Nick Schmansky
This page describes how to perform a quick QA of a set of subjects processed by recon-all. Its purpose is merely to highlight subjects with potential recon problems. It is not a substitute for manually inspecting each slice of each subject to ensure that surfaces and asegs are good.
The ADNI dataset will be used as an example. That data is located here:
cd /autofs/cluster/con_002/users/ADNI setenv SUBJECTS_DIR $PWD
The script used to declare all known adni subjects (3317 as of 24 May 2011) is:
source scripts/all_subjs
Have a look at it. It is composed of the subsets of ADNI subjects (baseline and longitudinal).
Now, the SUBJECTS var contains all subject ids, so create a dummy qdec file:
cd qdec echo "fsid dummy" > qdec.all_subjs.table.dat foreach s ($SUBJECTS) echo "$s 0" >> qdec.all_subjs.table.dat end
'dummy' is just a stub regressor. Note that within that qdec dir are other qdec tables containing all sorts of data associated with each subject.
Now, run qdec:
qdec --table qdec.all_subjs.table.dat
The terminal should display that it is 'verifying subject data' (confirming that a subject exists in SUBJECTS_DIR for each fsid in the table). After a couple minutes, the Subjects tab should show that it loaded 3317 subjects.
Now click on the button 'Generate Stats Data Table'. This will read all the stats files of all the subjects. If it exits with an error, consult the terminal for details. It could be that a file doesnt exist, or is corrupted, or is out of date. Fix that subject, and repeat the steps above.
If the button text changed from 'Generate Stats Data Table' to 'none', then all the tables were read. Now you are ready to begin the quick and dirty QA.
Basically, you will select various structures from each of the stats files, for instance left hippocampal volume from the aseg.stats file, and import it into the stats table display. Then, merely select that for display. It will display, for instance, left hippocampal volume, of all subjects. The 'quick and dirty' QA is merely to look for outliers. If there is an outlier, then right click on that point, and the option to open tkmedit or tksurfer will be available. You can use this to open that subject and look for obvious failures (maybe the skull strip was bad, or maybe the wm.mgz was bad). In any case, you make a note of that subject id. Then, either remove that subject id from the script (referenced in the all_subjs script), making note of why it was bad, or fix that subject in the usual manner.
There are of course lots of structures to check: left/right hippocampus, ventricles, ICV, left/right entorhinal thickness, superior temporal thickness, etc.