- filepath
instance of class nifti from the oro.nifti package, or a path to a NIFTI file as a character string.
- flatten
logical. Whether to flatten the return volume to a 1D vector. Useful if you know that this file contains 1D morphometry data.
- with_header
logical. Whether to return the header as well. If TRUE, return an instance of class fs.volume for data with at least 3 dimensions, a named list with entries "data" and "header". The latter is another named list which contains the header data. These header entries exist: "dtype": int, one of: 0=MRI_UCHAR; 1=MRI_INT; 3=MRI_FLOAT; 4=MRI_SHORT. "voldim": integer vector. The volume (=data) dimensions. E.g., c(256, 256, 256, 1). These header entries may exist: "vox2ras_matrix" (exists if "ras_good_flag" is 1), "mr_params" (exists if "has_mr_params" is 1). See the mghheader.* functions, like mghheader.vox2ras.tkreg, to compute more information from the header fields.
- drop_empty_dims
logical, whether to drop empty dimensions of the returned data
- do_rotate
logical, whether to rotate 3D volumes to compensate for storage order. WIP.
- reorient
logical, whether to let oro.nifti::readNIfTI reorient the data array to a standard orientation while reading it from a file. Defaults to FALSE, see the note below. Only relevant if filepath is a path, it is ignored if a nifti instance is passed. Using TRUE requires the oro.nifti package.
- ...
extra parameters passed to oro.nifti::readNIfTI. Leave this alone unless you know what you are doing. Note that reorient is passed explicitly by this function, so it cannot be set here. Passing any extra parameter makes the file be read by oro.nifti instead of by the NIFTI reader of this package, and thus requires the oro.nifti package.