remap_cifti: Remap CIFTI data

View source: R/remap_cifti.R

remap_ciftiR Documentation

Remap CIFTI data

Description

Remap CIFTI data between two different spaces, such as between FreeSurfer fsaverage group data and fs_LR group data.

Usage

remap_cifti(
  x,
  cifti_target_fname = NULL,
  remap_method = c("adaptive", "barycentric"),
  areaL_original_fname = NULL,
  areaR_original_fname = NULL,
  areaL_target_fname = NULL,
  areaR_target_fname = NULL,
  sphereL_original_fname = NULL,
  sphereR_original_fname = NULL,
  sphereL_target_fname = NULL,
  sphereR_target_fname = NULL,
  write_dir = NULL,
  mwall_values = c(NA, NaN),
  verbose = TRUE
)

remapCIfTI(
  x,
  cifti_target_fname = NULL,
  remap_method = c("adaptive", "barycentric"),
  areaL_original_fname = NULL,
  areaR_original_fname = NULL,
  areaL_target_fname = NULL,
  areaR_target_fname = NULL,
  sphereL_original_fname = NULL,
  sphereR_original_fname = NULL,
  sphereL_target_fname = NULL,
  sphereR_target_fname = NULL,
  write_dir = NULL,
  mwall_values = c(NA, NaN),
  verbose = TRUE
)

remapcii(
  x,
  cifti_target_fname = NULL,
  remap_method = c("adaptive", "barycentric"),
  areaL_original_fname = NULL,
  areaR_original_fname = NULL,
  areaL_target_fname = NULL,
  areaR_target_fname = NULL,
  sphereL_original_fname = NULL,
  sphereR_original_fname = NULL,
  sphereL_target_fname = NULL,
  sphereR_target_fname = NULL,
  write_dir = NULL,
  mwall_values = c(NA, NaN),
  verbose = TRUE
)

remap_xifti(
  x,
  cifti_target_fname = NULL,
  remap_method = c("adaptive", "barycentric"),
  areaL_original_fname = NULL,
  areaR_original_fname = NULL,
  areaL_target_fname = NULL,
  areaR_target_fname = NULL,
  sphereL_original_fname = NULL,
  sphereR_original_fname = NULL,
  sphereL_target_fname = NULL,
  sphereR_target_fname = NULL,
  write_dir = NULL,
  mwall_values = c(NA, NaN),
  verbose = TRUE
)

Arguments

x

The CIFTI file name or "xifti" object to resample.

cifti_target_fname

File name for the resampled CIFTI. Will be placed in write_dir. If NULL, will be written to "resampled.d*.nii". write_dir will be appended to the beginning of the path.

remap_method

"adaptive" (default) or "adaptive" resampling. These options correspond to the Workbench command options "BARYCENTRIC" and "ADAP_BARY_AREA", respectively.

For remapping fs_LR group data to fsaverage, barycentric should be used. For remapping FreeSurfer fsaverage group data to fs_LR, adaptive should be used.

areaL_original_fname, areaL_target_fname

File paths to the left cortex surfaces to use for vertex area correction during adaptive resampling. Required if remap_method is "adaptive".

areaR_original_fname, areaR_target_fname, sphereR_original_fname, sphereR_target_fname

See the corresponding arguments for the left cortex.

sphereL_original_fname, sphereL_target_fname

File paths to the sphere surfaces in the original and target spaces, for the left cortex.

write_dir

Where to write the resampled CIFTI (and surfaces if present.) If NULL (default), will use the current working directory if x was a CIFTI file, and a temporary directory if x was a "xifti" object.

mwall_values

If the medial wall locations are not indicated in the CIFTI, and if ROIcortexL/R_original_fname is not provided, then use these values to infer the medial wall mask. Default: c(NA, NaN). If NULL, do not attempt to infer the medial wall.

Correctly indicating the medial wall locations is important for remapping, because the medial wall mask is taken into account during remapping calculations.

verbose

Should occasional updates be printed? Default: TRUE.

Details

Can accept a "xifti" object as well as a path to a CIFTI-file. If the input "xifti" object has surface geometry, it will be removed.

This function is in active development: its arguments and behavior may change greatly in future versions of the package.

See Also

Other manipulating xifti: add_surf(), apply_parc(), apply_xifti(), combine_xifti(), convert_to_dlabel(), merge_xifti(), move_to_mwall(), move_to_submask(), newdata_xifti(), remove_xifti(), resample_cifti(), resample_cifti_from_template(), scale_xifti(), select_xifti(), set_names_xifti(), smooth_cifti(), transform_xifti()


ciftiTools documentation built on Oct. 4, 2024, 1:12 a.m.