Population_template problems


I’m working through this pipeline and am having troubles with population_template. I’m not getting any clear errors that I can find solutions for, so I’m hoping someone can explain how to fix this:

population_template: Generating a population-average template from 16 input images
population_template: [DEBUG] commonPostfix(): Common postfix of 16 is ''
Traceback (most recent call last):
  File "/usr/local/packages/mrtrix3/bin/population_template", line 243, in <module>
ValueError: empty separator

I’ve tried searching for the solution to ValueError and went into the source code for population_template line 243, but there isn’t anything there that seems immediately useful:

These are lines 241-243 in the source code:

  for m in maskFiles:

For the record, I couldn’t do the symbolic linking described in step 8 because the cluster I’m working on doesn’t support it. Could this be part of the issue?

Thank you very much!

Hello @aszymanski

You are seeing this error because the common postfix of the mask filenames is empty. The mask images should all be in a common folder and have the same file extension.


Hi Max,

Thanks for the response! To clarify, you don’t mean that the mask images should be in the same folder as the FOD images, right? Because as it is I have all mask images in a common folder with the same file extensions. Here’s an image of my setup:

They all have .nii.gz file extensions.

Did I just make an error with my command? I’m operating from the directory which contains the template folder, which contains the mask_input and fod_input folders.

Thank you for your time :slight_smile:

Make sure that there are no hidden files in the mask folder.

ls -la mask_dir template/mask_input

If you can’t see anything wrong with that file list, feel free to post or send me that list.