View source: R/antsImageMutualInformation.R
antsImageMutualInformation | R Documentation |
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
Brian B. Avants
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))
testthat::expect_error(antsImageMutualInformation(fi3, mi))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.