MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
295 stars 182 forks source link

Help ! MRtrix3 , bvecs option not found in -fslgrad #2780

Closed NEWroscientist closed 10 months ago

NEWroscientist commented 10 months ago

Hello , I am a absolute beginner to MRI data analysis. I am analysing the DWI data and i have done the denoising and degibs. Next step to do is the dwipreproc , but for that i would have to add the bvecs and bvals . so i used it like this

dwipreproc ${dwi_file} -fslgrad bvecs bvals ${dwi_fine/.mif}_proc.mif

and the error says ' bvecs not found in -fslgrad option.

Could anybody please direct me to what is wrong here also if any place for newbies like me to learn better.

Thankyou in advance

Lestropie commented 10 months ago

Hi @NEWroscientist,

The string "-fslgrad bvecs bvals" indicates that, within your current working directory, there are two text files, one called "bvecs" and one called "bvals", and you are electing to provide those as input to the command dwifslpreproc. My best interpretation of the error message you provide suggests that there is no such file called "bvals" in your current working directory. So you would need to first decide whether you do in fact need to provide such data, and if you do, find where it resides. There's some info here on diffusion scheme handling. Alternatively, if this isn't the problem, you'll need to copy the raw error message here verbatim (and also quote the software version you're using; "dwipreproc" no longer exists so you might be on an outdated version).

If you're new to not just MRI data analysis but also Unix more generally, one of the MRtrix3 devs produced a command-line tutorial many years ago that might help.

The issue listing here is generally reserved for the development rather than usage. If you check out the community forum, you should be able to find posts from others who have themselves struggled with similar initiation.

Cheers Rob

NEWroscientist commented 10 months ago

Hello @Lestropie , Thanks for the prompt response. i will surely check out the tutorials. and sorry for the incorrect command . I didnot use the dwipreproc i used mrconvert ${dwi_file} -fslgrad bvecs bvals ${dwi_fine/.nii}_cvrt.mif

and so i got the error. i have posted attached a picture for reference. Based on the picture you see any problem that i am not able to pinpoint?

Capture

Lestropie commented 10 months ago

Based on the picture you see any problem that i am not able to pinpoint?

Indeed I can. The shell syntax highlighting is the giveaway. When you specify "-fslgrad bvecs bvals", you are not printing the contents of the two initialised variables that you have called bvecs and bvals. You're just providing the strings "bvecs" and "bvals". And no files with those names exist in the working directory; they more likely exist in the directory whose location is stored in the variable "dwi_directory". More likely what you actually want is: -fslgrad ${bvecs} ${bvals}

NEWroscientist commented 10 months ago

Hello @Lestropie ,

Thanks alot that worked for the mrconvert . I was stuck at this for an entire day. so now ill use the similar syntax for extracting the b=0 and the preproc. I hope that is right, id really appreciate inputs on if this is the best approach. Thanks again :)