Finds the Sorensen dice of two 3D (medical) image binary masks. The Dice is computed on a slice-by-slice basis, giving a mean dice for each slice. Often, the overall Dice is somtimes not very objective, and one requires a slightly more specific means of measuring ovelap.
The slices can be defined by the user using the --x, --y or, --z switches
Note that this program uses MIRTK - Medical Image Registration Library, an old legacy version in IRTK exists but is not maintained anymore.
The dependencies are not great on MIRTK and IRTK. It is simply for accessing pixel values in the image. I envisage that the code can be easily ported into Insight Toolkit and other imaging libraries.
The usage for the first tool evaluate-slice-dice
if make
installed under mirtk /lib/tools/
:
./mirtk evaluate-slice-dice
-i1 <img1>
-i2 <img2>
-o <output dice txt>
-txt <append text>
--x --y --z <slice direction>
This program outputs the mean and standard deviation of dice in each slice along the specified X, Y, Z direction.
If the -o
option is used, a CSV file is written containing the following output:
post_truth, post_test, Dice-F1
47,24,67.61
31,20,78.43
112,112,100
475,437,95.83
484,184,55.09
340,158,63.45
The first column post_truth
is the number of positive voxels in the truth image included with switch -i1
.
The second column post_test
is the number of positive voxels in the test image. The final columnn Dice-F1
is the Dice F1 score between 0-100, where 100 is perfect overlap.
If you are interested in other statistical tests of such as senstivity and specificity, please refer to this library
Dr. Rashed Karim
Department of Biomedical Engineering
King's College London