1

I am using simpleITK for image registration, which is a good tool to use. But unfortunately, in the new version, we can not calculate the mutual information value. I have tried other calculation methods, but finally found that it is not applicable to calculate the mutual information of images (such as sklearn package).

Is there a library / tool that already does that? How would you implement it?

tang
  • 31
  • 3

1 Answers1

0

Hey it does the trick with SITK

import SimpleITK as sitk

img1 = sitk.ReadImage('')
img2 = sitk.ReadImage('')
registration_method = sitk.ImageRegistrationMethod()
registration_method.SetMetricAsMattesMutualInformation()
registration_method.MetricEvaluate(img1,img2)