Learn R Programming

ANTsR (version 1.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 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 <- atropos( d = 2, a = img, m = '[0.2,1x1]',
 c = '[2,0]',  i = 'kmeans[3]', x = mask )
labelStats(img, segs1$segmentation)
# }

Run the code above in your browser using DataLab