Skip to content

LeiGuo0812/restpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestPy

A Python package for resting-state fMRI analysis.

Features

  • Seed-based functional connectivity analysis
  • Spherical ROI creation
  • Brain metrics calculation (ALFF, fALFF, ReHo)

Installation

Clone the repository

git clone https://github.com/yourusername/restpy.git

Navigate to the directory

cd restpy

Install the package

pip install -e .

Usage

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")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages