# Missing BEM sub folder freesurfer

**URL:** <https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327>\
**Category:** Support & Discussions\
**Created:** [January 27, 2022, 11:40pm UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327 "2022-01-27T23:40:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subrat\_Bastola](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/subrat_bastola/32/1190_2.png) [@Subrat\_Bastola](https://mne.discourse.group/u/Subrat_Bastola)\
**Post date:** [January 27, 2022, 11:40pm UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/1 "2022-01-27T23:40:12Z")

</div>

Hi, I wanted to perform source localization of my result and for that I would need to work with free surfer. I performed the MRI reconstruction with Free surfer on my virtual box, the process completed in 3 hrs, however I have BEM folder missing. The terminal result shows that the process was completed without any errors, yet I am unable to see the BEM subfolder? Why is it so? The MNE tutorial says and I quote:

`The first processing stage is the creation of various surface reconstructions. Usually a full FreeSurfer reconstruction is obtained by the following commands:

my\_subject=sample

my\_NIfTI=/path/to/NIfTI.nii.gz

recon-all -i $my\_NIfTI -s $my\_subject -all

where `i` stands for “input” and `s` for “subject”. Executing this will create the folder `$SUBJECTS_DIR/sample` and populate it with several subfolders ( `bem` , `label` , `mri` , etc).`

However I don’t get a folder called BEM after the reconstruction is over? Is this a problem? Are there further steps to this that I am missing?  
What should I do to fix this?

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/5/5398a00ee05f7a2b280f61efca5779d49b4f2122.jpeg)  
 ![20220127_165219](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/4/40e413c9bca93ca3534d8772d9d900ee0d010611.jpeg)

---

<div class="post-metadata">

**Author:** ![BarryLiu97](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barryliu97/32/33_2.png) [@BarryLiu97](https://mne.discourse.group/u/BarryLiu97)\
**Post date:** [January 28, 2022, 12:22am UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/2 "2022-01-28T00:22:48Z")

</div>

Hi, You could use MNE to generate that.  
Look at [mne.bem.make\_watershed\_bem — MNE 0.24.1 documentation](https://mne.tools/stable/generated/mne.bem.make_watershed_bem.html#mne.bem.make_watershed_bem)

---

<div class="post-metadata">

**Author:** ![Subrat\_Bastola](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/subrat_bastola/32/1190_2.png) [@Subrat\_Bastola](https://mne.discourse.group/u/Subrat_Bastola)\
**Post date:** [January 28, 2022, 12:38am UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/3 "2022-01-28T00:38:32Z")

</div>

Hi Barry, Thank you for the response. Could you help me with the documentation to compute forward model with MNE in a sequential order? I went through the available tutorials and they are really confusing as to which step I need to approach when.

what is trans.fif, how do I generate it? These are all confusing.

Any sequential documentation would help

---

<div class="post-metadata">

**Author:** ![BarryLiu97](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barryliu97/32/33_2.png) [@BarryLiu97](https://mne.discourse.group/u/BarryLiu97)\
**Post date:** [January 28, 2022, 1:37am UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/4 "2022-01-28T01:37:13Z")

</div>

Sorry, I have no experience with source localization.  
I just no you could use to generate BEM segmentation using

```python
mne.bem.make_watershed_bem

```

---

<div class="post-metadata">

**Author:** ![agramfort](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@agramfort](https://mne.discourse.group/u/agramfort)\
**Post date:** [January 28, 2022, 7:35am UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/5 "2022-01-28T07:35:47Z")

</div>

yes just now use mne.bem.make\_watershed\_bem

however you should not call your subjects sample. Use the name that is  
meaningful for you (name or code of your subject)

Alex

---

<div class="post-metadata">

**Author:** ![neurosignal](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/neurosignal/32/200_2.png) [@neurosignal](https://mne.discourse.group/u/neurosignal)\
**Post date:** [January 5, 2023, 9:59am UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/6 "2023-01-05T09:59:30Z")

</div>

Just after the **recon-all** , you can run these commands on the fly to produce the BEM surfaces and more:

```python
# for bem surface computation (or generating the full bem directory as you asked), use 
mne watershed_bem --subject=$my_subject --overwrite
# for generating a dense scalp surface, better for MEG/EEG - MRI coregistration, use
mne_make_scalp_surfaces --subject=$my_subject --overwrite

```

Please make sure you have installed MNE-C ([Installing MNE-C — MNE 1.3.0 documentation](https://mne.tools/stable/install/mne_c.html))

Cheers.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [January 5, 2023, 6:19pm UTC](https://mne.discourse.group/t/missing-bem-sub-folder-freesurfer/4327/7 "2023-01-05T18:19:07Z")

</div>

> [@neurosignal](#):
>
> Please make sure you have installed MNE-C ([Installing MNE-C — MNE 1.3.0 documentation](https://mne.tools/stable/install/mne_c.html))

Using MNE-C is not strictly necessary; this step:

> [@neurosignal](#):
>
> ```python
> mne_make_scalp_surfaces --subject=$my_subject --overwrite
> 
> ```

can be done with MNE-Python; the command is `mne make_scalp_surfaces`.

[https://mne.tools/stable/generated/commands.html#mne-make-scalp-surfaces](https://mne.tools/stable/generated/commands.html#mne-make-scalp-surfaces)

And you can even do that from within Python via `mne.bem.make_scalp_surfaces()`:  
[https://mne.tools/stable/generated/mne.bem.make\_scalp\_surfaces.html](https://mne.tools/stable/generated/mne.bem.make_scalp_surfaces.html)

Best wishes,  
Richard
