VoxelWise Toolbox

Transparent fMRI analysis,
one voxel at a time.

A lightweight MATLAB toolbox for human fMRI analysis. All functions operate on a single, fixed MNI152 brain vector. No frameworks, no compiled code, no hidden steps. Purpose-built for continuous-feature, naturalistic paradigms, where conventional GLM approaches fall short. From signal preprocessing through statistical inference and visualization. In active use since 2012. Now publicly available.

84Functions
19Atlas maps
20+Publications
0Compiled files
2012Since
hippocampal_fc.m — group-level seed connectivity
1n_subj = 5; r_maps = zeros(228453, n_subj);
2seed = fmri_sub2ind(fmri_mni2sub([-24 -18 -18]));
3for s = 1:n_subj
4 [vol,~] = fmri_readnii(sprintf('sub-%02d_bold.nii',s));
5 data = fmri_vol2vect(vol); % → 228453 × T
6 data = fmri_correctmovement(data, sprintf('rp_%02d.txt',s));
7 data = fmri_detrend(data, 6);
8 data = fmri_tempsmooth(data, 4, 2); % sigma 4 s, TR 2 s
9 r_maps(:,s) = fmri_corregressor(data(seed,:)', data);
10end
11z_maps = atanh(r_maps); % variance-stabilise
12[t_map,p_map] = fmri_ttest(z_maps); % across participants
13clean = fmri_cleanclusters(p_map < 0.001 & t_map > 0, 50, 0);
14fmri_regiontable(clean, t_map, 50, 10, 1);
15fmri_braincake(t_map);
Brain map — fmri_braincake output

Architecture

Eight composable modules, 84 functions

Every module shares the same brain vector format; mix and match freely, no conversion needed. Module names and counts follow the toolbox's own Contents.m.

📂
I/O & NIfTI handling (4)
Read and write NIfTI volumes, with integrity checks on the bundled reader.
fmri_readnii · fmri_export · fmri_checknifti · fmri_tomni152
🧭
Space & reshaping (11)
Volume ↔ vector conversion, MNI ↔ voxel ↔ index coordinates, resampling, mirroring.
fmri_vol2vect · fmri_vect2vol · fmri_mni2sub · fmri_voxdist · fmri_mirror
⚙️
Temporal preprocessing (7)
Detrending, band-pass filtering, motion regression, smoothing, z-scoring, Wiener deconvolution for HRF inversion.
fmri_detrend · fmri_bandpassfilter · fmri_correctmovement · fmri_tempsmooth · fmri_wiener · fmri_doublegamma
🗺️
Atlases & regions of interest (11)
19 atlas maps via one integer-indexed interface. Masks, region lookup, voxel ↔ ROI mapping, labelled cluster tables.
fmri_loadatlas · fmri_atlas · fmri_regionmask · fmri_vox2reg · fmri_regiontable
📊
Analysis: effect estimation (10)
Voxelwise correlation with continuous regressors, lagged cross-correlation, partial correlation, PPI, representational similarity, intersubject correlation.
fmri_corregressor · fmri_xcorr · fmri_partcorr · fmri_ppi · fmri_rsa · fmri_isc
🔬
Statistical inference (16)
Voxelwise t-tests, phase-scrambling nulls, TFCE, ACF-calibrated cluster extent, cluster labelling and cleaning.
fmri_ttest · fmri_tfce · fmri_acfestimate · fmri_csdist · fmri_csthreshold · fmri_scramblephases · fmri_cleanclusters
🧪
Simulation & signal quality (5)
Synthetic 4D fMRI with analytic ground truth for validating an analysis against a known answer; image-domain and temporal SNR; contrast-to-noise ratio.
fmri_simdata · fmri_simget · fmri_snri · fmri_snrt · fmri_cnr
🖼️
Visualisation (19)
Slice mosaics, orthogonal planes, 3D isosurfaces, cortical surfaces, layered brain 'cake', rotating video.
fmri_showslices · fmri_show3d · fmri_showcortex · fmri_braincake · fmri_brainvideo

Design principles and philosophy

Born from naturalistic neuroscience

✓Uniform representation. All functions share a single 228,453-element MNI152 vector; output of any function is valid input to any other.
✓Zero compiled code. Every function is a short, readable .m file. No MEX, no black-box steps, no hidden state.
✓Naturalistic-first. Designed for continuous-feature paradigms where standard GLM pipelines don't apply.
✓No dependencies. Base MATLAB R2019a or later. No MathWorks toolboxes, and no SPM: cluster labelling is fmri_bwlabel, pure MATLAB. A patched NIfTI reader ships with the toolbox.
✓Robust cluster inference. Two complementary cluster inference approaches; empirical null distributions and TFCE: without requiring Gaussian assumptions.
✓19 bundled atlas maps. Ten sources, AAL to Craddock, all via a single integer-indexed interface.

ROI system

Nineteen atlas maps, ten sources, one interface

Several sources contribute more than one map: the Craddock parcellation at five resolutions, the cerebellar atlas in two registrations. Call fmri_atlas(n) for any of them, n = 1 to 19. No external toolbox required.

1AAL / MarsBar default116
2–3Harvard-Oxford subcortical / cortical21 / 48
4–5Cerebellar MNI152 FLIRT / FNIRT28 / 28
6JHU white matter ICBM-DTI-81 labels49
7JHU white matter tractography20
11–12Oxford-Imanova striatal connectivity 3 / connectivity 73 / 7
13Oxford thalamic connectivity probability7
14–18Craddock parcellation 200 / 400 / 600 / 800 / 950200–950
19Brodmann areas Talairach Daemon via WFU PickAtlas, cortex only47

Getting started

Install in 30 seconds

No compilation, no configuration files, no package manager.

1git clone https://github.com/iburunat/voxelwisetoolboxClone repository
2run('/path/to/VoxelWiseToolbox/fmritoolbox_setup.m')Add to MATLAB path
3fmri_atlas()            % browse all 19 mapsExplore
4demo_preprocessing      % guided walkthroughRun demo
5demo_naturalistic       % full worked pipelineGo further

Requires MATLAB R2019a or later. No MathWorks toolboxes and no SPM; the NIfTI reader is bundled.


Track record

In active use since 2012

Cited in 20+ peer-reviewed publications across leading neuroscience journals.

2020
NeuroImage
Toiviainen, Burunat, Brattico, Vuust & Alluri
2018
Scientific Reports
Saari, Burunat, Brattico & Toiviainen
2017
Human Brain Mapping
Alluri, Toiviainen, Burunat, Kliuchko, Vuust & Brattico
2014
NeuroImage
Toiviainen, Alluri, Brattico, Wallentin & Vuust
2012
NeuroImage
Alluri, Toiviainen, Jääskeläinen, Glerean, Sams & Brattico

+ 14 additional publications in Frontiers in Human Neuroscience, Cortex, PLOS ONE, Brain Sciences, and others.