eliminate bright voxels in FAST output
# Eliminate bright voxels (the second mode for the widest distribution)
$FSLDIR/bin/fslmaths ${pve0dir}/${pve0} -thr 0.9 -bin -binv -mul ${strucimg}_brain $tmpdir/${strucimg}_nonCSF
medval=`$FSLDIR/bin/fslstats $tmpdir/${strucimg}_nonCSF -P 50`
$FSLDIR/bin/fslmaths ${strucimg}_brain -uthr $medval -bin -mul ${pve0dir}/${pve0} $tmpdir/${strucimg}_brain_pve_0