Learn R Programming

ANTsR (version 0.7.2.0)

getCenterOfMass: center of mass

Description

compute an image center of mass in physical space which is defined as the mean of the intensity weighted voxel coordinate system.

Usage

getCenterOfMass(img)

Arguments

img

antsImage

Value

vector center of mass

Examples

Run this code
# NOT RUN {
fi<-antsImageRead( getANTsRData("r16"))
com1<-getCenterOfMass( fi )
fi<-antsImageRead( getANTsRData("r64"))
com2<-getCenterOfMass( fi )

# }

Run the code above in your browser using DataLab