fslstats structural_bet_pve_1 -M -V | awk '{ print $1 * $3 }'
it should be
fslstats structural_bet_pve_1 -M -V | awk '{ print $1 * $2 }'
Dear experts,I am learning to use fast, on the wiki (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST ) you introduced how to calculate tissue volume, but I am just wondering why the volume is not number of voxels times size of each voxel, i.e., the second out put of -V?Besides, I tried the commonds on the wiki with my data, but seems nubmers do not match.Can anybody tell me what I was doing wrong, and how can I get to volume of white matter/ gray matter/ csf/ intracranial volume correctly?Thanks for any help!!below was what I didvol=`fslstats VG311_struc_pve_1 -V | awk '{ print $1}'`mean=`fslstats VG311_struc_pve_1 -M`tissuevol=`echo "$mean * $vol" | bc -l`echo $tissuevol876788.096096echo $mean0.698489echo $vol1255264fslstats VG311_struc_pve_1 -M -V | awk '{ print $1 * $3 }'570833below was what on the wikiTissue Volume Quantification
Estimating the tissue volume for a given class can be done using FAST and we recommend using the partial volume estimates for the most accurate quantification. The actual volume of tissue can be calculated easily from the corresponding partial volume map by summing up all the values. This can be done using fslstats and then multiplying the mean value by the volume (in voxels).
For example, for an image called structural_bet that fast was run on, the tissue volume of tissue class 1 can be found by running the following:
vol=`$FSLDIR/bin/fslstats structural_bet_pve_1 -V | awk '{print $1}'`
mean=`$FSLDIR/bin/fslstats structural_bet_pve_1 -M`
tissuevol=`echo "$mean * $vol" | bc -l`
echo $tissuevol
This prints the total tissue volume in voxels (which is also stored in the variable tissuevol). Note that to get the volume in mm3 just replace the {print $1} with {print $2} in the first line above. Alternatively, this can be done in the single line:
fslstats structural_bet_pve_1 -M -V | awk '{ print $1 * $3 }'
2013-12-24
Chunhui Chen_________________State Key Laboratory of Cognitive Neuroscience and LearningBeijing Normal UniversityBeijing, China 100875