Hi Nick,
I was actually able to convert the label files into volumes using mri_label2vol and then use the mri_segstats to get the total number of pixels from each volume file. But the mri_compute_seg_overlap didn't work as easily. I tried running the following but the results were all zero, which I've included as well: mri_compute_seg_overlap -olog text whole_amygdala_test.mgz ../../Round_2/HRDEV150/whole_amygdala_test2.mgz
logging overall Dice to text Jaccard Coefficients: correct ratio for label 2 = 0 correct ratio for label 41 = 0 correct ratio for label 3 = 0 correct ratio for label 42 = 0 correct ratio for label 4 = 0 correct ratio for label 43 = 0 correct ratio for label 17 = 0 correct ratio for label 53 = 0 correct ratio for label 10 = 0 correct ratio for label 49 = 0 correct ratio for label 11 = 0 correct ratio for label 50 = 0 correct ratio for label 12 = 0 correct ratio for label 51 = 0 correct ratio for label 13 = 0 correct ratio for label 52 = 0 correct ratio for label 18 = 0 correct ratio for label 54 = 0 correct ratio for label 26 = 0 correct ratio for label 58 = 0 correct ratio for label 14 = 0 correct ratio for label 15 = 0 correct ratio for label 5 = 0 correct ratio for label 44 = 0 mean +/- std = 0.0000 +/- 0.0000 Dice Coefficients: label 2 = 0 label 41 = 0 label 3 = 0 label 42 = 0 label 4 = 0 label 43 = 0 label 17 = 0 label 53 = 0 label 10 = 0 label 49 = 0 label 11 = 0 label 50 = 0 label 12 = 0 label 51 = 0 label 13 = 0 label 52 = 0 label 18 = 0 label 54 = 0 label 26 = 0 label 58 = 0 label 14 = 0 label 15 = 0 label 5 = 0 label 44 = 0 mean +/- std = 0.0000 +/- 0.0000 Overall subcortical dice = nan
Any ideas?
Thanks
Jon,
None of the existing utilities will calculate the Dice of two labels (at least not in a straightforward manner). However, its easy to do in matlab.
Attached is a script to do this. Copy it to your $FREESURFER_HOME/matlab directory.
Usage is:
dice_labels('label1.label','label2.label')
or just
dice_labels('label1','label2')
this assumes the two labels were created in the same volume.
Nick
On Thu, 2009-08-20 at 12:21 -0400, jentis@nmr.mgh.harvard.edu wrote:
Hi,
I need to compute the reliability of two manually traced ROIs and I was told to use the command mri_compute_seg_overlap. However, it seems this command needs its input to be in .mgz format, but the ROIs have been saved as .label files in Freeview. A simple renaming function does not work, so is there another way to make mri_compute_seg_overlap work with .label files? Thanks.
Best, Jon _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer