resample | R Documentation |
Resamples a volume to a new space with optional smoothing of parcel boundaries. This is particularly useful for atlas parcellations where maintaining discrete labels is important.
resample(
vol,
outspace,
smooth = FALSE,
interp = 0,
radius = NULL,
min_neighbors = 3
)
vol |
A NeuroVol object to be resampled |
outspace |
A NeuroSpace object specifying the target space |
smooth |
Logical. Whether to apply boundary smoothing after resampling. Default: FALSE |
interp |
Integer. Interpolation method (0=nearest neighbor, 1=linear). Default: 0 |
radius |
Numeric. Radius for smoothing neighborhood in voxels. If NULL, uses max(spacing)+0.5. Default: NULL |
min_neighbors |
Integer. Minimum number of neighbors required for smoothing. Default: 3 |
The resampling process:
First performs nearest-neighbor interpolation to the new space
Optionally smooths boundaries using a local majority voting scheme
Preserves zeros in the mask (background)
A resampled NeuroVol object in the new space
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.