Tractography package for MR's DWIs
Project description
PyTracts
Tractography pipeline:
- Tractography pipeline assuming DWI image had already been preprocessed.
- Generate Fractional anisotrophy (FA) image for further group analysis (for more information, see Mrtrix3's dwi2tensor).
- Estimate tissue response function to be used by the deconvolution algorithm (for more information, see Mrtrix3 documentation)
- Estimate fiber orientation distributions using spherical deconvolution (for more informatin, see Mrtrix3's dwi2fod)
- Generate streamlines using iFOD2 algorithm (implamented by Mrtrix3's tckgen).
Mrtrix3's documentation regarding the algortihm:
" iFOD2 (default): Second-order Integration over Fiber Orientation Distributions. A probabilistic algorithm that takes as input a Fiber Orientation Distribution (FOD) image represented in the Spherical Harmonic (SH) basis. Candidate streamline paths (based on short curved “arcs”) are drawn, and the underlying (trilinear-interpolated) FOD amplitudes along those arcs are sampled. A streamline is more probable to follow a path where the FOD amplitudes along that path are large; but it may also rarely traverse orientations where the FOD amplitudes are small, as long as the amplitude remains above the FOD amplitude threshold along the entire path."
- note that the algorithm used may change in futuer versions, as different algorithms perform better for different acusitions and data.
- Converting streamlines from .tck format to the more widely used .trk format.
- note that the pipeline assumes that all images and data are organized according to recently published PyPrep packages's output. for moer information, see PyPrep
Tracts_processing module:
Perform a complete pipeline aimed at producing streamlines from a preprocessed DWI image.
Generate_Tracts_with_Mrtrix3:
Use mostly Mrtrix3's functions and tools to produce streamlines from a preprocessed DWI image.
Initiate the streamlines generator class with either a specific subject or None = all subjects (default)
- Arguments:
- mother_dir {Path} -- [Path to a PyPrep derivatives (output) directory. (should contain0 "mother_dir/sub-xx")]
- Keyword Arguments:
- subj {str} - ["sub-xx" got specific subject or None for all subjects] (default: {None})
Usage:
>>> from NetworksPlasticity.code import Tracts_processing
>>> from pathlib import Path
>>> tracts = Tracts_processing.Generate_Tracts_with_Mrtrix3(
mother_dir = Path("/path/to/your/derivatives_dir"),
subj = "sub-01",
)
- note that the {mother_dir} directory must contain subdirectories with names such as "sub-XX"
>>> tracts.run()
Output:
- derivatives/
- sub-01/
- dwi/
- fmap/
- anat/
- scripts/
- atlases/
- func/
- tractography/ (--> newly created directory, containing all tractography-related files)
- FOD_wm.mif
- response_wm.txt
- seeds.tsv
- FOD_gm.mif
- dti.mif
- fa.mif
- tractogram.tck
- FOD_csf.mif
- tractogram.trk
- response_gm.txt
- response_csf.txt
- sub-02/
- dwi/
- fmap/
- anat/
- scripts/
- atlases/
- func/
- tractography/
- .
- .
- .
- sub-01/
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 PylabberTracts-0.0.1.tar.gz.
File metadata
- Download URL: PylabberTracts-0.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54b75ead487ce9277de2e8894b7c762fc62ce659ad1eaefcba0e9f3593839084
|
|
| MD5 |
afae61b6832b6594f6ffb228463ffbe5
|
|
| BLAKE2b-256 |
345c5a4e410d6fde357c73e35ca8f4c8f7e661ae4080ec064c172fa215897617
|
File details
Details for the file PylabberTracts-0.0.1-py3-none-any.whl.
File metadata
- Download URL: PylabberTracts-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39ceca4d7bf1058022f1f4b306692dd0efcf28ef6a2caebe1a198db009ece18f
|
|
| MD5 |
808b78a9a8ba03fb3dfa13c9faf267eb
|
|
| BLAKE2b-256 |
18dc8708ec0b0b5cab300702e2c82fbf96d3ded0358032642a959aee748b1bc7
|