check_nifti-methods | R Documentation |
Simple check to see if input is character or of class nifti
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'nifti'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'character'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'factor'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'list'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'array'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = FALSE,
...
)
## S4 method for signature 'anlz'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
## S4 method for signature 'ANY'
check_nifti(
x,
reorient = FALSE,
allow.array = FALSE,
fast = FALSE,
need_header = TRUE,
...
)
x |
character path of image or an object of class nifti, or array |
reorient |
(logical) passed to |
allow.array |
(logical) Are array types allowed (TRUE) or should there be an error if the object is not character or class nifti. |
fast |
if |
need_header |
if |
... |
additional arguments to pass to |
nifti object or array if allow.array=TRUE and x is an array
John Muschelli muschellij2@gmail.com
readnii
x = nifti()
check_nifti(x)
set.seed(5)
dims = rep(10, 4)
arr = array(rpois(prod(dims), lambda = 2), dim = dims)
nim = oro.nifti::nifti(arr)
check_nifti(nim)
check_nifti(as.anlz(nim))
testthat::expect_error(check_nifti(arr, allow.array = FALSE))
tfile = tempimg(nim)
check_nifti(c(tfile, tfile))
check_nifti(list(tfile, tfile))
check_nifti(factor(c(tfile, tfile)))
check_nifti(RNifti::readNifti(tfile))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.