Streamline Density Normalization
Project description
Streamline Density Normalization (SDNorm)
Overview
SDNorm is a supervised method for reducing bundle variability by normalizing streamline density.
Prerequisites
- Python (version 3.9+)
- Poetry (official installation instructions)
Installation
git clone https://github.com/wendyfyx/SDNorm.git
cd SDNorm
poetry install
# OR
pip install .
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.
poetry run 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
poetry 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
poetry run sdnorm_template -i your-folder/sub-*_AF_L.nii.gz \
-o AF_L_template.nii.gz \
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sdnorm-0.1.0.tar.gz.
File metadata
- Download URL: sdnorm-0.1.0.tar.gz
- Upload date:
- Size: 10.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0860769b2eb54fcbe2d2c8e9ff428a48599cdcd28668715bb6b3e52759ac867a
|
|
| MD5 |
6d81321214e07ec87c03e9008ffd2f2f
|
|
| BLAKE2b-256 |
a8f833123343f48f617a6152c09537ad0be2650b5327a3d7dc529534b780b4bf
|
File details
Details for the file sdnorm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sdnorm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152ca02d7e79fb023c54e06fa3cd28fec96dac795cbfe59e4ebafcd4ed5eb3f6
|
|
| MD5 |
0f8ed31d5055d881cd7c3b2bf10e5035
|
|
| BLAKE2b-256 |
a42f83379d1e76893e1bed1fce044527b6b0802e9128dde1b3941d22b543fa01
|