{"id":37702278,"url":"https://github.com/masilab/vss_fmri","last_synced_at":"2026-01-16T13:01:16.411Z","repository":{"id":250908627,"uuid":"833843157","full_name":"MASILab/vss_fmri","owner":"MASILab","description":"Vasculature-informed spatial smoothing for fMRI","archived":false,"fork":false,"pushed_at":"2025-04-18T16:42:27.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T05:37:55.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MASILab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T21:52:13.000Z","updated_at":"2025-04-18T16:42:30.000Z","dependencies_parsed_at":"2024-07-30T20:11:26.231Z","dependency_job_id":null,"html_url":"https://github.com/MASILab/vss_fmri","commit_stats":null,"previous_names":["masilab/vss_fmri"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MASILab/vss_fmri","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fvss_fmri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fvss_fmri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fvss_fmri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fvss_fmri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MASILab","download_url":"https://codeload.github.com/MASILab/vss_fmri/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fvss_fmri/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T13:01:15.811Z","updated_at":"2026-01-16T13:01:16.406Z","avatar_url":"https://github.com/MASILab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vasculature-informed spatial smoothing for fMRI\nVasculature-informed spatial smoothing (VSS) filter for functional magnetic resonance imaging (fMRI) based on susceptibility-weighted imaging (SWI).\n\n![vss_graphical_abstract](https://github.com/user-attachments/assets/e1ff8c87-1000-45c6-9863-4b31578a5cc1)\n\n## Installation\nClone this repo and navigate to the downloaded directory. Use [conda](https://docs.conda.io/en/latest/) to create a Python environment with the specified requirements:\n\n```bash\nconda env create --name vss_fmri -f environment.yml\n```\n\nInstall the vss_fmri package locally using pip:\n\n```bash\npip install .\n```\n\n## Usage\nTo perform vasculature-informed spatial smoothing, you will need peak vasculature directions generated from SWI. We used a Frangi filter (see [an example MATLAB function here](https://www.mathworks.com/matlabcentral/fileexchange/24409-hessian-based-frangi-vesselness-filter)) to search for vessel-like structures and provide vasculature directions from the principal component of the Hessian filter. See our paper for details.\n\nTo use the vasculature-informed spatial smoothing filter, see the provided ```apply_vss_filter.py```.\n\n```bash\ndata_dir=\"/path/to/data/dir\"\nwm_peaks=\"$data_dir/wm_peaks.nii.gz\"\nwm_mask=\"$data_dir/wm_mask.nii.gz\"\ninput_fmri=\"$data_dir/fmri_reg_to_hcp.nii.gz\"\noutput_fmri=\"$data_dir/fmri_filtered.nii.gz\"\nadj_matrix=\"$data_dir/adj_matrix_5x5x5_0.9.npz\"\n\n# Apply filter\npython apply_vss_filter.py \\\n    --peaks $wm_peaks \\\n    --wm_mask $wm_mask \\\n    --adj_matrix $adj_matrix \\\n    --fmri_data $input_fmri \\\n    --output $output_fmri \\\n    --n 5 \\\n    --alpha 0.8 \\\n    --beta 50 \\\n    --n_jobs 15\n```\n\nWe also provide code for diffusion-informed spatial smoothing (DSS), originally introduced by [Abramian et al](https://doi.org/10.1016/j.neuroimage.2021.118095). To use the diffusion-informed spatial smoothing filter, see ```apply_dss_filter.py```.\n\n```bash\ndata_dir=\"/path/to/data/dir\"\nodf_sh=\"$data_dir/odf_sh.nii.gz\"\nwm_mask=\"$data_dir/wm_mask.nii.gz\"\ninput_fmri=\"$data_dir/fmri_reg_to_hcp.nii.gz\"\noutput_fmri=\"$data_dir/fmri_filtered.nii.gz\"\nadj_matrix=\"$data_dir/adj_matrix_5x5x5_0.9.npz\"\n\n# Apply filter\npython apply_dss_filter.py \\\n    --odf_sh $odf_sh \\\n    --wm_mask $wm_mask \\\n    --adj_matrix $adj_matrix \\\n    --fmri_data $input_fmri \\\n    --output $output_fmri \\\n    --sh_format tournier \\\n    --n 5 \\\n    --alpha 0.8 \\\n    --beta 50 \\\n    --n_jobs 15\n```\n\n## Citation\nThe code is released under the MIT License.\n\nIf you use the filters in your research, please cite the following:\n\nVasculature-informed spatial smoothing filter:\n\u003e Adam M. Saunders, Michael E. Kim, Kurt G. Schilling, John C. Gore, Bennett A. Landman, and Yurui Gao. Vasculature-informed spatial smoothing of white matter functional magnetic resonance imaging. SPIE Medical Imaging: Image Processing, 2025, February, San Diego, California. [https://doi.org/10.1117/12.3047240](https://doi.org/10.1117/12.3047140).\n\nDiffusion-informed spatial smoothing filter:\n\u003e David Abramian, Martin Larsson, Anders Eklund, Iman Aganj, Carl-Fredrik Westin, Hamid Behjat. Diffusion-informed spatial smoothing of fMRI data in white matter using spectral graph filters. NeuroImage, 2021. https://doi.org/10.1016/j.neuroimage.2021.118095.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fvss_fmri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasilab%2Fvss_fmri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fvss_fmri/lists"}