# NOT RUN {
img = antsImageRead( getANTsRData("simple") ,2)
img = n3BiasFieldCorrection( img , 4 )
img = n3BiasFieldCorrection( img , 2 )
bmk = getMask( img )
segs <- kmeansSegmentation( img, 3, bmk )
priors = segs$probabilityimages
seg = geoSeg( img, bmk, priors )
# }
Run the code above in your browser using DataLab