read_cifti | R Documentation |
Read in a CIFTI file as a "xifti"
object.
read_cifti(
cifti_fname = NULL,
surfL_fname = NULL,
surfR_fname = NULL,
brainstructures = "all",
idx = NULL,
resamp_res = NULL,
resamp_method = c("barycentric", "adaptive"),
areaL_original_fname = NULL,
areaR_original_fname = NULL,
flat = FALSE,
mwall_values = c(NA, NaN),
verbose = FALSE,
...
)
readCIfTI(
cifti_fname = NULL,
surfL_fname = NULL,
surfR_fname = NULL,
brainstructures = "all",
idx = NULL,
resamp_res = NULL,
resamp_method = c("barycentric", "adaptive"),
areaL_original_fname = NULL,
areaR_original_fname = NULL,
flat = FALSE,
mwall_values = c(NA, NaN),
verbose = FALSE,
...
)
readcii(
cifti_fname = NULL,
surfL_fname = NULL,
surfR_fname = NULL,
brainstructures = "all",
idx = NULL,
resamp_res = NULL,
resamp_method = c("barycentric", "adaptive"),
areaL_original_fname = NULL,
areaR_original_fname = NULL,
flat = FALSE,
mwall_values = c(NA, NaN),
verbose = FALSE,
...
)
read_xifti(
cifti_fname = NULL,
surfL_fname = NULL,
surfR_fname = NULL,
brainstructures = "all",
idx = NULL,
resamp_res = NULL,
resamp_method = c("barycentric", "adaptive"),
areaL_original_fname = NULL,
areaR_original_fname = NULL,
flat = FALSE,
mwall_values = c(NA, NaN),
verbose = FALSE,
...
)
cifti_fname |
File path to a CIFTI file (ending in ".d*.nii"). |
surfL_fname |
(Optional) File path to a GIFTI surface geometry file representing the left cortex. |
surfR_fname |
(Optional) File path to a GIFTI surface geometry file representing the right cortex. |
brainstructures |
Character vector indicating which brain structure(s)
to obtain: If a brain structure is indicated but does not exist in the CIFTI file, a warning will occur and that brain structure will be skipped. |
idx |
Numeric vector indicating the data indices (columns) to read. If
For high-resolution CIFTI files, reading in only a subset of the data saves memory, but will be slower than reading in the entire file due to the required intermediate steps. |
resamp_res |
Resolution to resample the cortical data and surface to.
Default: |
resamp_method |
While adaptive resampling is recommended for metric or label
data, it requires that Note that surfaces will resampled using barycentric resampling regardless of
|
areaL_original_fname , areaR_original_fname |
File paths to the surfaces
to use for vertex area correction during adaptive resampling. (Only used if
resampling with the adaptive method.) For resampling: the Workbench command for adaptive resampling requires the
target surfaces for area correction too. But to make the workflow easier,
For remapping: |
flat |
Should the result be flattened into a single matrix? If If If |
mwall_values |
If the medial wall locations are not indicated in the
CIFTI, use these values to infer the medial wall mask. Default:
|
verbose |
Should occasional updates be printed? Default: |
... |
Additional arguments to |
First, metadata is obtained with info_cifti
. Then, if no
resampling is requested, the -cifti-convert -to-gifti-ext
Workbench
Command is used to "flatten" the data and save it as a metric or label GIFTI
file, which is read in and separated by brainstructure according to the metadata
(read_cifti_convert
). Otherwise, if sampling is requested,
then the CIFTI is separated into its GIFTI and NIFTI components, resampled,
and then re-assembled (read_cifti_separate
). The former is
much faster for large CIFTI files, so the latter is only used when necessary
for resampling.
If cifti_fname
is not provided, then only the surfaces are read in.
If !flat
, a "xifti"
object. Otherwise, a T \times G
matrix (T
measurements, G
grayordinates).
This function interfaces with the "-cifti-convert"
Workbench command if
resampling is not needed, and the "-cifti-separate"
Workbench command
if resampling is needed.
xifti$meta$subcort$labels
is a factor with the following levels:
Cortex-L
Cortex-R
Accumbens-L
Accumbens-R
Amygdala-L
Amygdala-R
Brain Stem
Caudate-L
Caudate-R
Cerebellum-L
Cerebellum-R
Diencephalon-L
Diencephalon-R
Hippocampus-L
Hippocampus-R
Pallidum-L
Pallidum-R
Putamen-L
Putamen-R
Thalamus-L
Thalamus-R
These correspond to the same structures as given by
ft_read_cifti
in the cifti-matlab
MATLAB toolbox. Note that
the first two levels (left and right cortex) are not used.
Other common:
is.cifti()
,
resample_cifti()
,
smooth_cifti()
,
view_xifti()
,
write_cifti()
Other reading:
as.xifti()
,
info_cifti()
,
load_parc()
,
load_surf()
,
read_surf()
,
read_xifti2()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.