labelImageCentroids: labelImageCentroids

View source: R/labelImageCentroids.R

labelImageCentroidsR Documentation

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

Author(s)

Avants BB, Duda JT

Examples


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


stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.