Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1304 +/- ##
==========================================
- Coverage 72.91% 72.71% -0.21%
==========================================
Files 295 295
Lines 25453 25549 +96
Branches 3567 3581 +14
==========================================
+ Hits 18560 18577 +17
- Misses 5389 5463 +74
- Partials 1504 1509 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Member
|
How does the tensor interpolation work? Linear interpolation of the 3x3 matrix? It is most likely not worth it, but I believe to interpolate a tensor you need Log-Euclidean or Riemannian interpolation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick description
DTI Tensor Tracking in scil_tracking_local_dev
Overview
The script now supports tracking from diffusion tensor imaging (DTI) data in addition to ODF-based tracking. This allows streamline tractography using the principal eigenvector of the diffusion tensor.
Usage
Tensor-based tracking
scil_tracking_local_dev.py \ --in_tensor tensor.nii.gz \ input_seed.nii.gz \ input_mask.nii.gz \ output_tractogram.trk \ --fa_threshold 0.1 \ --step_size 0.5 \ --theta 45 \ [other tracking options...]ODF-based tracking (original functionality)
scil_tracking_local_dev.py \ --in_odf odf.nii.gz \ input_seed.nii.gz \ input_mask.nii.gz \ output_tractogram.trk \ --sf_threshold 0.1 \ --step_size 0.5 \ --theta 45 \ [other tracking options...]Key Parameters for Tensor Tracking
--in_tensor
Path to the DTI tensor file (.nii.gz). The tensor must be in lower triangular format with 6 coefficients in the 4th dimension:
This is the standard format output by most DTI fitting tools including
scil_dti_metrics.py.--algo
Algorithm for direction selection:
det: Deterministic tracking (follows principal eigenvector exactly)prob: Probabilistic tracking (adds gaussian noise to eigenvector)probHow It Works
Direction Extraction: At each tracking step, the tensor is interpolated at the current position and decomposed into eigenvalues and eigenvectors.
Principal Direction: The eigenvector corresponding to the largest eigenvalue is used as the tracking direction.
Angle Constraint: The angle between consecutive steps must not exceed
theta(in degrees).Probabilistic Mode: When
--algo probis used, Gaussian noise is added to the direction to introduce variability.Tensor Format
The input tensor file must have shape
(X, Y, Z, 6)with the 6 tensor components in lower triangular order:This corresponds to the full symmetric 3x3 tensor:
Example Workflow
scil_dti_metrics.py \ dwi.nii.gz \ bvals bvecs \ --mask brain_mask.nii.gz \ --tensor tensor.nii.gz \ --fa fa.nii.gzscil_tracking_local_dev.py \ --in_tensor tensor.nii.gz \ wm_seed.nii.gz \ wm_mask.nii.gz \ tractogram.trk \ --fa_threshold 0.15 \ --algo det \ --step_size 0.5 \ --theta 45 \ --nt 1000000Comparison with ODF Tracking
Notes
...
Type of change
Check the relevant options.
Provide data, screenshots, command line to test (if relevant)
...
Checklist