resample_image-methods | R Documentation |
Resamples an antsImage
or
nifti
object
resample_image(
img,
parameters,
parameter_type = c("mm", "voxels"),
interpolator = c("nearestneighbor", "linear", "gaussian", "windowedsinc", "bspline"),
...
)
## S4 method for signature 'character'
resample_image(
img,
parameters,
parameter_type = c("mm", "voxels"),
interpolator = c("nearestneighbor", "linear", "gaussian", "windowedsinc", "bspline"),
...
)
## S4 method for signature 'nifti'
resample_image(
img,
parameters,
parameter_type = c("mm", "voxels"),
interpolator = c("nearestneighbor", "linear", "gaussian", "windowedsinc", "bspline"),
...
)
## S4 method for signature 'antsImage'
resample_image(
img,
parameters,
parameter_type = c("mm", "voxels"),
interpolator = c("nearestneighbor", "linear", "gaussian", "windowedsinc", "bspline"),
...
)
.resample_image(
img,
parameters,
parameter_type = c("mm", "voxels"),
interpolator = c("nearestneighbor", "linear", "gaussian", "windowedsinc", "bspline")
)
img |
character path of image or an object of class nifti, or antsImage |
parameters |
parameters
to pass as |
parameter_type |
Are the parameters in units of voxels or millimeters (mm) |
interpolator |
what type of interpolation should be done |
... |
not currently used |
An antsImage
or nifti
depending on
input
library(oro.nifti)
library(extrantsr)
n = 30
x = nifti(array(rnorm(n^3*10), dim = c(n, n, n)))
res = resample_image(x, parameters = c(0.5, 0.5, 0.5))
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.