| deoblique | R Documentation |
AFNI-like helper that mirrors the core behavior of
3dWarp -deoblique:
If gridset is supplied, use that as the output grid.
Otherwise, build an axis-aligned output grid that encloses the input field-of-view.
If newgrid is not supplied, use the minimum input voxel size
isotropically (AFNI-style default for deobliquing).
deoblique(
x,
gridset = NULL,
newgrid = NULL,
method = c("linear", "nearest", "cubic"),
engine = c("internal")
)
x |
A |
gridset |
Optional output grid (a |
newgrid |
Optional scalar output voxel size (mm), analogous to AFNI's
|
method |
Interpolation method used when |
engine |
Resampling engine passed to |
For NeuroSpace, this returns the target deobliqued space.
For NeuroVol, it also resamples image data into that space.
If x is a NeuroSpace, returns a deobliqued
NeuroSpace. If x is a NeuroVol, returns a resampled
NeuroVol in deobliqued space.
output_aligned_space, resample_to
sp <- NeuroSpace(c(32, 32, 20), spacing = c(2, 2, 3))
tx <- trans(sp)
tx[1, 2] <- 0.15
sp_obl <- NeuroSpace(dim(sp), spacing = spacing(sp), trans = tx)
# Build deobliqued target space (minimum spacing default)
sp_deob <- deoblique(sp_obl)
# Resample a volume to deobliqued space
vol <- NeuroVol(array(rnorm(prod(dim(sp_obl))), dim(sp_obl)), sp_obl)
vol_deob <- deoblique(vol, method = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.