issue with mne watershed_bem

External Email - Use Caution

Hello,

I am just getting started with MNE Python.

I have EEG and MRI data from a participant and I want to reconstruct the sources activity.

I do not have the surfaces necessary to make the bem model (ie inner skull, outer skin and outer skull). Hence I used mne_watershed_bem to create the bem surfaces. At this point, I get the following error :

(when calling
$ mne watershed_bem --overwrite --subject=sub-0865_ses-01_isotrope --subjects-dir=subjects-dir)

Running mri_watershed for BEM segmentation with the following parameters:
Results dir = subjects-dir/sub-0865_ses-01_isotrope/bem/watershed
Command = mri_watershed -useSRAS -surf subjects-dir/sub-0865_ses-01_isotrope/bem/watershed/sub-0865_ses-01_isotrope subjects-dir/sub-0865_ses-01_isotrope/mri/T1.mgz subjects-dir/sub-0865_ses-01_isotrope/bem/watershed/ws
Running subprocess: mri_watershed -useSRAS -surf subjects-dir/sub-0865_ses-01_isotrope/bem/watershed/sub-0865_ses-01_isotrope subjects-dir/sub-0865_ses-01_isotrope/mri/T1.mgz subjects-dir/sub-0865_ses-01_isotrope/bem/watershed/ws

Mode: use surfaceRAS to save surface vertex positions
Mode: Saving out BEM surfaces

External Email - Use Caution

This looks like a path problem. Is your subjects-dir actually called
"subjects-dir"? Does the file
"subjects-dir/sub-0865_ses-01_isotrope/mri/T1.mgz" exist relative to the
path from which you executed the `mne watershed_bem` command?

Eric

External Email - Use Caution

... or actually perhaps it's a permissions issue. MNE already checks to
make sure the file exists, but we don't for example check to see if it's
readable by the user.

Eric

External Email - Use Caution

I checked, it is not a path issue. Nor a permission one, I ran the command with the highest permission rights. And the other files in the directory were accessible when running other commands...

External Email - Use Caution

Are you able to read it using Freesurfer commands like:

mri_convert subjects-dir/sub-0865_ses-01_isotrope/mri/T1.mgz ~/test.nii

This should at least verify that Freesurfer can read your file. But really
this is all that MNE should be trying to do. You could then try changing
over to the branch from this PR to see if it flags anything as being wrong:

https://github.com/mne-tools/mne-python/pull/7370

We can also iterate there until we figure it out.

Eric

External Email - Use Caution

Hello,

We tried what you suggested.

mri_converts is working just fine on the file.

We ran the last mne version (v0.20dev0) and the error remains the same.