Crop the center of an image.

cropImageCenter(image, cropSize)

Arguments

image

Input ANTs image

cropSize

width, height, depth (if 3-D), and time (if 4-D) of the cropped image.

Value

a cropped image

Author

Tustison NJ

Examples


library( ANTsR )

image <- antsImageRead( getANTsRData( "r16" ) )
croppedImage <- cropImageCenter( image, c( 64, 64 ) )