Hi Lennart,

Actually, it looks like epi_reg is trying to call 'python' - unfortunately there is an executable called 'python' in the FSLeyes directory, which may inadvertently be getting used in place of your default version of python - you probably have the FSLeyes directory on your PATH environment variable.

Two possible workarounds are to either place the FSLeyes directory at the end of your PATH, or to create a symlink/wrapper script to the FSLeyes executable in a location that is already on the PATH.

Cheers,

Pau

On 2 August 2017 at 14:33, Lennart Verhagen <[log in to unmask]> wrote:
Hi all,

I’m trying to provide epi_reg with a WM mask of the T1w image, but it seems epi_reg is trying to invoke FSLeyes, and failing. I was wondering wether anybody stumbled into the same problem. I’m running epi_reg locally on macOS, FSL version 5.0.9. Here is some pseudo-code (all images/files exist and are readable):

epi_reg \
   --epi=${funcImg}_restore_brain \
   --t1=$structImg \
   --t1brain=${structImg}_brain \
   --out=$tmpDir/func_2struct_epireg \
   --wmseg=$studyDir/$subj/structural/WM \
   --fmap=$fieldMap \
   --fmapmag=$magnImg \
   --fmapmagbrain=${magnImg}_brain \
   --echospacing=0.000404998 \
   --pedir=y

And this is the output:

/Applications/FSLeyes.app/Contents/MacOS//python: /Applications/FSLeyes.app/Contents/MacOS//python: cannot execute binary file
Cannot open volume /func_2struct_epireg_fast_wmseg for reading!

epi_reg will continue and try to run the bbr nonetheless, but this isn’t exactly my intended behaviour. If it makes a difference, FSLeyes (0.9.6) is working fine on my computer.

Any ideas? Much appreciated.

cheers,
Lennart