Recently, I am focusing on using big data like ADNI to explore white matter fiber tractography in different groups. I used Mrtrix3 (iFOD2) to generate the whole brain fiber tractography (whole_tract.tck). After that, I used ‘tckconvert‘ command to convert the ‘whole_tract.tck‘ to ‘whole_tract.vtk‘. Then I used the WMA package ( whitematteranalysis | White matter tractography clustering and more… ) to register ‘whole_tract.vtk‘ onto ORG-atlas (registration_atlas.vtk). I have tried to used both “rigid-affine” and “affine + nonrigid“ registration methods, but the results shown in Figure 2 looks like the commissural fibers not following the pattern of corpus callosum. I am not sure what’s wrong with it. My codes are as follows:
In addition, I tried to do the tract-specific voxel-wise analysis, is it possible to realize it technically?
I tried to generate the different fiber tracts using WMA, and then register the individual fiber tract onto the template, and using the common mask to extract the voxel-wise DTI metrics. It looks a bit different from TBSS. But now, I need to solve the mismatching problem between the template T1.nii.gz and the registered fiber tracts.
I am appreciated that if anyone can give some suggestions.
I have resolved the issue of transforming .tck files from individual space to template (ORG) space. My solution is as follows:
(1) First, we performed skull stripping on the T1w2dwispace.nii.gz image to obtain T1w2dwispace_brain.nii.gz.
(2) The skull-stripped image (T1w2dwispace_brain.nii.gz) was then registered to the T1_ORG_template.nii.gz using ANTs, yielding the transformation files (T1w2dwi_toTemplate_0GenericAffine.mat and T1w2dwi_toTemplate_1Warp.nii.gz).
(3) The resulting transformations were subsequently applied to the .tck files using tcktransform. However, due to differences between ANTs and MRtrix3 in how spatial transformations are represented and applied, additional conversion steps are required to ensure compatibility. A sample implementation is provided below for reference:
#!/usr/bin/env bash
set -euo pipefail
SUBJ_ROOT="your_path"
ANTS_DIR="${SUBJ_ROOT}/ANTs_toTemplate"
TCK_IN="${SUBJ_ROOT}/your_tck_path/T_CC1.tck"
# Your ORG template path
TEMPLATE_IMG="/path/to/T1_ORG_template.nii.gz"
OUT_DIR="${SUBJ_ROOT}/warp_to_template"
mkdir -p "${OUT_DIR}"
cd "${OUT_DIR}"
echo "Step 1: create identity warp in template space"
warpinit "${TEMPLATE_IMG}" template_id_warp[].nii.gz
echo "Step 2: warp identity components into moving space using ANTs inverse transforms"
for i in 0 1 2; do
antsApplyTransforms -d 3 \
-i template_id_warp${i}.nii.gz \
-r "${ANTS_DIR}/T1w2dwispace_inTemplate.nii.gz" \
-o mrtrix_warp_component${i}.nii.gz \
-t [${ANTS_DIR}/T1w2dwi_toTemplate_0GenericAffine.mat,1] \
-t ${ANTS_DIR}/T1w2dwi_toTemplate_1InverseWarp.nii.gz
done
echo "Step 3: correct / combine into MRtrix deformation field"
warpcorrect mrtrix_warp_component[].nii.gz mrtrix_tck_deformation.mif
echo "Step 4: transform tractography"
tcktransform "${TCK_IN}" mrtrix_tck_deformation.mif T_CC1_inTemplate.tck
echo "Done."
echo "Output tract: ${OUT_DIR}/T_CC1_inTemplate.tck"
I hope this will help others who have faced the same issue.