antsImageMutualInformation.Rd
compute mutual information between two images
antsImageMutualInformation(in_image1, in_image2, sampling.percentage, nBins)
mutual information value
fi <- antsImageRead(getANTsRData("r16"), 2)
mi <- antsImageRead(getANTsRData("r64"), 2)
testthat::expect_error(antsImageMutualInformation(fi, "hey"))
testthat::expect_error(antsImageMutualInformation("hey", fi))
fi3 <- resampleImage(fi, c(2, 2))
fi2 <- antsImageClone(fi)
pixeltype(fi2) <- "unsigned int"
testthat::expect_error(antsImageMutualInformation(fi2, mi))
#> function (in_image1, in_image2, sampling.percentage, nBins)
#> NULL
testthat::expect_error(antsImageMutualInformation(fi3, mi))