Learn R Programming

ANTsR (version 0.4.0)

labelStats: labelStats

Description

Get label statistics from image.

Usage

labelStats(image, labelImage)

Arguments

image

Image to calculate statistics from.

labelImage

Label image.

Value

Data frame with one row per label (including zero) and columns : LabelValues, Mean, Min, Max, Variance, Count, Volume

Examples

Run this code
# NOT RUN {
img <- antsImageRead( getANTsRData("r16") , 2 )
img <- resampleImage( img, c(64,64), 1, 0 )
mask <- getMask(img)
segs1 = kmeansSegmentation( img, 3 )
labelStats(img, segs1$segmentation)

# }

Run the code above in your browser using DataLab