BRAINSTools icon indicating copy to clipboard operation
BRAINSTools copied to clipboard

DWIConvert gets segmentation fault when converting Nrrd image to Nifti image

Open gbuntu127 opened this issue 6 years ago • 4 comments

I am trying to convert a DTIPrep's output back to Nifti format, and the DWIConvert tool threw a segmentation fault error.

Here are details:

  1. Convert original Nifti to Nrrd, DTIPrep only supports Nrrd. This step is successful.
DWIConvert \
    --inputVolume dwi.nii \
    --inputBVectors bvec.txt \
    --inputBValues bval.txt \
    --conversionMode FSLToNrrd \
    -o dwi.nrrd
  1. I tested DTIPrep for quality check with the following command. This step is successful.
DTIPrep \
    --echo \
    --check \
    --default \
    --xmlProtocol test.xml \
    --DWINrrdFile dwi.nrrd
  1. convert the output (Nrrd format) of DTIPrep back to Nifty format.
DWIConvert \
    --allowLossyConversion \
    --inputVolume dwi_QCed.nrrd \
    --outputVolume dwi_QCed.nii.gz \
    --outputBVectors dwi_QCed.bvec \
    --outputBValues dwi_QCed.bval \
    --conversionMode NrrdToFSL

The output of DTIPrep has "unsigned short", "allowLossyConversion" option is added. The error is:

======= DWI Convert Public Lib Ctest =========
INPUT VOLUME: dwi_QCed.nrrd
Segmentation fault

Some information:

$ Slicer --version
4.8.1

$ DWIConvert --version
DWIConvert  version: 4.8.0

$ uname -mrsn
Linux 2.6.32-696.18.7.el6.x86_64 x86_64

I upload the problematic nrrd file here. Please help check it. Thanks!

gbuntu127 avatar Mar 07 '18 18:03 gbuntu127

Hi, I have the same problem in Mac . Is there any solution ?

manzouri avatar May 09 '18 10:05 manzouri

I am 99% sure this is fixed in the upstream version 5.0.0 version of BRAINSTools DWIConvert.

Hans

hjmjohnson avatar May 09 '18 12:05 hjmjohnson

I am sorry to reopen this after so long, but I am using the newest DWIConvert (5.3.0) and am experiencing the same issue after using DTIPrep 1.2.10.

smeisler avatar Jul 04 '20 00:07 smeisler

Can you provide an anonymized data example so that I can track down what is going wrong? I will need to be able to replicate the problem before it can be solved.

hjmjohnson avatar Jul 04 '20 15:07 hjmjohnson