Learn R Programming

ANTsR (version 1.0)

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

centroids<-getCentroids(  img  )

Arguments

img

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

threshparam

thresholds the input image at mean( img[ img > 0 ] ) - threshparam * sdev( img[ img > 0 ] )

clustparam

ignore post-threshold clusters smaller than this value

Value

the centroids are output in matrix of size npoints by 3

Examples

Run this code
# NOT RUN {
 getCentroids( f  , clustparam = 250, threshparam = 0 )
# }

Run the code above in your browser using DataLab