[Mne_analysis] Error mne_surf2bem

dgw dgwakeman at gmail.com
Wed Jan 13 11:35:57 EST 2016
Search archives:

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

On Wed, Jan 13, 2016 at 11:30 AM, Laetitia Grabot
<laetitia.grabot at gmail.com> wrote:
> 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
> --------------------------------
> mercredi 13 janvier 2016, 17:20:14 (UTC+0100)
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/raw
> mri_seghead --invol
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/mri/T1.mgz
> --outvol
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/mri/seghead.mgz
> --fill 255 --thresh1 20 --thresh2 20 --nhitsmin 2
> --------------------------------
> input volume:
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/mri/T1.mgz
> output volume:
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/mri/seghead.mgz
> threshold1:    20
> threshold2:    20
> nhitsmin:      2
> fill value:    255
> Loading input volume
> Filling Columns
> Filling Rows
> Filling Slices
> Merging and Inverting
> Growing
> Counting
> N Head Voxels = 4152415
> N Back Voxels = 12624801
> Avg. Back Intensity = 1.873793
> Writing output
> Done
> --------------------------------
> mercredi 13 janvier 2016, 17:20:23 (UTC+0100)
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/raw
> mri_tessellate
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/mri/seghead.mgz
> 255
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead
> --------------------------------
> $Id: mri_tessellate.c,v 1.36 2011/03/02 00:04:25 nicks Exp $
>   $Id: mrisurf.c,v 1.693.2.7 2013/05/12 22:28:01 nicks Exp $
> slice 20: 1948 vertices, 2084 faces
> slice 30: 9920 vertices, 10146 faces
> slice 40: 20273 vertices, 20656 faces
> slice 50: 34962 vertices, 35510 faces
> slice 60: 52931 vertices, 53483 faces
> slice 70: 65372 vertices, 65913 faces
> slice 80: 76493 vertices, 77128 faces
> slice 90: 88516 vertices, 89255 faces
> slice 100: 101315 vertices, 102093 faces
> slice 110: 113690 vertices, 114530 faces
> slice 120: 125408 vertices, 126220 faces
> slice 130: 136601 vertices, 137466 faces
> slice 140: 147417 vertices, 148287 faces
> slice 150: 157862 vertices, 158732 faces
> slice 160: 167342 vertices, 168191 faces
> slice 170: 176668 vertices, 177506 faces
> slice 180: 186488 vertices, 187323 faces
> slice 190: 196817 vertices, 197657 faces
> slice 200: 209603 vertices, 210484 faces
> slice 210: 222573 vertices, 223399 faces
> slice 220: 227457 vertices, 228130 faces
> slice 230: 228785 vertices, 229419 faces
> slice 240: 228810 vertices, 229434 faces
> slice 250: 228810 vertices, 229434 faces
> using the conformed surface RAS to save vertex points...
> writing
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead
> using vox2ras matrix:
> -1.000   0.000   0.000   128.000;
>  0.000   0.000   1.000  -128.000;
>  0.000  -1.000   0.000   128.000;
>  0.000   0.000   0.000   1.000;
> --------------------------------
> mercredi 13 janvier 2016, 17:20:26 (UTC+0100)
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/raw
> mris_smooth -n 10 -b area.seghead -c curv.seghead
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead
> --------------------------------
> smoothing for 10 iterations
> smoothing surface tessellation for 10 iterations...
> smoothing complete - recomputing first and second fundamental forms...
> writing smoothed curvature to
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.curv.seghead
> writing smoothed area to
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.area.seghead
> --------------------------------
> mercredi 13 janvier 2016, 17:20:33 (UTC+0100)
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/raw
> mris_inflate -n 10 -sulc sulc.seghead
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead.inflated
> --------------------------------
> niterations = 10
> sulc name = sulc.seghead
> avg radius = 103.0 mm, total surface area = 151855 mm^2
> writing inflated surface to
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.seghead.inflated
> writing sulcal depths to
> /neurospin/meg/meg_tmp/Rabbit_LaetitiaG_2015/freesurfer_segmentation//lb140113/surf/lh.sulc.seghead
> step 060: RMS=0.029 (target=0.015)
> inflation complete.
> inflation took 0.8 minutes
> Started at: mercredi 13 janvier 2016, 17:20:14 (UTC+0100)
> Ended   at: mercredi 13 janvier 2016, 17:21:22 (UTC+0100)
> mkheadsurf done
>
> 2016-01-13 17:24 GMT+01:00 dgw <dgwakeman at gmail.com>:
>>
>> On Wed, Jan 13, 2016 at 11:21 AM, Laetitia Grabot
>> <laetitia.grabot at gmail.com> wrote:
>> >
>> >
>> > 2016-01-13 17:14 GMT+01:00 dgw <dgwakeman at gmail.com>:
>> >>
>> >> On Wed, Jan 13, 2016 at 11:05 AM, Laetitia Grabot
>> >> <laetitia.grabot at gmail.com> wrote:
>> >> >
>> >> > 2016-01-13 16:47 GMT+01:00 dgw <dgwakeman at gmail.com>:
>> >> >>
>> >> >> Hi Laetitia,
>> >> >>
>> >> >> Please see my replies in text:
>> >> >>
>> >> >> On Wed, Jan 13, 2016 at 10:04 AM, Laetitia Grabot
>> >> >> <laetitia.grabot at gmail.com> wrote:
>> >> >> > 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?
>>
>>
>> >
>> >
>> >>
>> >>
>> >> > 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
>> >> >> >
>> >> >> >
>> >> >> > 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 . 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
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Mne_analysis mailing list
>> >> > Mne_analysis at nmr.mgh.harvard.edu
>> >> > 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 . 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
>> >
>> >
>> >
>> > _______________________________________________
>> > Mne_analysis mailing list
>> > Mne_analysis at nmr.mgh.harvard.edu
>> > 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 . 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
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> 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 . 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.
>


More information about the Mne_analysis mailing list