View source: R/read_cifti_header.R
| cifti.stop.if.cifti | R Documentation |
The generic readers of this package dispatch on the file name, and a CIFTI
file is a NIFTI file as far as the name is concerned: read.fs.morph() used to
interpret a .dscalar.nii as a NIFTI morphometry file and silently returned the raw
matrix as a per-vertex vector (for the official Conte69 .dtseries, a 121,902 element
vector of a 60,951 x 2 matrix, i.e. plausible looking numbers in an order that means
nothing), and read.fs.volume() failed with the unrelated 'This is not a one-file
NIFTI format' message of oro.nifti. This function detects the CIFTI files and stops
with an error that names the reader to use instead, see read.cifti.
The check only costs a header read, and only for files whose name ends with .nii or
.nii.gz, since a CIFTI file always has such a name.
cifti.stop.if.cifti(filepath)
filepath |
character string, the path to a CIFTI-2 file (usually one of
|
NULL, invisibly. Stops if the file is a CIFTI file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.