Hi list,
It seems a dice-kappa calculation would be useful in FSL, so I scripted this in case someone finds it useful.
#!/bin/bash
# usage: dice_kappa filename1 filename2
# this script uses the fsl toolbox and "bc" to calculate the Dice-Kappa statistic for two binary masks
# the scale=6 variable sets the number of decimal places to use
total_voxels1=`fslstats "$1" -V | awk '{printf $1 "\n"}'`
total_voxels2=`fslstats "$2" -V | awk '{printf $1 "\n"}'`
intersect_voxels=`fslstats "$1" -k "$2" -V | awk '{printf $1 "\n"}'`
dice_kappa=`echo "scale=6; $intersect_voxels/(.5*($total_voxels1+$total_voxels2))" | bc`
echo "$dice_kappa"
|