Learn R Programming

fMRItools

fMRItools is a collection of routines for processing fMRI data.

Copy Link

Version

Install

install.packages('fMRItools')

Monthly Downloads

325

Version

0.7.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Amanda Mejia

Last Published

December 23rd, 2025

Functions in fMRItools (0.7.2)

dct_bases

Generate cosine bases for the DCT
color_palette

Color palette
carpetplot_stack

Stacked carpetplot
coordlist_to_vol

Convert coordinate list to 3D array
expand_RPs

Expand realignment parameters (RPs)
erode_mask_vol

Erode 3D mask
crop_vol

Crop a 3D array
dct_convert

DCT and frequency conversion
cor_mat

Un-vectorize correlation matrix
dice_overlap

Dice overlap
mat2UT

Matrix to Upper Triangular Vector
match_exactly

Do these character vectors match exactly?
dilate_mask_vol

Dilate 3D mask
colCenter

Center matrix columns
fsl_bptf

bptf function from FSL
is_1

Is this object the expected data type, and length one?
get_FORMAT

Get FORMAT from format
nuisance_regression

Nuisance regression
dual_reg_parc

Multiple regression for parcel data
dual_reg

Dual Regression
norm_BOLD

Normalize BOLD data
format_data

Format data for pscrub and CompCor
format_path

Format a path
fMRItools

fMRItools: Routines for Common fMRI Processing Tasks
despike_3D

3dDespike from AFNI
mean_squares

Compute mean squares from variance decomposition
match_input

Match user inputs to expected values
skew_pos

Positive skew?
is.fname

Is this an existing file path?
sys_path

despike_3D.qreg

3dDespike from AFNI, step 1
is_constant

Is this numeric vector constant?
despike_3D.interpolate

3dDespike from AFNI, step 2
is_integer

Is this an integer?
temporal_filter

Temporal filtering (bandpass, highpass, lowpass) with DCT or FFT
get_kwargs

Get kwargs
pad_vol

Pad 3D Array
hat_matrix

Hat matrix
image_scale

image_scale
get_NIFTI_ROI_masks

Get NIFTI ROI masks
sum_neighbors_vol

Sum of each voxel's neighbors
noise_Params

noise parameters for CompCor
merge_kwargs

Merges two kwargs
vox_locations

Get coordinates of each voxel in a mask
pct_sig

Convert data values to percent signal.
scale_med

Robust scaling
scale_design_mat

Scale a design matrix
var_decomp

Compute variance decomposition
plot_FC

Plot FC
sign_flip

Sign match ICA results
fft_detrend

FFT detrending
infer_format_ifti_vec

Infer fMRI data format for several inputs
unvec_vol

Convert vectorized data back to volume
read_nifti

Wrapper to functions for reading NIFTIs
scale_timeseries

Scale the BOLD timeseries
infer_format_ifti

Infer fMRI data format
is_posNum

Is this object a positive number? (Or non-negative)
plot_FC_gg

Plot FC with ggplot2
unmask_mat

Unmask matrix data
make_mask

Create a mask based on vertices that are invalid
rowMedians2

Row medians
unvec_mat

Transform vector data to image
validate_design_mat

Validate design matrix
CompCor.noise_comps

CompCor: get noise components
all_integers

All integers?
as.matrix_ifti

Convert CIFTI, NIFTI, or GIFTI input to \(T \times V\) matrix
bandstop_filter

Bandstop filter
all_binary

All binary?
PCA

PCA for tall matrix
Mode

Mode of data vector
UT2mat

Upper Triangular Vector to Matrix
CompCor_HCP

Anatomical CompCor for HCP NIFTI and CIFTI data
CompCor

Anatomical CompCor
carpetplot

Carpetplot
check_req_ifti_pkg

Check required packages for the data format
data_CompCor_Params

fMRI data for scrub and CompCor