funROI Documentation
The funROI (FUNctional Region Of Interest) toolbox is designed to provide robust analytic methods for fMRI data analyses that accommodate inter-subject variability in the precise locations of functional activations. Unlike conventional voxel-wise group analyses, this toolbox implements the subject-specific functional localization approach, which does not assume strict voxel correspondence across individuals (see, e.g., Saxe et al, 2006; Fedorenko et al, 2010).
The funROI Toolbox supports several types of analyses:
Parcel generation: generates parcels (brain masks) based on individual activation maps, which can serve as a spatial constraint for subsequent subject-level analyses. (This step can be skipped if you already have parcels of interest).
fROI definition: defines functional regions of interest (fROIs) by selecting a subset of functionally responsive voxels within predefined parcels.
Effect estimation: extracts average effect sizes for each subject-specific fROI.
Spatial correlation estimation: quantifies the similarity of within-subject activation patterns across conditions (within either a parcel or an fROI).
Spatial overlap estimation: calculates the overlap between parcels and/or fROIs from different subjects or definitions.
The funROI Toolbox is compliant with the Brain Imaging Data Structure (BIDS), a standardized framework for organizing and sharing neuroimaging data. For more details on BIDS, visit their official website.
The toolbox builds on top of the nilearn package for analyzing fMRI data and follows the same object-oriented code design principles.
For more information, see the demo at the end of the page on how to use the toolbox. The demo will guide you step by step through setting up an analysis, running different types of subject-specific analyses, and interpreting the output. Full toolbox documentation can be accessed here.
Installation
We recommend that you install funROI in a virtual Python environment. To create a conda environment:
conda create -n funroi python=3.12
conda activate funroi
pip install funroi
Alternatively, with venv:
python -m venv funroi
source funroi/bin/activate
pip install funroi
Using independent data
To prevent double dipping (Kriegeskorte et al, 2009), the toolbox implements strict data separation principles for different analyses in the pipeline. Specifically, the data used to define fROIs must be independent from the data used to estimate effect sizes or spatial correlation for those fROIs. In practice, this is done by using different runs to define fROIs and to conduct subsequent analyses on those fROIs.
We also recommend that the data used to define parcels should come from different subjects than the subjects used for fROI analyses that use those parcels, although this constraint is not implemented in the toolbox.
Pre-existing parcels
Instead of deriving the parcels yourself (a procedure that requires data from a relatively large number of subjects), you can use already existing anatomical or functionally derived parcels. Some sample parcels for the language network, multiple demand network, and high-level visual areas are available here courtesy of Evlab and Kanwisher Lab at MIT.
Acknowledgements
This toolbox implements the parcel definition, fROI definition, and fROI effect size estimation methods described in Fedorenko et al. (2010). It builds heavily on the spm_ss toolbox, which provides a Matlab-based implementation for fROI analyses. We thank Alfonso Nieto-Castañon and Ev Fedorenko for developing these methods.
How to Cite
If you use funROI in your research or other work, please cite it as follows:
Gao, R., & Ivanova, A. A. (2025). funROI: A Python package for functional ROI analyses of fMRI data (Version 1). Figshare. https://doi.org/10.6084/m9.figshare.28120967.v1
The software is archived on Figshare. For additional citation details or alternative citation formats, please visit the Figshare repository.
Thank you for acknowledging our work!
References
Fedorenko, E., Hsieh, P. J., Nieto-Castañón, A., Whitfield-Gabrieli, S., & Kanwisher, N. (2010). New method for fMRI investigations of language: defining ROIs functionally in individual subjects. Journal of neurophysiology, 104(2), 1177-1194.
Kriegeskorte, N., Simmons, W. K., Bellgowan, P. S., & Baker, C. I. (2009). Circular analysis in systems neuroscience: the dangers of double dipping. Nature neuroscience, 12(5), 535-540.
Saxe, R., Brett, M., & Kanwisher, N. (2006). Divide and conquer: a defense of functional localizers. Neuroimage, 30(4), 1088-1096.
Demo
API Reference