Dwiintensitynorm ValueError: empty searator


#1

Hi All,

Easy question for the experts:

I’m trying to run dwiintensitynorm on 5 participants. I’ve created the folder structure required, and symbolically linked the denoised and preprocessed dwi data to the dwi_input folder (001_dwi_preprocessed.mif, 002_dwi_preprocessed.mif…), as well as the brain mask files to the mask_input folder (001_dwi_brain_mask.mif, 002_dwi_brain_mask.mif…). I get the following error when I run:

dwiintensitynorm dti_input/ mask_input/ dti_output/ fa_template.mif fa_template_wm_mask.mif

dwiintensitynorm: performing global intensity normalisation on 6 input images
Traceback (most recent call last):
File “/usr/local/bin/dwiintensitynorm”, line 65, in
maskPrefixes.append(m.split(maskCommonPostfix)[0])
ValueError: empty separator

My questions are:

  1. why does it believe there are 6 images? and,
  2. what am I doing wrong here?

Many thanks!

-Cam


#2

That’s a bit unexpected… Maybe there’s other files in these folders (potentially hidden)? What does ls -al dti_input/ report…?


#3

Many thanks for the response. Here’s what I get:

Drs-iMac:dtiintensitynorm bim-mri$ ls -al dti_input/
total 56
drwxr-xr-x 8 bim-mri staff 272 28 Sep 10:10 .
drwxr-xr-x 6 bim-mri staff 204 27 Sep 17:38 …
-rw-r–r--@ 1 bim-mri staff 6148 28 Sep 10:10 .DS_Store
lrwxr-xr-x 1 bim-mri staff 127 28 Sep 10:10 CO2_0322_200_2_dti_preprocessed_bias.mif -> /Users/bim-mri/Documents/BIM-MRI_data/IMAGINGWIN/CO2_exercise/CO2_0322_200_2/study/AX_DTI_22mm/MRtrix/dti_preprocessed_bias.mif
lrwxr-xr-x 1 bim-mri staff 127 28 Sep 10:10 CO2_0355_200_2_dti_preprocessed_bias.mif -> /Users/bim-mri/Documents/BIM-MRI_data/IMAGINGWIN/CO2_exercise/CO2_0355_200_2/study/AX_DTI_22mm/MRtrix/dti_preprocessed_bias.mif
lrwxr-xr-x 1 bim-mri staff 127 28 Sep 10:10 CO2_0364_200_2_dti_preprocessed_bias.mif -> /Users/bim-mri/Documents/BIM-MRI_data/IMAGINGWIN/CO2_exercise/CO2_0364_200_2/study/AX_DTI_22mm/MRtrix/dti_preprocessed_bias.mif
lrwxr-xr-x 1 bim-mri staff 125 28 Sep 10:10 CO2_0368_200_dti_preprocessed_bias.mif -> /Users/bim-mri/Documents/BIM-MRI_data/IMAGINGWIN/CO2_exercise/CO2_0368_200/study/AX_DTI_22mm/MRtrix/dti_preprocessed_bias.mif
lrwxr-xr-x 1 bim-mri staff 125 28 Sep 10:10 CO2_0383_200_dti_preprocessed_bias.mif -> /Users/bim-mri/Documents/BIM-MRI_data/IMAGINGWIN/CO2_exercise/CO2_0383_200/study/AX_DTI_22mm/MRtrix/dti_preprocessed_bias.mif

Seems like there are only 5 images here. Thoughts?

Thanks again,

-Cam


#4

delete this file:

Given that it pops up the second time, we should probably ignore .DS_Store files in our scripts.


#5

Perfect - this seems to solve the problem. Just FYI, there was a .DS_Store hidden file in the input_mask folder that had to be deleted as well so that the algorithm recognized an equal number of dwi and mask inputs.

Many thanks for your help with this,

-Cam


#6

EDIT: Apologies: While a fix has been implemented for MRtrix3 that instructs these scripts to ignore any hidden files in the input directories, I was mistaken in thinking that it was pushed to the master branch of MRtrix3. The fix is implemented in the development branch, and will therefore form part of the next tag release.


#7

Great - many thanks for staying on top of these important details.


#8

Note that the fix is not yet pushed to master (3.0_RC2-65-g5d1eb1bb) but will be when the current development branch gets merged into it.