Closed willi3by closed 4 years ago
probably correct for dice metric - no promises
img1 = ants.image_read( ants.get_data("r16") ).threshold_image("Otsu",3)
img2 = ants.image_read( ants.get_data("r27") ).threshold_image("Otsu",3)
s1 = ants.threshold_image(img1,3,3)
s2 = ants.threshold_image(img2,3,3)
dice = 2.0 * ( ( s1 + s2 ) == 2 ).sum() / ( s1.sum() + s2.sum() )
closing due to lack of interest on user's part.
Yes, sorry I forgot to respond. I actually found both Dice and Jaccard functions in SimpleITK. Thanks for the reply
In case anybody finds this issue, the functionality now exists in ANTsPy. The underlying ITK code is the same.
Excellent! Thanks for the follow up!
Is your feature request related to a problem? Please describe. I am attempting to calculate the registration quality of a set of scans to template space. The patients in the study are acute stroke patients with lesions and the analysis is dependent on acceptable registration to MNI space. To assess this, I want to use Jaccard's metric.
Describe the solution you'd like Is there a way to calculate Jaccard's metric in ANTSpy?
Describe alternatives you've considered I am also open to other metrics and best practices for lesioned brains. From my reading, it just seemed like this was the best metric for registration quality.