check_nifti_header-methods | R Documentation |
Simple check to see if input is character or of class nifti and read in the header
check_nifti_header(x) ## S4 method for signature 'nifti' check_nifti_header(x) ## S4 method for signature 'character' check_nifti_header(x) ## S4 method for signature 'factor' check_nifti_header(x) ## S4 method for signature 'list' check_nifti_header(x) ## S4 method for signature 'array' check_nifti_header(x) ## S4 method for signature 'anlz' check_nifti_header(x) ## S4 method for signature 'ANY' check_nifti_header(x)
x |
character path of image or an object of class nifti, or array |
nifti object or character
John Muschelli muschellij2@gmail.com
set.seed(5) dims = rep(10, 4) arr = array(rpois(prod(dims), lambda = 2), dim = dims) nim = oro.nifti::nifti(arr) check_nifti_header(nim) check_nifti_header(as.anlz(nim)) testthat::expect_error(check_nifti_header(arr)) tfile = tempimg(nim) check_nifti_header(tfile) check_nifti_header(RNifti::readNifti(tfile)) check_nifti_header(c(tfile, tfile)) check_nifti_header(list(tfile, tfile)) check_nifti_header(factor(tfile))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.