ensure_array | R Documentation |
Forces an array output for manipulation and overall conversion
ensure_array(img)
img |
Image object ( |
Array of same dimensions as image object
set.seed(5)
dims = rep(10, 3)
arr = array(rnorm(prod(dims)), dim = dims)
arr[,,10] = 0
nim = oro.nifti::nifti(arr)
rnifti = RNifti::asNifti(nim)
timg = tempimg(nim)
limg = list(factor(timg), factor(timg))
func = ensure_array
func(arr)
func(nim)
func(rnifti)
func(timg)
func(limg[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.