labelStats | R Documentation |
Get label statistics from image.
labelStats(image, labelImage)
image |
Image to calculate statistics from. |
labelImage |
Label image. |
Data frame with one row per label (including zero) and columns : LabelValues, Mean, Min, Max, Variance, Count, Volume
img <- antsImageRead(getANTsRData("r16"), 2)
img <- resampleImage(img, c(64, 64), 1, 0)
mask <- getMask(img)
segs1 <- kmeansSegmentation(img, 3)
labelStats(img, segs1$segmentation)
testthat::expect_error(labelStats(img, as.array(segs1$segmentation)))
testthat::expect_error(labelStats(img, as.array(segs1$segmentation)))
sub_seg <- segs1$segmentation
sub_seg <- as.antsImage(sub_seg[1:62, 1:62], reference = sub_seg)
testthat::expect_error(labelStats(img, sub_seg))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.