View source: R/resampleImageToTarget.R
resampleImageToTarget | R Documentation |
Resample image by using another image as target reference. This function uses antsApplyTransform with an identity matrix to achieve proper resampling.
resampleImageToTarget(
image,
target,
interpType = "linear",
imagetype = 0,
verbose = FALSE,
...
)
image |
image to resample |
target |
image of reference, the output will be in this space |
interpType |
Choice of interpolator. Supports partial matching.
|
imagetype |
choose 0/1/2/3 mapping to scalar/vector/tensor/time-series |
verbose |
print command and run verbose application of transform. |
... |
additional arugment passed to |
output antsImage resampled with target's resolution/origin/orientation/direction
Pustina D
fname <- getANTsRData("r16")
fi <- antsImageRead(fname)
fi2mm <- resampleImage(fi, c(2, 2), useVoxels = 0, interpType = "linear")
resampled <- resampleImageToTarget(fi2mm, fi)
testthat::expect_error(resampleImageToTarget(fi2mm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.