Learn R Programming

ANTsR (version 0.3.3)

labelImageCentroids: labelImageCentroids

Description

Converts a label image to coordinates summarizing their positions

Usage

labelImageCentroids(img, physical = FALSE, convex = TRUE)

Arguments

img
ants image of labels (ints)
physical
boolean if you want physical space coordinates or not
convex
- if TRUE, return centroid, if FALSE return point with min average distance to other points with same label

Value

list with labels , array of label values, and centroids <- coordinates of label centroids

Examples

Run this code

labelImage<-makeImage( c(2,2,2) , 0:7 )
labelImageCentroids(labelImage)

Run the code above in your browser using DataLab