# Error mne\_surf2bem

**URL:** <https://mne.discourse.group/t/error-mne-surf2bem/949>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [January 13, 2016, 3:04pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949 "2016-01-13T15:04:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 3:04pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/1 "2016-01-13T15:04:01Z")

</div>

Dear MNE-users,

I have a problem for two of my subjects when creating the high resolution  
head surface with mne\_surf2bem (after creating the BEM surfaces). The error  
I get is the following one. When I look to the outer\_skin.fif, everything  
looks ok. What is the problem and what could be a solution?

Thanks!  
Laetitia G.

Command:  
mne\_surf2bem --surf ${SUBJECTS\_DIR}/${SUBJECT}/surf/lh.seghead --id 4  
--check --force --fif ${SUBJECTS\_DIR}/${SUBJECT}/bem/${SUBJECT}-head.fif

Output:  
mne\_surf2bem version 1.8 compiled at Jan 11 2016 04:32:34

input file # 1 :  
/neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
/ id = 4 / sigma N/A  
output file :  
/neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/bem/cc150418-head.fif

New quad file : nvert = 202887 nquad = 203438  
&nbsp;&nbsp;&nbsp;&nbsp;Triangle and vertex normals and neighboring triangles...[done]  
&nbsp;&nbsp;&nbsp;&nbsp;Vertex neighbors... Warning: Too many neighbors for vertex 107343  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 107345  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 107347  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 108287  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 108289  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 109198  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 109200  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 124522  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 125455  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 125456  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 131243  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 131245  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 132243  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: Too many neighbors for vertex 132245  
[done]  
&nbsp;&nbsp;&nbsp;&nbsp;Distances between neighboring vertices...[1219568 distances done]  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: 8 topological defects were fixed.  
&nbsp;&nbsp;&nbsp;&nbsp;Warning: 985 vertices had incorrect number of distinct neighbors  
(fixed).  
valid = 1 # volume info valid  
filename =  
/neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/mri/seghead.mgz  
volume = 256 256 256  
voxelsize = 1.0000 1.0000 1.0000  
xras = -1.0000 0.0000 0.0000  
yras = 0.0000 0.0000 -1.0000  
zras = 0.0000 1.0000 0.0000  
cras = -0.5000 22.2651 -13.4940  
/neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
read. id = 4

outer skin CM is -3.64 -8.94 -9.34 mm  
Surface outer skin is not complete (sum of solid angles = 0.999986 \* 4\*PI  
instead).  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160113/54cc3a4f/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160113/54cc3a4f/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 3:47pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/2 "2016-01-13T15:47:53Z")

</div>

Hi Laetitia,

Please see my replies in text:

> Dear MNE-users,
> 
> I have a problem for two of my subjects when creating the high resolution  
> head surface with mne\_surf2bem (after creating the BEM surfaces). The error  
> I get is the following one. When I look to the outer\_skin.fif, everything  
> looks ok. What is the problem and what could be a solution?

The outer\_skin.fif is not created by any of these commands.

> Thanks!  
> Laetitia G.
> 
> Command:  
> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> --check --force --fif \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif

This looks odd to me. Why are you trying to make lh.seghead?  
typically, if you want to make a high resolution head surface you use  
lh.smseghead. First, check this suggestion. Then, if you still have a  
problem, occasionally editing the volume to make the neck for example  
a smooth white area 2 slices thick, then re-running mkheadsurf.

hth  
d

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:05pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/3 "2016-01-13T16:05:02Z")

</div>

2016-01-13 16:47 GMT+01:00 dgw \<dgwakeman at gmail.com\>:

> Hi Laetitia,
> 
> Please see my replies in text:
> 
> \> Dear MNE-users,  
> \>  
> \> I have a problem for two of my subjects when creating the high resolution  
> \> head surface with mne\_surf2bem (after creating the BEM surfaces). The  
> error  
> \> I get is the following one. When I look to the outer\_skin.fif, everything  
> \> looks ok. What is the problem and what could be a solution?
> 
> The outer\_skin.fif is not created by any of these commands.

Outer\_skin.fif is created by the mne\_flash\_bem command, but I guess it is  
used by mne\_surf2bem, isn't it?

> \>  
> \> Thanks!  
> \> Laetitia G.  
> \>  
> \> Command:  
> \> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> \> --check --force --fif \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif
> 
> This looks odd to me. Why are you trying to make lh.seghead?  
> typically, if you want to make a high resolution head surface you use  
> lh.smseghead. First, check this suggestion. Then, if you still have a  
> problem, occasionally editing the volume to make the neck for example  
> a smooth white area 2 slices thick, then re-running mkheadsurf.

I want to create this high resolution head to read it with mne\_analyze and  
do my coregistration (and it worked well with my other subjects). What is  
the difference between lh.seghead and lh.smseghead (by the way, I don't  
have any lh.smseghead file in the surf directory of my subjects)?  
More concretely how can I edit the volume as you suggested?

> hth  
> d

Thanks Denis!

> \>  
> \> Output:  
> \> mne\_surf2bem version 1.8 compiled at Jan 11 2016 04:32:34  
> \>  
> \> input file # 1 :  
> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \> / id = 4 / sigma N/A  
> \> output file :  
> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/bem/cc150418-head.fif  
> \>  
> \> New quad file : nvert = 202887 nquad = 203438  
> \> Triangle and vertex normals and neighboring triangles...[done]  
> \> Vertex neighbors... Warning: Too many neighbors for vertex 107343  
> \> Warning: Too many neighbors for vertex 107345  
> \> Warning: Too many neighbors for vertex 107347  
> \> Warning: Too many neighbors for vertex 108287  
> \> Warning: Too many neighbors for vertex 108289  
> \> Warning: Too many neighbors for vertex 109198  
> \> Warning: Too many neighbors for vertex 109200  
> \> Warning: Too many neighbors for vertex 124522  
> \> Warning: Too many neighbors for vertex 125455  
> \> Warning: Too many neighbors for vertex 125456  
> \> Warning: Too many neighbors for vertex 131243  
> \> Warning: Too many neighbors for vertex 131245  
> \> Warning: Too many neighbors for vertex 132243  
> \> Warning: Too many neighbors for vertex 132245  
> \> [done]  
> \> Distances between neighboring vertices...[1219568 distances done]  
> \> Warning: 8 topological defects were fixed.  
> \> Warning: 985 vertices had incorrect number of distinct neighbors  
> \> (fixed).  
> \> valid = 1 # volume info valid  
> \> filename =  
> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/mri/seghead.mgz  
> \> volume = 256 256 256  
> \> voxelsize = 1.0000 1.0000 1.0000  
> \> xras = -1.0000 0.0000 0.0000  
> \> yras = 0.0000 0.0000 -1.0000  
> \> zras = 0.0000 1.0000 0.0000  
> \> cras = -0.5000 22.2651 -13.4940  
> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \> read. id = 4  
> \>  
> \> outer skin CM is -3.64 -8.94 -9.34 mm  
> \> Surface outer skin is not complete (sum of solid angles = 0.999986 \*  
> 4\*PI  
> \> instead).  
> \>  
> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> Mne\_analysis mailing list  
> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \> The information in this e-mail is intended only for the person to whom  
> it is  
> \> addressed. If you believe this e-mail was sent to you in error and the  
> \> e-mail  
> \> contains patient information, please contact the Partners Compliance  
> \> HelpLine at  
> \> [http://www.partners.org/complianceline](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> in  
> \> error  
> \> but does not contain patient information, please contact the sender and  
> \> properly  
> \> dispose of the e-mail.  
> \>  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160113/33c5d339/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160113/33c5d339/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:14pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/4 "2016-01-13T16:14:24Z")

</div>

> 2016-01-13 16:47 GMT+01:00 dgw \<dgwakeman at gmail.com\>:
> 
> > Hi Laetitia,
> > 
> > Please see my replies in text:
> > 
> > \> Dear MNE-users,  
> > \>  
> > \> I have a problem for two of my subjects when creating the high  
> > \> resolution  
> > \> head surface with mne\_surf2bem (after creating the BEM surfaces). The  
> > \> error  
> > \> I get is the following one. When I look to the outer\_skin.fif,  
> > \> everything  
> > \> looks ok. What is the problem and what could be a solution?
> > 
> > The outer\_skin.fif is not created by any of these commands.
> 
> Outer\_skin.fif is created by the mne\_flash\_bem command, but I guess it is  
> used by mne\_surf2bem, isn't it?

No, it isn't used by mne\_surf2bem. Inside the mne\_flash\_bem script it  
calls mne\_surf2bem to create it, but it is not used in the procedure  
you are talking about (in fact what you want to do is to create a  
similar surface, but better to replace it).

> > \>  
> > \> Thanks!  
> > \> Laetitia G.  
> > \>  
> > \> Command:  
> > \> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> > \> --check --force --fif \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif
> > 
> > This looks odd to me. Why are you trying to make lh.seghead?  
> > typically, if you want to make a high resolution head surface you use  
> > lh.smseghead. First, check this suggestion. Then, if you still have a  
> > problem, occasionally editing the volume to make the neck for example  
> > a smooth white area 2 slices thick, then re-running mkheadsurf.
> 
> I want to create this high resolution head to read it with mne\_analyze and  
> do my coregistration (and it worked well with my other subjects). What is  
> the difference between lh.seghead and lh.smseghead (by the way, I don't have  
> any lh.smseghead file in the surf directory of my subjects)?

Let's proceed here first. Have you run mkheadsurf?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:21pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/5 "2016-01-13T16:21:54Z")

</div>

2016-01-13 17:14 GMT+01:00 dgw \<dgwakeman at gmail.com\>:

> \>  
> \> 2016-01-13 16:47 GMT+01:00 dgw \<dgwakeman at gmail.com\>:  
> \>\>  
> \>\> Hi Laetitia,  
> \>\>  
> \>\> Please see my replies in text:  
> \>\>  
> \>\> \> Dear MNE-users,  
> \>\> \>  
> \>\> \> I have a problem for two of my subjects when creating the high  
> \>\> \> resolution  
> \>\> \> head surface with mne\_surf2bem (after creating the BEM surfaces). The  
> \>\> \> error  
> \>\> \> I get is the following one. When I look to the outer\_skin.fif,  
> \>\> \> everything  
> \>\> \> looks ok. What is the problem and what could be a solution?  
> \>\>  
> \>\> The outer\_skin.fif is not created by any of these commands.  
> \>\>  
> \>  
> \>  
> \> Outer\_skin.fif is created by the mne\_flash\_bem command, but I guess it is  
> \> used by mne\_surf2bem, isn't it?
> 
> No, it isn't used by mne\_surf2bem. Inside the mne\_flash\_bem script it  
> calls mne\_surf2bem to create it, but it is not used in the procedure  
> you are talking about (in fact what you want to do is to create a  
> similar surface, but better to replace it).

Ok, it's getting clearer!

> \>  
> \>  
> \>\>  
> \>\> \>  
> \>\> \> Thanks!  
> \>\> \> Laetitia G.  
> \>\> \>  
> \>\> \> Command:  
> \>\> \> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> \>\> \> --check --force --fif  
> \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif  
> \>\>  
> \>\> This looks odd to me. Why are you trying to make lh.seghead?  
> \>\> typically, if you want to make a high resolution head surface you use  
> \>\> lh.smseghead. First, check this suggestion. Then, if you still have a  
> \>\> problem, occasionally editing the volume to make the neck for example  
> \>\> a smooth white area 2 slices thick, then re-running mkheadsurf.  
> \>\>  
> \>  
> \> I want to create this high resolution head to read it with mne\_analyze  
> and  
> \> do my coregistration (and it worked well with my other subjects). What is  
> \> the difference between lh.seghead and lh.smseghead (by the way, I don't  
> have  
> \> any lh.smseghead file in the surf directory of my subjects)?
> 
> Let's proceed here first. Have you run mkheadsurf?

Yes, the exact command I've run was (and there was no error message):

mkheadsurf -s ${SUBJECT}

> \> More concretely how can I edit the volume as you suggested?  
> \>  
> \>\>  
> \>\> hth  
> \>\> d  
> \>\>  
> \>  
> \> Thanks Denis!  
> \>  
> \>\>  
> \>\> \>  
> \>\> \> Output:  
> \>\> \> mne\_surf2bem version 1.8 compiled at Jan 11 2016 04:32:34  
> \>\> \>  
> \>\> \> input file # 1 :  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \>\> \> / id = 4 / sigma N/A  
> \>\> \> output file :  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/bem/cc150418-head.fif  
> \>\> \>  
> \>\> \> New quad file : nvert = 202887 nquad = 203438  
> \>\> \> Triangle and vertex normals and neighboring triangles...[done]  
> \>\> \> Vertex neighbors... Warning: Too many neighbors for vertex  
> 107343  
> \>\> \> Warning: Too many neighbors for vertex 107345  
> \>\> \> Warning: Too many neighbors for vertex 107347  
> \>\> \> Warning: Too many neighbors for vertex 108287  
> \>\> \> Warning: Too many neighbors for vertex 108289  
> \>\> \> Warning: Too many neighbors for vertex 109198  
> \>\> \> Warning: Too many neighbors for vertex 109200  
> \>\> \> Warning: Too many neighbors for vertex 124522  
> \>\> \> Warning: Too many neighbors for vertex 125455  
> \>\> \> Warning: Too many neighbors for vertex 125456  
> \>\> \> Warning: Too many neighbors for vertex 131243  
> \>\> \> Warning: Too many neighbors for vertex 131245  
> \>\> \> Warning: Too many neighbors for vertex 132243  
> \>\> \> Warning: Too many neighbors for vertex 132245  
> \>\> \> [done]  
> \>\> \> Distances between neighboring vertices...[1219568 distances done]  
> \>\> \> Warning: 8 topological defects were fixed.  
> \>\> \> Warning: 985 vertices had incorrect number of distinct neighbors  
> \>\> \> (fixed).  
> \>\> \> valid = 1 # volume info valid  
> \>\> \> filename =  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/mri/seghead.mgz  
> \>\> \> volume = 256 256 256  
> \>\> \> voxelsize = 1.0000 1.0000 1.0000  
> \>\> \> xras = -1.0000 0.0000 0.0000  
> \>\> \> yras = 0.0000 0.0000 -1.0000  
> \>\> \> zras = 0.0000 1.0000 0.0000  
> \>\> \> cras = -0.5000 22.2651 -13.4940  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \>\> \> read. id = 4  
> \>\> \>  
> \>\> \> outer skin CM is -3.64 -8.94 -9.34 mm  
> \>\> \> Surface outer skin is not complete (sum of solid angles = 0.999986 \*  
> \>\> \> 4\*PI  
> \>\> \> instead).  
> \>\> \>  
> \>\> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \>\> \> Mne\_analysis mailing list  
> \>\> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \>\> \> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>\> \>  
> \>\> \>  
> \>\> \> The information in this e-mail is intended only for the person to whom  
> \>\> \> it is  
> \>\> \> addressed. If you believe this e-mail was sent to you in error and the  
> \>\> \> e-mail  
> \>\> \> contains patient information, please contact the Partners Compliance  
> \>\> \> HelpLine at  
> \>\> \> [http://www.partners.org/complianceline](http://www.partners.org/complianceline) . If the e-mail was sent to  
> you  
> \>\> \> in  
> \>\> \> error  
> \>\> \> but does not contain patient information, please contact the sender  
> and  
> \>\> \> properly  
> \>\> \> dispose of the e-mail.  
> \>\> \>  
> \>\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \>\> Mne\_analysis mailing list  
> \>\> Mne\_analysis at nmr.mgh.harvard.edu  
> \>\> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \>  
> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> Mne\_analysis mailing list  
> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \> The information in this e-mail is intended only for the person to whom  
> it is  
> \> addressed. If you believe this e-mail was sent to you in error and the  
> \> e-mail  
> \> contains patient information, please contact the Partners Compliance  
> \> HelpLine at  
> \> [http://www.partners.org/complianceline](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> in  
> \> error  
> \> but does not contain patient information, please contact the sender and  
> \> properly  
> \> dispose of the e-mail.  
> \>  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne\_analysis](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160113/1ffb04e3/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160113/1ffb04e3/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:24pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/6 "2016-01-13T16:24:58Z")

</div>

> 2016-01-13 17:14 GMT+01:00 dgw \<dgwakeman at gmail.com\>:
> 
> > \>  
> > \> 2016-01-13 16:47 GMT+01:00 dgw \<dgwakeman at gmail.com\>:  
> > \>\>  
> > \>\> Hi Laetitia,  
> > \>\>  
> > \>\> Please see my replies in text:  
> > \>\>  
> > \>\> \> Dear MNE-users,  
> > \>\> \>  
> > \>\> \> I have a problem for two of my subjects when creating the high  
> > \>\> \> resolution  
> > \>\> \> head surface with mne\_surf2bem (after creating the BEM surfaces). The  
> > \>\> \> error  
> > \>\> \> I get is the following one. When I look to the outer\_skin.fif,  
> > \>\> \> everything  
> > \>\> \> looks ok. What is the problem and what could be a solution?  
> > \>\>  
> > \>\> The outer\_skin.fif is not created by any of these commands.  
> > \>\>  
> > \>  
> > \>  
> > \> Outer\_skin.fif is created by the mne\_flash\_bem command, but I guess it  
> > \> is  
> > \> used by mne\_surf2bem, isn't it?
> > 
> > No, it isn't used by mne\_surf2bem. Inside the mne\_flash\_bem script it  
> > calls mne\_surf2bem to create it, but it is not used in the procedure  
> > you are talking about (in fact what you want to do is to create a  
> > similar surface, but better to replace it).
> 
> Ok, it's getting clearer!
> 
> > \>  
> > \>  
> > \>\>  
> > \>\> \>  
> > \>\> \> Thanks!  
> > \>\> \> Laetitia G.  
> > \>\> \>  
> > \>\> \> Command:  
> > \>\> \> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> > \>\> \> --check --force --fif  
> > \>\> \> \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif  
> > \>\>  
> > \>\> This looks odd to me. Why are you trying to make lh.seghead?  
> > \>\> typically, if you want to make a high resolution head surface you use  
> > \>\> lh.smseghead. First, check this suggestion. Then, if you still have a  
> > \>\> problem, occasionally editing the volume to make the neck for example  
> > \>\> a smooth white area 2 slices thick, then re-running mkheadsurf.  
> > \>\>  
> > \>  
> > \> I want to create this high resolution head to read it with mne\_analyze  
> > \> and  
> > \> do my coregistration (and it worked well with my other subjects). What  
> > \> is  
> > \> the difference between lh.seghead and lh.smseghead (by the way, I don't  
> > \> have  
> > \> any lh.smseghead file in the surf directory of my subjects)?
> > 
> > Let's proceed here first. Have you run mkheadsurf?
> 
> Yes, the exact command I've run was (and there was no error message):
> 
> mkheadsurf -s ${SUBJECT}

What version of freesurfer are you using? What exact command did you  
run and what are the outputs of it?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:30pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/7 "2016-01-13T16:30:47Z")

</div>

The version of freesurfer I use:  
freesurfer-Linux-centos4\_x86\_64-stable-pub-v5.3.0

I run exactly this command (SUBJET being the identification number of my  
subject):  
mkheadsurf -s ${SUBJECT}

And I got:

INFO: log file is  
/neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//lb140113/scripts/mkheadsurf.log

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:35pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/8 "2016-01-13T16:35:57Z")

</div>

ok, Laetitia, it looks like i am a bit behind in my mkheadsurf  
knowledge (and so is the documentation). You are correct, it shouldn't  
create a lh.smseghead (previous versions did this). To fix this, you  
can do the following (taken from the slightly out of date  
documentation in mkheadsurf)

If the final head surface does not  
look good enough, this volume can be edited (eg, freeview  
$SUBJECTS\_DIR/$SUBJECT/mri/seghead.mgz), then mkheadsurf can be re-run  
with -noseghead.

So edit the volume, and fill in any holes in the volume (you should  
only need to fill in the outer edges (about 2-3voxels deep). it should  
be a very quick operation. It is usually a problem in the bottom  
(neck) area of the volume.

hth  
d

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 4:58pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/9 "2016-01-13T16:58:34Z")

</div>

I've seen the issue in the past and I ended up recompiling MNE with a  
looser tolerance....

that being said you can do this with python with

"mne surf2bem" no \_

and it should work.

Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 5:30pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/10 "2016-01-13T17:30:20Z")

</div>

Apparently, the problem should be due to these holes at the base of the  
neck (even near to the nose, it's not smooth at all) as it is visible in  
the attached snapshot. I still need to master a bit more freeview to fill  
the holes...  
Thanks for the help!

2016-01-13 17:58 GMT+01:00 Alexandre Gramfort \<  
alexandre.gramfort at telecom-paristech.fr\>:

> I've seen the issue in the past and I ended up recompiling MNE with a  
> looser tolerance....
> 
> that being said you can do this with python with
> 
> "mne surf2bem" no \_
> 
> and it should work.
> 
> Alex
> 
> \>  
> \> 2016-01-13 16:47 GMT+01:00 dgw \<dgwakeman at gmail.com\>:  
> \>\>  
> \>\> Hi Laetitia,  
> \>\>  
> \>\> Please see my replies in text:  
> \>\>  
> \>\> \> Dear MNE-users,  
> \>\> \>  
> \>\> \> I have a problem for two of my subjects when creating the high  
> \>\> \> resolution  
> \>\> \> head surface with mne\_surf2bem (after creating the BEM surfaces). The  
> \>\> \> error  
> \>\> \> I get is the following one. When I look to the outer\_skin.fif,  
> \>\> \> everything  
> \>\> \> looks ok. What is the problem and what could be a solution?  
> \>\>  
> \>\> The outer\_skin.fif is not created by any of these commands.  
> \>\>  
> \>  
> \>  
> \> Outer\_skin.fif is created by the mne\_flash\_bem command, but I guess it is  
> \> used by mne\_surf2bem, isn't it?  
> \>  
> \>  
> \>\>  
> \>\> \>  
> \>\> \> Thanks!  
> \>\> \> Laetitia G.  
> \>\> \>  
> \>\> \> Command:  
> \>\> \> mne\_surf2bem --surf \{SUBJECTS\_DIR\}/{SUBJECT}/surf/lh.seghead --id 4  
> \>\> \> --check --force --fif  
> \{SUBJECTS\_DIR\}/{SUBJECT}/bem/${SUBJECT}-head.fif  
> \>\>  
> \>\> This looks odd to me. Why are you trying to make lh.seghead?  
> \>\> typically, if you want to make a high resolution head surface you use  
> \>\> lh.smseghead. First, check this suggestion. Then, if you still have a  
> \>\> problem, occasionally editing the volume to make the neck for example  
> \>\> a smooth white area 2 slices thick, then re-running mkheadsurf.  
> \>\>  
> \>  
> \> I want to create this high resolution head to read it with mne\_analyze  
> and  
> \> do my coregistration (and it worked well with my other subjects). What is  
> \> the difference between lh.seghead and lh.smseghead (by the way, I don't  
> have  
> \> any lh.smseghead file in the surf directory of my subjects)?  
> \> More concretely how can I edit the volume as you suggested?  
> \>  
> \>\>  
> \>\> hth  
> \>\> d  
> \>\>  
> \>  
> \> Thanks Denis!  
> \>  
> \>\>  
> \>\> \>  
> \>\> \> Output:  
> \>\> \> mne\_surf2bem version 1.8 compiled at Jan 11 2016 04:32:34  
> \>\> \>  
> \>\> \> input file # 1 :  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \>\> \> / id = 4 / sigma N/A  
> \>\> \> output file :  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/bem/cc150418-head.fif  
> \>\> \>  
> \>\> \> New quad file : nvert = 202887 nquad = 203438  
> \>\> \> Triangle and vertex normals and neighboring triangles...[done]  
> \>\> \> Vertex neighbors... Warning: Too many neighbors for vertex  
> 107343  
> \>\> \> Warning: Too many neighbors for vertex 107345  
> \>\> \> Warning: Too many neighbors for vertex 107347  
> \>\> \> Warning: Too many neighbors for vertex 108287  
> \>\> \> Warning: Too many neighbors for vertex 108289  
> \>\> \> Warning: Too many neighbors for vertex 109198  
> \>\> \> Warning: Too many neighbors for vertex 109200  
> \>\> \> Warning: Too many neighbors for vertex 124522  
> \>\> \> Warning: Too many neighbors for vertex 125455  
> \>\> \> Warning: Too many neighbors for vertex 125456  
> \>\> \> Warning: Too many neighbors for vertex 131243  
> \>\> \> Warning: Too many neighbors for vertex 131245  
> \>\> \> Warning: Too many neighbors for vertex 132243  
> \>\> \> Warning: Too many neighbors for vertex 132245  
> \>\> \> [done]  
> \>\> \> Distances between neighboring vertices...[1219568 distances done]  
> \>\> \> Warning: 8 topological defects were fixed.  
> \>\> \> Warning: 985 vertices had incorrect number of distinct neighbors  
> \>\> \> (fixed).  
> \>\> \> valid = 1 # volume info valid  
> \>\> \> filename =  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/mri/seghead.mgz  
> \>\> \> volume = 256 256 256  
> \>\> \> voxelsize = 1.0000 1.0000 1.0000  
> \>\> \> xras = -1.0000 0.0000 0.0000  
> \>\> \> yras = 0.0000 0.0000 -1.0000  
> \>\> \> zras = 0.0000 1.0000 0.0000  
> \>\> \> cras = -0.5000 22.2651 -13.4940  
> \>\> \>  
> \>\> \>  
> /neurospin/meg/meg\_tmp/Rabbit\_LaetitiaG\_2015/freesurfer\_segmentation//cc150418/surf/lh.seghead  
> \>\> \> read. id = 4  
> \>\> \>  
> \>\> \> outer skin CM is -3.64 -8.94 -9.34 mm  
> \>\> \> Surface outer skin is not complete (sum of solid angles = 0.999986 \*  
> \>\> \> 4\*PI  
> \>\> \> instead).  
> \>\> \>  
> \>\> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \>\> \> Mne\_analysis mailing list  
> \>\> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \>\> \> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>\> \>  
> \>\> \>  
> \>\> \> The information in this e-mail is intended only for the person to whom  
> \>\> \> it is  
> \>\> \> addressed. If you believe this e-mail was sent to you in error and the  
> \>\> \> e-mail  
> \>\> \> contains patient information, please contact the Partners Compliance  
> \>\> \> HelpLine at  
> \>\> \> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to  
> you  
> \>\> \> in  
> \>\> \> error  
> \>\> \> but does not contain patient information, please contact the sender  
> and  
> \>\> \> properly  
> \>\> \> dispose of the e-mail.  
> \>\> \>  
> \>\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \>\> Mne\_analysis mailing list  
> \>\> Mne\_analysis at nmr.mgh.harvard.edu  
> \>\> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \>  
> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> Mne\_analysis mailing list  
> \> Mne\_analysis at nmr.mgh.harvard.edu  
> \> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)  
> \>  
> \>  
> \> The information in this e-mail is intended only for the person to whom  
> it is  
> \> addressed. If you believe this e-mail was sent to you in error and the  
> \> e-mail  
> \> contains patient information, please contact the Partners Compliance  
> \> HelpLine at  
> \> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> in  
> \> error  
> \> but does not contain patient information, please contact the sender and  
> \> properly  
> \> dispose of the e-mail.  
> \>  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160113/f034801a/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160113/f034801a/attachment-0001.html)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: Capture du 2016-01-13 18:25:31.png  
Type: image/png  
Size: 23034 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160113/f034801a/attachment-0001.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160113/f034801a/attachment-0001.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [January 13, 2016, 6:00pm UTC](https://mne.discourse.group/t/error-mne-surf2bem/949/11 "2016-01-13T18:00:46Z")

</div>

Hi Laetitia,

Yes the neck ones are typically the problem. From the image though, it  
looks like you have some serious signal dropout in the face, which  
makes registering to the digitizer points very difficult (and this is  
the main advantage of the high resolution surface). You may want to  
look into getting a better MR sequence/coil which has less face  
dropout.

hth  
d
