Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak
Burak,
I've update mris_convert so that it outputs the normal vectors of each vertex of the surface. You can get this binary for Linux here:
ftp://surfer.nmr.mgh.harvard.edu/pub/dist
Copy the file mris_convert.gz to your $FREESURFER_HOME/bin, then type:
gunzip mris_convert.gz chmod a+x mris_convert
Then type 'mris_convert' for help. The new flag is '-n', so example usage is:
mris_convert -n lh.white lh.white.normals.asc
Recall that:
mris_convert lh.white lh.white.asc
will give you the file lh.white.asc containing the xyz of each vertex (plus face info), so of course this file is paired with lh.white.normals.asc (the difference being that this file has the normal vectors for each vertex).
Hope this is what you needed.
Nick
On Fri, 2007-05-04 at 18:46 +0200, burak ozkalayci wrote:
Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Nick, Thanks a lot. That is just what I am looking for, and it is working perfect.
Burak
Nick Schmansky wrote:
Burak,
I've update mris_convert so that it outputs the normal vectors of each vertex of the surface. You can get this binary for Linux here:
ftp://surfer.nmr.mgh.harvard.edu/pub/dist
Copy the file mris_convert.gz to your $FREESURFER_HOME/bin, then type:
gunzip mris_convert.gz chmod a+x mris_convert
Then type 'mris_convert' for help. The new flag is '-n', so example usage is:
mris_convert -n lh.white lh.white.normals.asc
Recall that:
mris_convert lh.white lh.white.asc
will give you the file lh.white.asc containing the xyz of each vertex (plus face info), so of course this file is paired with lh.white.normals.asc (the difference being that this file has the normal vectors for each vertex).
Hope this is what you needed.
Nick
On Fri, 2007-05-04 at 18:46 +0200, burak ozkalayci wrote:
Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
We don't have a way to produce ascii output for surface normals, but you can do it by creating them in mgh format with mri_surf2surf, then reading that file into matlab with MRIread, then creating the ascii yourself.
doug
burak ozkalayci wrote:
Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
I don't see how this can work. Looking at the matlab code for MRIread.m, it appears to read mgh files as volume data (which makes sense to me). How can you get a list of values on a per-vertex basis from that?
This is part of my larger confusion about surface formats... I've seen many places where it seems to be recommended to save surface overlay information in mgh format, but I don't understand how this works, because as far as I can tell mgh is a volume format...
On May 7, 2007, at 11:22 AM, Doug Greve wrote:
We don't have a way to produce ascii output for surface normals, but you can do it by creating them in mgh format with mri_surf2surf, then reading that file into matlab with MRIread, then creating the ascii yourself.
doug
burak ozkalayci wrote:
Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/ msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- -dave---------------------------------------------------------------- After all, it is not *that* inexpressible. -H.H. The Dalai Lama
It's a bit of a hack to store the data in a more general format. When saving in a "volume" format, it sets the number of columns to the number of vertices and the number of rows and slices to 1. This does not work in analyze/nitfti because they cannot represent more than 32k in one dimension (sometimes we reshape to fit). So don't think of these things as volume formats. They are just ways to save arrays of data (most of which happens to be volumes).
doug
David Perlman wrote:
I don't see how this can work. Looking at the matlab code for MRIread.m, it appears to read mgh files as volume data (which makes sense to me). How can you get a list of values on a per-vertex basis from that?
This is part of my larger confusion about surface formats... I've seen many places where it seems to be recommended to save surface overlay information in mgh format, but I don't understand how this works, because as far as I can tell mgh is a volume format...
On May 7, 2007, at 11:22 AM, Doug Greve wrote:
We don't have a way to produce ascii output for surface normals, but you can do it by creating them in mgh format with mri_surf2surf, then reading that file into matlab with MRIread, then creating the ascii yourself.
doug
burak ozkalayci wrote:
Hi all,
I want to get an ascii file listing the normal vectors of each vertex of the surface (white or pial). In http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/ msg02210.html mri_surf2surf is adviced to used but I could not find any example usage for creating vertex normals. And I appreciate any help on converting the output of the mri_surf2surf to ascii file.
One more question about the vertex normals. using tksurfer to see the surfaces, the normals of the selected vertices are printed on the console. to use mri_surf2surf the sphere.reg files are needed and they are created at the 3rd step of reconall. If there is any straightway to get those vertex normals from the surface definition like tksurfer do, I prefer it since I do not want to wait for the reconall 3.
Thanks in advance.
Burak _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- -dave---------------------------------------------------------------- After all, it is not *that* inexpressible. -H.H. The Dalai Lama
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
OK, so if you load in an mgh file containing (say) thickness data, you'll get a mri struct where mri.vol is Nx1x1 where N is the number of vertices. So far so good. How is the data structured if you load in an mgh file containing surface normals?
On May 7, 2007, at 5:31 PM, Doug Greve wrote:
It's a bit of a hack to store the data in a more general format. When saving in a "volume" format, it sets the number of columns to the number of vertices and the number of rows and slices to 1. This does not work in analyze/nitfti because they cannot represent more than 32k in one dimension (sometimes we reshape to fit). So don't think of these things as volume formats. They are just ways to save arrays of data (most of which happens to be volumes).
-- -dave---------------------------------------------------------------- After all, it is not *that* inexpressible. -H.H. The Dalai Lama
There should be 3 frames, so Nx1x1x3. Note that it might be reshaped, so it would be something like N/7 x 7 x 1 x nframes
David Perlman wrote:
OK, so if you load in an mgh file containing (say) thickness data, you'll get a mri struct where mri.vol is Nx1x1 where N is the number of vertices. So far so good. How is the data structured if you load in an mgh file containing surface normals?
On May 7, 2007, at 5:31 PM, Doug Greve wrote:
It's a bit of a hack to store the data in a more general format. When saving in a "volume" format, it sets the number of columns to the number of vertices and the number of rows and slices to 1. This does not work in analyze/nitfti because they cannot represent more than 32k in one dimension (sometimes we reshape to fit). So don't think of these things as volume formats. They are just ways to save arrays of data (most of which happens to be volumes).
-- -dave---------------------------------------------------------------- After all, it is not *that* inexpressible. -H.H. The Dalai Lama
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu