A Python package for resting-state fMRI analysis.
- Seed-based functional connectivity analysis
- Spherical ROI creation
- Brain metrics calculation (ALFF, fALFF, ReHo)
Clone the repository
git clone https://github.com/yourusername/restpy.gitNavigate to the directory
cd restpyInstall the package
pip install -e .from restpy import (
compute_seed_based_connectivity,
create_spherical_roi,
compute_alff,
compute_falff,
compute_reho
)Create ROI
roi_masker, roi_img = create_spherical_roi(
coords=(-45, 0, 56), # MNI coordinates
radius=8,
target_img="func.nii.gz"
)Compute functional connectivity
fc_map = compute_seed_based_connectivity(
seed_img="seed.nii.gz",
func_img="func.nii.gz"
)Calculate brain metrics
alff_img = compute_alff("func.nii.gz")
falff_img = compute_falff("func.nii.gz")
reho_img = compute_reho("func.nii.gz")