Learn R Programming

ANTsR (version 0.3.1)

getCentroids: Convert an image to the geometric centroids of its signal

Description

Reduces a variate/statistical/network image to a set of centroids describing the center of each stand-alone non-zero component in the image.

Usage

getCentroids(img, clustparam = 250, outprefix = NA)

Arguments

img

the image to reduce to centroids - presumably some kind of statistical or network map

clustparam

look at regions greater than or equal to this size

outprefix

prefix if you want to output to a file

Value

the centroids are output in matrix of size npoints by 3

Examples

Run this code
# NOT RUN {
img<-antsImageRead( getANTsRData( "r16" ) )
img<-thresholdImage( img, 90, 120 )
img<-labelClusters( img, 10 )
cents<-getCentroids( img  )
# }

Run the code above in your browser using DataLab