#!/bin/csh -ef

# report icv 
# get ICV value from aseg.stats file

set s = $1

if (-e $SUBJECTS_DIR/$s/stats/aseg.stats) then

    set icv = `cat $SUBJECTS_DIR/$s/stats/aseg.stats | grep ICV | egrep -o "[0-9]*\.[0-9]*"`
    echo "$icv" |tee $SUBJECTS_DIR/$s/stats/icv.txt


else

    echo "nofile"

endif


