The problem is a combination of things in that mri_tessellate writes out 
a file that read_surf.m cannot read. I have fixed this in our tree. You 
can get around it by using mri_mc instead of mri_tessellate (same exact 
command line). mri_mc uses marching cubes.


On 11/05/2018 01:07 PM, Bruss, Joel E wrote:
>
>         External Email - Use Caution
>
> Bruce-
>
>
> Thank you for the reply.  I'll try to summarize what I've done (and 
> please see the attached jpeg showing my coordinate examples).
>
>
> I needed to create a surface of the scalp/skull in order to query 
> vertex coordinates in conjunction with some TMS localization.  I ran:
>
>
> mri_seghead --invol $SUBJECTS_DIR/$sub/mri/T1.mgz --outvol
> $SUBJECTS_DIR/$sub/mri/seghead.mgz --fill 255 --thresh1 20 --thresh2
> 20 --nhitsmin 2
>
> mri_tessellate $SUBJECTS_DIR/$sub/mri/seghead.mgz 255
> $SUBJECTS_DIR/$sub/surf/lh.seghead
>
> I can load lh.seghead into freeview, cursor onto a vertex and note the 
> coordinates.  I then load the file into matlab via read_surf.  I've 
> since taken care to note that matlab is +1 in vertex number.  I've 
> also ran:
>
>
> mris_curvature -w lh.seghead
>
>
> as you suggested and reread the file in matlab.  Attached are snippets 
> from freeview and matlab showing that when I query lh.pial, I see the 
> correct vertex coordinates in freeview and in matlab.  When I do the 
> same thing but use lh.seghead, the coordinates in matlab no longer 
> match the vertex coordinates that I see in freeview., even after 
> running mris_curvature -w.
>
>
> How is freeview getting "-79.51, -23.50, -0.50" and vertex #68093 for 
> lh.seghead?  If I load that file into matlab with read_surf, why do my 
> coordinates not match what I see in freeview?
>
>
> -Joel
>
>
> ------------------------------------------------------------------------
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu 
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Bruce Fischl 
> <fis...@nmr.mgh.harvard.edu>
> *Sent:* Monday, November 5, 2018 11:12:40 AM
> *To:* Freesurfer support list
> *Subject:* Re: [Freesurfer] [External] Re: Nonsensical Vertex 
> Coordinates, please help with interpretation
> Hi Joel
>
> Doug is on vacation so I'll try to help. You can use mris_curvature -w 
> ...
> to recreate the curv files, but I think that is a red herring. Can you
> summarize what is going on? Have you used mris_info to extract the 
> various
> transforms from the surface file? Did you fix the off-by-one that Doug
> noted?
> cheers
> Bruce
>
>
> On Fri, 19 Oct 2018, Bruss, Joel E wrote:
>
> >
> >         External Email - Use Caution
> >
> > Doug-
> >
> >
> > Did you have any other ideas on this?  I'm using FreeSurfer 6.0.0, 
> if that
> > helps any.  I've tried the "mkheadsurf" command on three different 
> subjects
> > and all have the same issues.  The coordinates I get in matlab are 
> nowhere
> > near what I see in Freeview.
> >
> >
> > -Joel
> >
> > 
> ____________________________________________________________________________
> > From: Bruss, Joel E
> > Sent: Tuesday, October 16, 2018 3:53:19 PM
> > To: freesurfer@nmr.mgh.harvard.edu
> > Subject: Re: [Freesurfer] [External] Re: Nonsensical Vertex Coordinates,
> > please help with interpretation
> >
> > Attached is a screenshot showing what I see in Freeview and what I 
> see in
> > Matlab.
> >
> > 
> ____________________________________________________________________________
> > From: freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Greve, Douglas
> > N.,Ph.D. <dgr...@mgh.harvard.edu>
> > Sent: Tuesday, October 16, 2018 3:15:16 PM
> > To: freesurfer@nmr.mgh.harvard.edu
> > Subject: Re: [Freesurfer] [External] Re: Nonsensical Vertex Coordinates,
> > please help with interpretation
> > which coords are you looking at? They should be the "surface RAS" 
> coords.
> >
> > On 10/16/2018 04:05 PM, Bruss, Joel E wrote:
> > >
> > >         External Email - Use Caution
> > >
> > > I couldn't remember if it's 1+ or 1-.  Either way, either direction
> > > give similar coordinates that don't match up to what I can see in
> > > FreeView.
> > >
> > > 
> ------------------------------------------------------------------------
> > > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Greve, Douglas
> > > N.,Ph.D. <dgr...@mgh.harvard.edu>
> > > *Sent:* Tuesday, October 16, 2018 1:48:14 PM
> > > *To:* freesurfer@nmr.mgh.harvard.edu
> > > *Subject:* [External] Re: [Freesurfer] Nonsensical Vertex Coordinates,
> > > please help with interpretation
> > > When you look at the vertex in matlab, are you correctly 
> accounting for
> > > the fact that FreeView uses 0-based indexing and matlab uses 1-based?
> > > Eg, vertex 234741 in Freeview would be 234742 in matlab. You seem 
> to be
> > > using 234740 in matlab below
> > >
> > > On 10/15/2018 05:11 PM, Bruss, Joel E wrote:
> > > >
> > > >         External Email - Use Caution
> > > >
> > > > I'm trying to make a surface file from a subject's head and to map
> > > > coordinates to that surface.  If I run:
> > > >
> > > >
> > > > mri_seghead --invol $SUBJECTS_DIR/$sub/mri/T1.mgz --outvol
> > > > $SUBJECTS_DIR/$sub/mri/seghead.mgz --fill 255 --thresh1 20 --thresh2
> > > > 20 --nhitsmin 2
> > > >
> > > > mri_tessellate $SUBJECTS_DIR/$sub/mri/seghead.mgz 255
> > > > $SUBJECTS_DIR/$sub/surf/lh.seghead
> > > >
> > > > and then load lh.seghead in FreeView, it looks as I would expect.
> > > > Clicking anywhere near a vertex gives the typical output, 
> showing the
> > > > closest vertex.  All fine and well. However, if I load the file in
> > > Matlab:
> > > >
> > > >
> > > > vCoord=read_surf('$SUBJECTS_DIR/$sub/surf/lh.seghead');
> > > >
> > > >
> > > > my values are nothing near what I'm seeing in Freeview.  For 
> example,
> > > > FreeView reports:
> > > >
> > > >
> > > > vertex 234741 [-78.50,14.50,26.50]
> > > >
> > > >
> > > > read_surf reports:
> > > >
> > > >
> > > > vertex 234740 0168.9800000000000
> > > >
> > > > Of note, an error log tells me that:
> > > >
> > > > MRISreadNewCurvature: incompatible vertex number in file
> > > > $SUBJECTS_DIR/$sub/surf/lh.curv
> > > >
> > > >
> > > > How do I edit, update or create a curv file to play with the new
> > > > surface file, or what can I do to get sensical surface coordinates
> > > > from this data?
> > > >
> > > > Thanks,
> > > > Joel
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 
> ------------------------------------------------------------------------
> > > > Notice: This UI Health Care e-mail (including attachments) is 
> covered
> > > > by the Electronic Communications Privacy Act, 18 U.S.C. 
> 2510-2521 and
> > > > is intended only for the use of the individual or entity to which it
> > > > is addressed, and may contain information that is privileged,
> > > > confidential, and exempt from disclosure under applicable law. 
> If you
> > > > are not the intended recipient, any dissemination, distribution or
> > > > copying of this communication is strictly prohibited. If you have
> > > > received this communication in error, please notify the sender
> > > > immediately and delete or destroy all copies of the original message
> > > > and attachments thereto. Email sent to or from UI Health Care may be
> > > > retained as required by law or regulation. Thank you.
> > > > 
> ------------------------------------------------------------------------
> > > >
> > > >
> > > > _______________________________________________
> > > > Freesurfer mailing list
> > > > Freesurfer@nmr.mgh.harvard.edu
> > > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> > >
> > >
> > > _______________________________________________
> > > Freesurfer mailing list
> > > Freesurfer@nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> > >
> > >
> > > 
> ------------------------------------------------------------------------
> > > Notice: This UI Health Care e-mail (including attachments) is covered
> > > by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and
> > > is intended only for the use of the individual or entity to which it
> > > is addressed, and may contain information that is privileged,
> > > confidential, and exempt from disclosure under applicable law. If you
> > > are not the intended recipient, any dissemination, distribution or
> > > copying of this communication is strictly prohibited. If you have
> > > received this communication in error, please notify the sender
> > > immediately and delete or destroy all copies of the original message
> > > and attachments thereto. Email sent to or from UI Health Care may be
> > > retained as required by law or regulation. Thank you.
> > > 
> ------------------------------------------------------------------------
> > >
> > >
> > > _______________________________________________
> > > Freesurfer mailing list
> > > Freesurfer@nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >
> >
> > _______________________________________________
> > Freesurfer mailing list
> > Freesurfer@nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >
> >
> > 
> ____________________________________________________________________________
> > Notice: This UI Health Care e-mail (including attachments) is 
> covered by the
> > Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is 
> intended
> > only for the use of the individual or entity to which it is 
> addressed, and
> > may contain information that is privileged, confidential, and exempt 
> from
> > disclosure under applicable law. If you are not the intended 
> recipient, any
> > dissemination, distribution or copying of this communication is strictly
> > prohibited. If you have received this communication in error, please 
> notify
> > the sender immediately and delete or destroy all copies of the original
> > message and attachments thereto. Email sent to or from UI Health 
> Care may be
> > retained as required by law or regulation. Thank you.
> >
> > 
> ____________________________________________________________________________
> >
> >
>
>
> ------------------------------------------------------------------------
> Notice: This UI Health Care e-mail (including attachments) is covered 
> by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and 
> is intended only for the use of the individual or entity to which it 
> is addressed, and may contain information that is privileged, 
> confidential, and exempt from disclosure under applicable law. If you 
> are not the intended recipient, any dissemination, distribution or 
> copying of this communication is strictly prohibited. If you have 
> received this communication in error, please notify the sender 
> immediately and delete or destroy all copies of the original message 
> and attachments thereto. Email sent to or from UI Health Care may be 
> retained as required by law or regulation. Thank you.
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to