# NOT RUN {
# extract a vector from an image 'img' of class 'antsImage' by considering only the region starting at index (1,1,1) with size (10,10,10)
reg = new( "antsRegion" , index = c(1,1,1) , size = c(10,10,10) )
vect = as.numeric( img , region = reg )
# }
Run the code above in your browser using DataLab