ciftiTools (version 0.1.6.0)

smooth_cifti: Smooth a CIFTI

Description

Smooth CIFTI data. This uses the -cifti-smoothing command from Connectome Workbench.

Usage

smooth_cifti(
  x,
  cifti_target_fname = NULL,
  surface_sigma,
  volume_sigma,
  surfL_fname = NULL,
  surfR_fname = NULL,
  cerebellum_fname = NULL,
  subcortical_zeroes_as_NA = FALSE,
  cortical_zeroes_as_NA = FALSE,
  subcortical_merged = FALSE,
  wb_path = NULL
)

smoothCIfTI( x, cifti_target_fname, surface_sigma, volume_sigma, surfL_fname = NULL, surfR_fname = NULL, cerebellum_fname = NULL, subcortical_zeroes_as_NA = FALSE, cortical_zeroes_as_NA = FALSE, subcortical_merged = FALSE, wb_path = NULL )

smoothcii( x, cifti_target_fname, surface_sigma, volume_sigma, surfL_fname = NULL, surfR_fname = NULL, cerebellum_fname = NULL, subcortical_zeroes_as_NA = FALSE, cortical_zeroes_as_NA = FALSE, subcortical_merged = FALSE, wb_path = NULL )

Arguments

x

The "xifti" object or CIFTI file to smooth.

cifti_target_fname

The file name to save the smoothed CIFTI. If NULL, will be set to a file in a temporary directory.

surface_sigma

The sigma for the gaussian surface smoothing kernel, in mm

volume_sigma

The sigma for the gaussian volume smoothing kernel, in mm

surfL_fname, surfR_fname

(Required if the corresponding cortex is present) Surface GIFTI files for the left and right cortical surface

cerebellum_fname

(Optional) Surface GIFTI file for the cerebellar surface

subcortical_zeroes_as_NA, cortical_zeroes_as_NA

Should zero-values in the subcortical volume or cortex be treated as NA? Default: FALSE.

subcortical_merged

Smooth across subcortical structure boundaries? Default: FALSE.

wb_path

(Optional) Path to Connectome Workbench folder or executable. If not provided, should be set with ciftiTools.setOption("wb_path", "path/to/workbench").

Value

The cifti_target_fname, invisibly

Connectome Workbench Requirement

This function uses a system wrapper for the 'wb_command' executable. The user must first download and install the Connectome Workbench, available from https://www.humanconnectome.org/software/get-connectome-workbench . The wb_path argument is the full file path to the Connectome Workbench folder. (The full file path to the 'wb_cmd' executable also works.)

Details

If the CIFTI is a ".dlabel" file (intent 3007), then it will be converted to a ".dscalar" file because the values will no longer be integer indices. Unless the label values were ordinal, this is probably not desired so a warning will be printed.

The input can also be a "xifti" object.

Surfaces are required for each hemisphere in the CIFTI. If they are not provided, the inflated surfaces included in "ciftiTools" will be used.