3Tissue / MRtrix3Tissue

MRtrix3Tissue adds capabilities for 3-Tissue CSD modelling and analysis to a complete version of MRtrix3.
https://3Tissue.github.io
Mozilla Public License 2.0
10 stars 6 forks source link

ss3t_csd_bta is not responding #23

Closed ihattan2020 closed 4 years ago

ihattan2020 commented 4 years ago

Hi MRtrix3Tissue Experts,

I tried using ss3t_csd_beta1 out for b0+single shell but unfortunately ended up with Error (see below please).

I followed the basic pipeline here to calculate FODs map from ex vivo human spinal cord. here is the link for the pipeline I followed https://3tissue.github.io/doc/single-subject.html.

Any help or suggestion is highly appreciated.

Best,

Ibrahim s4333238@cai-wks1:/30days/s4333238/new_test_fod_dh$ dwi2response dhollander dwi_denoised_unringed_unbiased.mif -mask dwi_mask.mif response_wm.txt response_gm.txt response_csf.txt -grad gradient_4219_1500_18dir.txt dwi2response: dwi2response: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information. dwi2response: dwi2response: Generated scratch directory: /30days/s4333238/new_test_fod_dh/dwi2response-tmp-AP5KJL/ dwi2response: Importing DWI data (/30days/s4333238/new_test_fod_dh/dwi_denoised_unringed_unbiased.mif)… dwi2response: Importing mask (/30days/s4333238/new_test_fod_dh/dwi_mask.mif)… dwi2response: Changing to scratch directory (/30days/s4333238/new_test_fod_dh/dwi2response-tmp-AP5KJL/) dwi2response: ------- dwi2response: 2 unique b-value(s) detected: 0,1500 with 2,18 volumes dwi2response: ------- dwi2response: Preparation: dwi2response: Eroding brain mask by 3 pass(es)… dwi2response: [ mask: 1890787 -> 1542249 ] dwi2response: Computing signal decay metric (SDM): dwi2response: b=0… dwi2response: b=1500… dwi2response: Removing erroneous voxels from mask and correcting SDM… dwi2response: [ mask: 1542249 -> 1542249 ] dwi2response: ------- dwi2response: Crude segmentation: dwi2response: Crude WM versus GM-CSF separation (at FA=0.2)… dwi2response: [ 1542249 -> 1338350 (WM) & 203899 (GM-CSF) ] dwi2response: Crude GM versus CSF separation… dwi2response: [ 203899 -> 180085 (GM) & 23814 (CSF) ] dwi2response: ------- dwi2response: Refined segmentation: dwi2response: Refining WM… dwi2response: [ WM: 1338350 -> 1234346 ] dwi2response: Refining GM… dwi2response: [ GM: 180085 -> 114929 ] dwi2response: Refining CSF… dwi2response: [ CSF: 23814 -> 5689 ] dwi2response: ------- dwi2response: Final voxel selection and response function estimation: dwi2response: CSF: dwi2response: Selecting final voxels (10.0% of refined CSF)… dwi2response: [ CSF: 5689 -> 569 ] dwi2response: Estimating response function… dwi2response: GM: dwi2response: Selecting final voxels (2.0% of refined GM)… dwi2response: [ GM: 114929 -> 2299 ] dwi2response: Estimating response function… dwi2response: single-fibre WM: dwi2response: Selecting final voxels (0.5% of refined WM)… dwi2response: [ WM: 1234346 -> 6172 (single-fibre) ] dwi2response: * Estimating response function… dwi2response: ------- dwi2response: Generating outputs… dwi2response: ------- dwi2response: Changing back to original directory (/30days/s4333238/new_test_fod_dh) dwi2response: Deleting scratch directory (/30days/s4333238/new_test_fod_dh/dwi2response-tmp-AP5KJL/)

s4333238@cai-wks1:/30days/s4333238/new_test_fod_dh$ ss3t_csd_beta1 dwi_denoised_unringed_unbiased.mif response_wm.txt wmfod.mif response_gm.txt gm.mif response_csf.txt csf.mif -mask dwi_mask.mif ss3t_csd_beta1: ss3t_csd_beta1: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information. ss3t_csd_beta1: ss3t_csd_beta1: ------- mrinfo: [ERROR] no diffusion encoding information found in image “/30days/s4333238/new_test_fod_dh/dwi_denoised_unringed_unbiased.mif” mrinfo: [ERROR] no diffusion encoding information found in image “/30days/s4333238/new_test_fod_dh/dwi_denoised_unringed_unbiased.mif” ss3t_csd_beta1: 0 unique b-value(s) detected: with volumes

ss3t_csd_beta1: [ERROR] Need b=0 data and a single non b=0 shell. s4333238@cai-wks1:/30days/s4333238/new_test_fod_dh$ ss3t_csd_beta1 dwi_denoised_unringed_unbiased.mif response_wm.txt wmfod.mif response_gm.txt gm.mif response_csf.txt csf.mif -mask dwi_mask.mif ss3t_csd_beta1: ss3t_csd_beta1: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information. ss3t_csd_beta1: ss3t_csd_beta1: ------- mrinfo: [ERROR] no diffusion encoding information found in image “/30days/s4333238/new_test_fod_dh/dwi_denoised_unringed_unbiased.mif” mrinfo: [ERROR] no diffusion encoding information found in image “/30days/s4333238/new_test_fod_dh/dwi_denoised_unringed_unbiased.mif” ss3t_csd_beta1: 0 unique b-value(s) detected: with volumes

ss3t_csd_beta1: [ERROR] Need b=0 data and a single non b=0 shell. s4333238@cai-wks1:/30days/s4333238/new_test_fod_dh$ ss3t_csd_beta1 dwi_denoised_unringed_unbiased.mif response_wm.txt wmfod.mif response_gm.txt gm.mif response_csf.txt csf.mif -mask dwi_mask.mif -grad gradient_4219_1500_18dir.txt

Error: unrecognized arguments: -grad gradient_4219_1500_18dir.txt Usage: ss3t_csd_beta1 in_dMRI_data in_SFWM_resp out_WM_FOD in_GM_resp out_GM in_CSF_resp out_CSF [ options ] (Run ss3t_csd_beta1 -help for more information)

thijsdhollander commented 4 years ago

Hi Ibrahim,

No worries, it's relatively simple to solve. The problem is that your dwi_denoised_unringed_unbiased.mif image does not have a gradient table stored in its header. As you noticed in your last attempt though, the ss3t_csd_beta1 command currently does not offer a -grad option. The only way to provide it, is to make sure it's stored in the header upfront. You can achieve this simply via mrconvert with the 'grad' option.

Generally though, I would recommend you do this all the way at the start of your pipeline, i.e. when importing your original data. This avoids things going wrong at other points; but also it's way more convenient, since you don't have to constantly manage and provide the gradient table separately at every step. 🙂

I hope that helps!

Cheers, Thijs

ihattan2020 commented 4 years ago

Hi Thijs,

Many thanks for your help and support. Yes, as you mentioned I need the gradient in the header. I did it and working now. I'm really excited to explore your robust algorithms in human ex vivo spinal cord. I'll keep you posted.

By the way, I had a look at your fantastic published paper "Unsupervised 3-tissue response function estimation from single-shell or multi-shell diffusion MR data without a co-registered T1 image". So, I would like to plot my response function results. How I may do that to make sure they are reasonable when I compare them visually to yours.

Many Thanks once again for your continues help and support.

Cheers,

Ibrahim

thijsdhollander commented 4 years ago

Hi Ibrahim,

I'll continue the conversation offline, but in any case, visualising the response functions is possible via shview (and using left/right arrow buttons on your keyboard to swap through b-values). For the "signal decay" style plots, it's simply a matter of plotting the first column in each response function file. So for GM and CSF, that's all numbers in there, whereas for WM, that's the first number on each line (one line per b-value). I'll close the issue, and I'll be in touch. 😉

Cheers, Thijs