nifti.pbcor_mask {nifti.pbcor}R Documentation

Prepare the mask for a parcel-based correlation between NIfTI images

Description

This function creates the mask required to conduct parcel-based correlations with nifti.pbcor.

Usage

nifti.pbcor_mask(nifti, verbose = TRUE)

Arguments

nifti

an object of class "nifti" with 3D (e.g., the brain mask).

verbose

(optional) logical, whether to print some messages during execution.

Details

This function converts a NIfTI mask into the appropriate format for nifti.pbcor.

Value

A matrix with the coordinates of the mask

Author(s)

Joaquim Radua

See Also

nifti.pbcor, readNIfTI

Examples

library(oro.nifti)

# Path of the example files (with large voxels to ensure the example runs quickly)
mask_path = system.file("examples", "mask.nii.gz", package = "nifti.pbcor")
img1_path = system.file("examples", "img1.nii.gz", package = "nifti.pbcor")
img2_path = system.file("examples", "img2.nii.gz", package = "nifti.pbcor")

# Prepare the mask
mask = nifti.pbcor_mask(readNIfTI(mask_path))

# Conduct the parcel-based correlation
nifti.pbcor(readNIfTI(img1_path), readNIfTI(img2_path), mask)

[Package nifti.pbcor version 1.0 Index]