MIC-DKFZ / TractSeg

Automatic White Matter Bundle Segmentation
Apache License 2.0
222 stars 74 forks source link

Boundles output empty or not well segmented #245

Open DonatellaFracassi opened 1 year ago

DonatellaFracassi commented 1 year ago

Hello TractSeg community, I've downloaded TractSeg through docker and I'm trying to use it on some non HCP dti data. The results aren't optimal as many of the boundles are indeed empty and the others are not well reconstructed. Therefore I wonder if I might be missing something or miss-using the tool.

As the data isn't HCP I should first register it to MNI template and I found the commands to be such: calc_FA -i Diffusion.nii.gz -o FA.nii.gz --bvals Diffusion.bvals --bvecs Diffusion.bvecs --brain_mask nodif_brain_mask.nii.gz
flirt -ref tractseg/tractseg/resources/MNI_FA_template.nii.gz -in FA.nii.gz -out FA_MNI.nii.gz -omat FA_2_MNI.mat -dof 6 -cost mutualinfo -searchcost mutualinfo flirt -ref tractseg/tractseg/resources/MNI_FA_template.nii.gz -in Diffusion.nii.gz -out Diffusion_MNI.nii.gz -applyxfm -init FA_2_MNI.mat -dof 6 cp Diffusion.bvals Diffusion_MNI.bvals rotate_bvecs -i Diffusion.bvecs -t FA_2_MNI.mat -o Diffusion_MNI.bvecs
I wonder which should be the nodif_brain_mask.nii.gz to give as input and where to get it. Furthermore, having first ran the tool without MNI registration by mistake, I tried using the obtained nodif_brain_mask.nii.gz mask and the command calc_FA runs with no errors but giving no output too.

I've noticed the flag --preprocess can be add to the TractSeg command to first register to MNI space and used this command: TractSeg -i Diffusion.nii.gz --raw_diffusion_input --preprocess which runs well but outputs are such as described above.

I'd like to know if the 3 commands above are equivalent to the use of the --preprocess flag to register to MNI space, and if I might have done something wrong to explain the non optimal results.

Thank you all in advance.

wasserth commented 1 year ago

Hi, the --preprocess flag should basically do the same as the 3 commands above. If you results look very bad you can try the following: https://github.com/MIC-DKFZ/TractSeg#my-output-segmentation-does-not-look-like-any-bundle-at-all

DonatellaFracassi commented 1 year ago

Thank you very much @wasserth. It worked out well!