fast_readnii | R Documentation |
This function calls the readNifti
function from the
RNifti
package, and then converts the image to a nifti
object
fast_readnii(fname, dtype = TRUE, drop_dim = TRUE)
fname |
file name of the NIfTI file. |
dtype |
Should |
drop_dim |
Should |
A nifti
object
set.seed(5)
dims = rep(10, 4)
arr = array(rpois(prod(dims), lambda = 2), dim = dims)
nim = oro.nifti::nifti(arr)
tfile = tempfile(fileext = ".nii.gz")
write_nifti(nim, tfile)
rimg = fast_readnii(tfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.