Generating a tissue-segmented image to build a structural connectome


#1

I’m having trouble with step one of userdocs.mrtrix.org/en/latest/tutorials/hcp_conectome.html, and I don’t get as far as what is discussed at 5ttgen. What’s wrong below?

fred@fred-VirtualBox:~/Downloads/100307$ find . -name *restore_brain* -print
./MNINonLinear/T1w_restore_brain.nii.gz
./MNINonLinear/T2w_restore_brain.nii.gz
./T1w/T1w_acpc_dc_restore_brain.nii.gz
./T1w/T2w_acpc_dc_restore_brain.nii.gz
fred@fred-VirtualBox:~/Downloads/100307$ 5ttgen fsl T1w/T1w_acpc_dc_restore_brain.nii.gz 5TT.mif -premasked
5ttgen: 
5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
5ttgen: 
5ttgen: Generated temporary directory: /tmp/5ttgen-tmp-PNE2X7/
Command: mrconvert T1w/T1w_acpc_dc_restore_brain.nii.gz /tmp/5ttgen-tmp-PNE2X7/input.mif  -quiet
Segmentation fault (core dumped)
5ttgen: [ERROR] Command failed: mrconvert T1w/T1w_acpc_dc_restore_brain.nii.gz /tmp/5ttgen-tmp-PNE2X7/input.mif  -quiet
5ttgen: Changing back to original directory (/home/fred/Downloads/100307)
5ttgen: Deleting temporary directory /tmp/5ttgen-tmp-PNE2X7/
fred@fred-VirtualBox:~/Downloads/100307$ 5ttgen fsl MNINonLinear/T1w_restore_brain.nii.gz 5TT.mif -premasked
5ttgen: 
5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
5ttgen: 
5ttgen: Generated temporary directory: /tmp/5ttgen-tmp-TNDBRT/
Command: mrconvert MNINonLinear/T1w_restore_brain.nii.gz /tmp/5ttgen-tmp-TNDBRT/input.mif  -quiet
Segmentation fault (core dumped)
5ttgen: [ERROR] Command failed: mrconvert MNINonLinear/T1w_restore_brain.nii.gz /tmp/5ttgen-tmp-TNDBRT/input.mif  -quiet
5ttgen: Changing back to original directory (/home/fred/Downloads/100307)
5ttgen: Deleting temporary directory /tmp/5ttgen-tmp-TNDBRT/

Dwi2response with tournier
#2

Yikes. That’s a very rudimentary mrconvert call that’s failing, so I’d be very surprised if you’re able to do anything much at all with MRtrix3

A few tests you can try:

  1. Make sure you’re on the newest version of the MRtrix3 code:
    git pull; ./build
  2. Are you able to open that image (./T1w/T1w_acpc_dc_restore_brain.nii.gz) in mrview?
  3. Run:
    which mrconvert
    , and make sure that the version of the binary being executed is the correct one (i.e. not an installation of MRtrix 0.2, or a separate version of MRtrix3 that’s set up for a different version or branch of the code).
  4. Try doing a direct mrconvert call on that image file at the command-line, i.e. not using the 5ttgen script.
  5. Try using a different path for your temporary directory: e.g. 5ttgen -tempdir ./ fsl ...
  6. If everything continues to fail catastrophically, we might have to pull out the big guns; but hopefully it’s something far more mundane.

Let us know how you go
Rob


#3

It could just be an out of RAM error, as happened in a recent post? These are pretty huge datasets… How much RAM is on your system?


#4

Only 2038 MB as I’m using a virtual machine. I’m now using the resources at the VLSCI (www.vlsci.org.au) and am stuck generating a mean b=0 image - I’ll create a new thread for that.


#5

OK, that’ll be it then. Might need to figure out why mrconvert crashes out like that rather than producing a more helpful error message…