Pad or crop image to a specified size

padOrCropImageToSize(image, size)

Arguments

image

Input ANTs image

size

size of the output image.

Value

a padded/cropped image

Author

Tustison NJ

Examples

library( ANTsR ) image <- antsImageRead( getANTsRData( "r16" ) ) paddedImage <- padOrCropImageToSize( image, c( 333, 333 ) )