compute mutual information between two images

antsImageMutualInformation(in_image1, in_image2, sampling.percentage,
  nBins)

Arguments

in_image1

antsImage

in_image2

antsImage

sampling.percentage

value between zero and one determining ratio of points in image to use for metric estimation

nBins

number of bins to use in joint histogram estimate, often set between 8 and 32

Value

mutual information value

Examples

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))