remap_gifti: Remap GIFTI metric or label data

View source: R/remap_gifti.R

remap_giftiR Documentation

Remap GIFTI metric or label data

Description

Remap GIFTI metric or label data between two different spaces, such as between FreeSurfer fsaverage group data and fs_LR group data. This function is a wrapper to resample_gifti.

Usage

remap_gifti(
  original_fname,
  target_fname,
  hemisphere = c("left", "right"),
  remap_method = c("adaptive", "barycentric"),
  area_original_fname,
  area_target_fname,
  ROIcortex_original_fname,
  ROIcortex_target_fname,
  sphere_original_fname,
  sphere_target_fname
)

Arguments

original_fname

The GIFTI file to remap.

target_fname

Where to save the remapped file.

hemisphere

"left" (default) or "right". An error will occur if the hemisphere indicated in the GIFTI metadata does not match.

remap_method

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

For remapping between fs_LR group data and FreeSurfer fsaverage group data, adaptive resampling should be used.

area_original_fname, area_target_fname

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

ROIcortex_original_fname, ROIcortex_target_fname

ROIcortex_original_fname is the name of the ROI file corresponding to original_fname. Leave as NULL (default) if not applicable. If provided, then also provide ROIcortex_target_fname to say where to write the remapped ROI file.

sphere_original_fname, sphere_target_fname

File paths to the sphere surfaces in the original and target spaces.

Value

The remapped GIFTI file name, invisibly

Connectome Workbench

This function interfaces with the "-metric-resample", "-label-resample", and/or "-surface-resample" Workbench commands, depending on the input.

See Also

Other gifting: resample_gifti(), smooth_gifti()


mandymejia/ciftiTools documentation built on Feb. 28, 2024, 11:20 a.m.