Learn R Programming

ANTsR (version 0.3.3)

resampleImageToTarget: resampleImageToTarget

Description

Resample image by using another image as target reference.

Usage

resampleImageToTarget(image, target, interpType = 1)

Arguments

image
input antsImage matrix
target
reference image to use for voxel size and header info
interpType
one of 0 (linear), 1 (nearest neighbor), 2 (gaussian), 3 (windowed sinc), 4 (bspline)

Value

output antsImage

Examples

Run this code

fi<-antsImageRead( getANTsRData("r16"))
fi.ref<-antsImageRead( getANTsRData("r64"))
fi <- resampleImage(fi, c(2.2, 2.2, 2.2), useVoxels = 0, interpType = 1)
finew <- resampleImageToTarget(fi, fi.ref)

Run the code above in your browser using DataLab