Skip to main content

Streamline Density Normalization

Project description

Streamline Density Normalization (SDNorm)

Overview

SDNorm (preprint) is a supervised method for reducing bundle variability by normalizing streamline density. We show that SDNorm can

  • Reduce variability in streamline density
  • Improve consistency in along-tract microstructure profiles
  • Provide useful metrics for automated bundle quality control

Installation

pip install SDNorm

Running SDNorm

To run SDNorm, the input bundle must be in the same space as the template map and they do not need to be in the MNI space. For testing purposes, we provided the template maps of 10 bundles in MNI space (1mm voxel size) used in our paper in test_data/templates_mni, and an example AF_L bundle in the same space. We recommend warping template maps to the subject space and running SDNorm there.

sdnorm -i test_data/AF_L.trk \
      -temp test_data/templates_mni/AF_L_template_dm.nii.gz \
      -o test_data/sdnorm_outputs/AF_L_sdnorm.trk \
      -ow test_data/sdnorm_outputs/AF_L_sdnorm_weights.txt \
      -oi test_data/sdnorm_outputs/AF_L_sdnorm_indices.txt \
      -or test_data/sdnorm_outputs/AF_L_sdnorm_report.json \
      -lambda 0.001 -espd 8 -step 0.5

If you already ran SDNorm, but want to prune bundles with different parameters without refitting the model, you can run

sdnorm_prune -i test_data/AF_L.trk \
            -w test_data/sdnorm_outputs/AF_L_sdnorm_weights.txt \
            -temp test_data/templates_mni/AF_L_template_dm.nii.gz \
            -o test_data/sdnorm_outputs/AF_L_sdnorm_2.trk \
            -oi test_data/sdnorm_outputs/AF_L_sdnorm_indices_2.txt \
            -espd 12 -step 0.5

but make sure you save the streamline weights when you first run SDNorm!

To create your own template maps, you can create some density maps from extract bundles using dipy.tracking.utils.density_map. Then run this command to generate the template map

sdnorm_template -i your-folder/sub-*_AF_L.nii.gz \
                -o AF_L_template.nii.gz \
AF_L before SDNorm
AF_L after SDNorm with eSPD=8
AF_L after SDNorm with eSPD=12

Cite SDNorm

@misc{feng_streamline_2025,
	title = {Streamline {Density} {Normalization}: {A} {Robust} {Approach} to {Mitigate} {Bundle} {Variability} in {Multi}-{Site} {Diffusion} {MRI}},
	copyright = {http://creativecommons.org/licenses/by-nc-nd/4.0/},
	shorttitle = {Streamline {Density} {Normalization}},
	url = {http://biorxiv.org/lookup/doi/10.1101/2025.08.18.670965},
	doi = {10.1101/2025.08.18.670965},
	language = {en},
	urldate = {2025-08-25},
	author = {Feng, Yixue and Shuai, Yuhan and Villalón-Reina, Julio E. and Chandio, Bramsh Q. and Thomopoulos, Sophia I. and Nir, Talia M. and Jahanshad, Neda and Thompson, Paul M.},
	month = aug,
	year = {2025},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdnorm-0.1.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdnorm-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file sdnorm-0.1.1.tar.gz.

File metadata

  • Download URL: sdnorm-0.1.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.9.7 Linux/5.14.0-427.13.1.el9_4.x86_64

File hashes

Hashes for sdnorm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a33f1a3aae2c702e1b6a2eac17b3a46d1653b67b6703eb5758fbe92608ac84d2
MD5 af7b2fafcfedce4e7e768465892b25aa
BLAKE2b-256 8c42c42cd659e39334435548de598c1a7a0e7e88d2088d4b11973c0f69900f7d

See more details on using hashes here.

File details

Details for the file sdnorm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sdnorm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.9.7 Linux/5.14.0-427.13.1.el9_4.x86_64

File hashes

Hashes for sdnorm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a0058541c2b7919fb10a31577abe74e82d93068c4551ba99a532ad5f390ea40
MD5 da7d5d604b2e5613ec4fa02ae9160c7c
BLAKE2b-256 cc2659ede85a891aab3cb4552c82855ccda692a7509f5ae5b68f21b17aecd5a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page