Segmentation Fault with any command

installation
linux
eigen

#1

Hi,

I’ve just installed MRtrix 3.0 on my fresh installed ubuntu 16.04 using the installation guides on the site. I’m trying to use preprocessed diffusion data in ExploreDTI (DWIs+B0 output file) inside MRtrix, but any command I use with this image or even the raw DWI.nii (not preprocessed) file itself, it gives me the error of “segmentation fault (core dumped)”.

For example, I tried to run the basic DWI processing pipeline starting with this command:
dwi2mask -fslgrad subj1.bvec subj1.bval -debug subj1.nii subj1_mask.nii

This is all I get:

dwi2mask: [DEBUG] No config file found at "/etc/mrtrix.conf"
dwi2mask: [DEBUG] No config file found at ".mrtrix.conf"
dwi2mask: [INFO] opening image “subj1.nii”…
dwi2mask: [DEBUG] memory-mapping file “subj1.nii”…
dwi2mask: [DEBUG] file “subj1.nii” mapped at 0x7f24c7903000, size 872415584 (read-only)
dwi2mask: [DEBUG] unmapping file "subj1.nii"
dwi2mask: [DEBUG] sanitising image information…
dwi2mask: [DEBUG] memory-mapping file “subj1.nii”…
dwi2mask: [DEBUG] file “subj1.nii” mapped at 0x7f24c7903000, size 872415232 (read-only)
dwi2mask: [DEBUG] image “subj1.nii” loaded
dwi2mask: [DEBUG] image “subj1.nii” initialised with strides = [ 1 256 65536 16777216 ], start = 0, using indirect IO
dwi2mask: [DEBUG] initialising threads…
dwi2mask: [DEBUG] launching 20 threads “loop threads”…
dwi2mask: [ 0%] preloading data for “subj1.nii”…
dwi2mask: [DEBUG] waiting for completion of threads “loop threads”…
dwi2mask: [100%] preloading data for “subj1.nii”…
dwi2mask: [DEBUG] threads “loop threads” completed OK
dwi2mask: [100%] preloading data for "subj1.nii"
dwi2mask: [DEBUG] image “subj1.nii” initialised with strides = [ 26 6656 1703936 1 ], start = 0, using direct IO
Segmentation fault (core dumped)

If I try to use mrconvert:
mrconvert -debug subj1.nii subj1.mif

I get this:

mrconvert: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrconvert: [DEBUG] No config file found at ".mrtrix.conf"
mrconvert: [INFO] opening image “subj1.nii”…
mrconvert: [DEBUG] memory-mapping file “subj1.nii”…
mrconvert: [DEBUG] file “subj1.nii” mapped at 0x7f2726d57000, size 872415584 (read-only)
mrconvert: [DEBUG] unmapping file "subj1.nii"
mrconvert: [DEBUG] sanitising image information…
mrconvert: [DEBUG] memory-mapping file “subj1.nii”…
mrconvert: [DEBUG] file “subj1.nii” mapped at 0x7f2726d57000, size 872415232 (read-only)
mrconvert: [DEBUG] image “subj1.nii” loaded
mrconvert: [DEBUG] image “subj1.nii” initialised with strides = [ 1 256 65536 16777216 ], start = 0, using indirect IO
Segmentation fault (core dumped)

I’ll be glad to hear your solutions.

Bests,
Amir


#2

Sounds like this problem - are you using the default Ubuntu-supplied version of Eigen? The version they ship is still in beta, and we’re in the process of figuring out how to get MRtrix3 to work with it. In the meantime, the recommendation is to install the stable version of Eigen - you’ll find instructions for that in the post linked to above.


#3

Thanks jdtournier. I installed eigen using the codes you provided in the other topic and now the commands work fine. I encountered another error while running dwipreproc with -rpe_none option:

[ERROR] Could not find FSL program eddy; please verify FSL install

I have FSL 5.0.9 installed (neurodebian) and its commands work totally fine, although no “eddy” is present. I searched for eddy command (fsl5.0-eddy) but two alternatives are shown in the terminal: fsl5.0-eddy_correct, and fsl5.0-eddy_combine. I’m not sure whether the “eddy_combine” is the same as “eddy” or not.

I’ll be glad to know if there’s any solution to this.


#4

Hi Amir,

eddy_correct is an older FSL command for performing DWI eddy current correction. It operates in a considerably different manner, and does not additionally handle susceptibility-induced distortions like eddy does. This paper compares the two and reports favourably for the newer approach.

Because eddy is no longer open-source, it can no longer be provided as part of the core FSL package. It is instead provided as a separate package that needs to be installed explicitly.

Cheers
Rob


#5

Hi Rob,

Thanks. Eddy was not provided for ubuntu 16.04 till a few days ago. One more question: is there a way to find out the phase encoding of the DWI images I have? A specific command? If I do not know the acquisition protocol.

Thanks,
Amir


#6

We don’t currently extract this information from DICOMs during import, though this is something I might be looking into in the near future. You may be able to find the appropriate fields using the dcminfo command if you have access to the raw data. Otherwise, manually inspecting the b=0 images will usually give the phase encode direction away: just look for the axis along which the major image distortions occur. The exact sign of the phase encode direction (e.g. A>>P v.s. P>>A) shouldn’t actually matter for topup / eddy as far as I can tell, as long as you’re self-consistent: it just causes a negation of the calculated inhomogeneity field.