Dwiintensitynorm error (empty separator)

Dear MRtrix3 users,
I’m still familiarizing myself with MRtrix3, so I apologize for such a newbie question.
I’ve been following the Fibre Density Cross-section tutorial, but got stuck on item 5 as I keep getting the error message below:

INCEs-Mac-Pro:Teste_MRITRIX_group INCE$ cd dwiintensitynorm/
INCEs-Mac-Pro:dwiintensitynorm INCE$ ls
dwi_input dwi_output mask_input
INCEs-Mac-Pro:dwiintensitynorm INCE$ dwiintensitynorm dwi_input/ mask_input/ dwi_output/ fa_template.mif fa_template_wm_mask.mif -force
dwiintensitynorm: performing global intensity normalisation on 4 input images
Traceback (most recent call last):
File “/Users/INCE/mrtrix3/bin/dwiintensitynorm”, line 70, in
prefix = i.split(commonPostfix)[0]
ValueError: empty separator
INCEs-Mac-Pro:dwiintensitynorm INCE$

Any ideas? I’d really appreciate any help!
Cheers,
Joselisa

I think you have hidden files in your input directory:

rm dwi_input/.DS_Store
rm mask_input/.DS_Store

Thank you for your suggestion, but everything is looking good (no hidden files whatsoever):

INCEs-Mac-Pro:dwiintensitynorm INCE$ ls -a
. … dwi_input dwi_output mask_input
INCEs-Mac-Pro:dwiintensitynorm INCE$ cd dwi_input/
INCEs-Mac-Pro:dwi_input INCE$ ls -a
. C01574_dwi_denoised_preproc_bias.mif P00665_dwi_denoised_preproc_bias.mif
… C01575_dwi_denoised_preproc_bias.mif P00676_dwi_denoised_preproc_bias.mif
INCEs-Mac-Pro:dwi_input INCE$ cd …
INCEs-Mac-Pro:dwiintensitynorm INCE$ cd dwi_output/
INCEs-Mac-Pro:dwi_output INCE$ ls -a
. …
INCEs-Mac-Pro:dwi_output INCE$ cd …
INCEs-Mac-Pro:dwiintensitynorm INCE$ cd mask_input/
INCEs-Mac-Pro:mask_input INCE$ ls -a
. C01574_dwi_denoised_preproc_bias_mask.mif P00665_dwi_denoised_preproc_bias_mask.mif
… C01575_dwi_denoised_preproc_bias_mask.mif P00676_dwi_denoised_preproc_bias_mask.mif

I’m running on a MAC 10.12.6, any ideas? :weary:

It works with the following directory structure on ubuntu:

$ tree -a
|-- dwi_input
|   |-- C01574_dwi_denoised_preproc_bias.mif
|   |-- C01575_dwi_denoised_preproc_bias.mif
|   |-- P00665_dwi_denoised_preproc_bias.mif
|   `-- P00676_dwi_denoised_preproc_bias.mif
`-- mask_input
    |-- C01574_dwi_denoised_preproc_bias_mask.mif
    |-- C01575_dwi_denoised_preproc_bias_mask.mif
    |-- P00665_dwi_denoised_preproc_bias_mask.mif
    `-- P00676_dwi_denoised_preproc_bias_mask.mif

Are you using the latest version of dwiintensitynorm?

It worked! I feel kinda dumb…I think the problem was a space at the end of some of the filenames that I couldn’t see without the tree function you suggested.
Thank you very much for your help! :smile:
Cheers from Brazil,
Joselisa

Hi, I’m having troubles with symbolic linking via (step 5):

Working with mac os high sierra 10.13.1 and mrtrix version 3.0_RC2-4-g51864ed2.

foreach * : ln -sr IN/dwi_denoised_preproc_bias.mif …/dwiintensitynorm/dwi_input/IN.mif
foreach * : ln -sr IN/dwi_mask.mif …/dwiintensitynorm/mask_input/IN.mif

resultet in:

ln: illegal option – r
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file … target_dir
link source_file target_file

However, just copying the files works (without the"-sr").

It also seems, that the option -sr is not known, just -s (that produced Alias-files, which ended up in not working for dwiintensitynorm and seemed to be understood as folders at first, but I’m not sure if that was because of DS_Store files which might have been produced by that process).

After copying, I received .DS_Store files. So installing “tree” via

brew install tree

revealed those files. After that I was able to proceed with step 5.

You can use the GNU version of ln which in contrast to the macOS BSD version of ln supports the -r option. You can install coreutils >= 8.16 via:

brew install coreutils

Thank you for that fast answer!