# NOT RUN {
# read an image from a file named 'imagefile.nii' into an image of pixeltype 'double' and dimensions '4'
img <- antsImageRead( "imagefile.nii" , dimension = 3 )
img <- antsImageRead( "imagefile.nii" , dimension = 2 )
img <- antsImageRead( "imagefile.nii" , dimension = 4 , pixeltype = "double" )
# }
Run the code above in your browser using DataLab