Problem with dwiintensitynorm


#1

Hello all,
I am trying to implement Fibre density and cross-section - Single-tissue CSD pipeline on a Linux based cluster.
Here is the OS and MRtrix version that I’m using:

Linux node8.cluster 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

MRtrix 3.0_RC2-10-g7b4c28ab dwiintensitynorm bin version: 3.0_RC2-10-g7b4c28ab

My diffusion data were collected on a Siemens 3T Tim Trio and has 6 b0 volumes followed by 61 diffusion volumes.

I converted the nifiti files to mif format using the mrconvert command.

After running the following command:

dwiintensitynorm $1/dwiintensitynorm/dwi_input/ $1/dwiintensitynorm/mask_input/ $1/dwiintensitynorm/dwi_output/ $1/dwiintensitynorm/fa_template.nii.gz $1/dwiintensitynorm/fa_template_wm_mask.nii.gz

I receive this error:

dwiintensitynorm:
dwiintensitynorm: [ERROR] Command failed: dwinormalise /home/data/dwiintensitynorm/dwi_input/00039-03-02_CSI20160108.mif wm_mask_warped/00039-03-02_CSI20160108.mif /home/data/dwiintensitynorm/dwi_output/00039-03-02_CSI20160108.mif (dwiintensitynorm:102)
dwiintensitynorm: Output of failed command:
dwinormalise: computing 50th percentile within mask...  [==================================================]

dwinormalise: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access
dwiintensitynorm: Changing back to original directory (/home/data)
dwiintensitynorm: Script failed while executing the command: dwinormalise /home/data/dwiintensitynorm/dwi_input/00039-03-02_CSI20160108.mif wm_mask_warped/00039-03-02_CSI20160108.mif /home/data/dwiintensitynorm/dwi_output/00039-03-02_CSI20160108.mif
dwiintensitynorm: For debugging, inspect contents of temporary directory: /home/data/dwiintensitynorm-tmp-KI8710/

Any idea what’s going wrong?

PS: I tried to run dwiintensitynorm with - debug - nthread 0 switches but after 3 days of running it was still running and I had to give up.

Thank you,
Mahmoud


#2

As an update, I could finally get some results out of the dwiintensitnorm by removing some of the subjects but the output FA template does not seem to be right and it’s kinda skewed.

I appreciate any comments as I stopped at this step for a long time.

Thanks,
Mahmoud


#3

Looks like a registration problem, which is usually caused by a problem with the data. Usual suspects are artefacts in DWI data, bad masks or the absence of masks. Have a look at the FA images in the subfolder fa in your temporary directory dwiintensitynorm-tmp-* and at the transformed images and masks in the subfolder population_template. You can do this while the script is running.

The segfault in dwinormalise is a bug that might be related to the poor registration. Have a look at /home/data/dwiintensitynorm/dwi_input/00039-03-02_CSI20160108.mif and wm_mask_warped/00039-03-02_CSI20160108.mif /home/data/dwiintensitynorm/dwi_output/00039-03-02_CSI20160108.mif

You can count voxels in each mask with mrstats path_to_dwiintensitynorm-tmp/wm_mask_warped/*.mif -ignorezero -output count or just use mrview to go through them.