Skip to content

Add DTI measures#41

Draft
valosekj wants to merge 49 commits into
mainfrom
jv/17-add_dti_measures
Draft

Add DTI measures#41
valosekj wants to merge 49 commits into
mainfrom
jv/17-add_dti_measures

Conversation

@valosekj

@valosekj valosekj commented Apr 8, 2026

Copy link
Copy Markdown
Member

This PR adds a processing script to get DTI metrics in the PAM50 space.

Dataset: spine-generic multi-subject (C2-C5 DWI; n=201 healthy subjects)

Approach:

  1. Method: Warping DTI metrics to PAM50

    • sct_register_to_template (T2w to PAM50)
    • sct_register_multimodal (PAM50 to DWI; using T2w-PAM50 as init warp)
    • sct_apply_transfo (Warp DTI maps to PAM50)
  2. Method: Interpolating DTI metrics to PAM50

More details and first results: G Slides presentation

Resolves #17

@valosekj valosekj self-assigned this Apr 8, 2026
@valosekj

Copy link
Copy Markdown
Member Author

2026-04-21 DCM norm meeting:

  • use the centerline for the initial cropping
  • use a larger mask (35mm)
  • don't use patch2self as we will do group-level figures
  • for plotting, plot one ROI per panel

@valosekj

valosekj commented May 15, 2026

Copy link
Copy Markdown
Member Author

Right now T2w -> template reg uses all discs for sct_register_to_template:

sct_register_to_template \
-i ${file_t2}.nii.gz \
-s ${file_t2_seg}.nii.gz \
-ldisc ${file_t2_seg}_labeled_discs.nii.gz \

TODO: try only 2 labels to be consistent with SCT course

valosekj added 6 commits May 15, 2026 14:00
Tests whether warping commutes with DTI computation:
  compute(warp(E1,E2,E3)) should match warp(compute(E1,E2,E3)) = warp(FA/MD/RD/AD)

- sct_dmri_compute_dti now runs with -evecs 1 to also output eigenvalues E1, E2, E3 (and eigenvectors V1, V2, V3).
- New section code warps E1, E2, E3 to PAM50, recomputes FA/MD/RD/AD via the new compute_dti_from_evals.py helper script, and extracts per-slice metrics
Reverts the SCT-course-style 2-label setup (commit 0d0b607) for consistency with previous runs. The 2-label code is kept commented out for reference.
@valosekj

valosekj commented May 20, 2026

Copy link
Copy Markdown
Member Author

Sanity check for the "warping" method suggested by @gdavidmr: warp eigenvalues from native space to template and compute DTI metrics in the template. Then compare them to the warped DTI metrics. They should be the same.

Implemented in 33b99bb. Running it rn.

UPDATE: both warped FA and FA computed from warped eigenvalues are the same: lineplot_dti_FA_perdataset

Code cleaned up in 8ca5aff

valosekj added 10 commits June 3, 2026 21:16
(sct_deepseg_sc fallback wasn't issue as I reused spine-generic derivatives; but it's a good idea to use the CAv3 model for future new T2w images)
as we decided on preprocessing steps: sct_get_centerline to create a 35mm mask for sct_dmri_moco (--metric CC) and sct_deepseg spinalcord for cord DWI seg. No denoising
for now, it was okay as I was reusing spine-generic derivatives, but for future images, let's use TTS instead of sct_label_vertebrae
@valosekj

valosekj commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

TODO Sanity check on spine-generic: compare normative curves between labels under derivatives vs automatically obtained ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DTI and MT normative values

1 participant