antsImageMutualInformation.Rd
compute mutual information between two images
antsImageMutualInformation(in_image1, in_image2, sampling.percentage, nBins)
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 |
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