-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Something like this should work OK:
% read some example data
% v is the vertices
% f defines faces by reference to connected vertices
fname = 'betData.off';
[v,f] = geomview_read_off(fname);
% display the surface
patch('vertices', v, 'faces', f, ...
'EdgeColor',[.8 .8 .8],...
'FaceColor',[0.9 0.9 0.9])
% write it out in a different format
fname = strrep(fname,'.off','.surf');
freesurfer_write_surf(fname, v, f);
But if you really want a .tri file (ascii format), I don't have an
output function for that. You look at freesurfer_read_ascii.m and
freesurfer_read_tri.m to create an equivalent output function.
Best, Darren
[log in to unmask] wrote:
> Dear Darren,
>
> This looks great. I'll check it out. And thanks also for the watershed tip.
>
> I'll let you know if works. :-)
>
> Best wishes,
>
> Sandy
>
>
> */Darren Weber <[log in to unmask]>/* wrote:
>
>
> Hi Sandy,
>
> I have some matlab functions for reading freesurfer files and the .off
> format. See
>
> http://www.geomview.org/docs/oogltour.html
>
> geomview_read_off.m (geomview is where I first found the .off format)
>
> freesurfer_write_surf.m
>
> These matlab files are available in my toolbox, see http://eeg.sf.net/
> and get the bioelectromagnetism module by cvs. Let me know if you need
> any help getting these files.
>
> Best, Darren
>
> PS, I also have a couple of perl scripts to convert from freesurfer to
> geomesh format.
>
> PPS, Freesurfer has methods to get the same surfaces generated by
> betsurf. I'm using this to get reasonable results:
>
> mri_watershed -atlas \
> -surf $SUBJECTS_DIR/$subjectID/bem/$subjectID \
> T1.mgz brainmask.auto.mgz
>
>
>
>
>
> [log in to unmask] wrote:
>> Hi.
>
>> Does anyone know of a way to convert a betsurf .off file into a
> surface
>> file readable by Freesurfer (e.g. .tri) ? Any suggestions would be
>> greatly appreciated. :-)
>
>> Best wishes,
>
>> Sandy
>
>
> ------------------------------------------------------------------------
>> Cheap Talk? Check out
>
>> Yahoo! Messenger's low PC-to-Phone call rates.
>
> --
>
> Darren L. Weber, Ph.D.
> Postdoctoral Scholar
>
> Dynamic Neuroimaging Laboratory,
> UCSF Department of Radiology,
> 185 Berry Street, Suite 350, Box 0946,
> San Francisco, CA 94107, USA.
>
> Tel: +1 415 353-9444
> Fax: +1 415 353-9421
> www: http://dnl.ucsf.edu/users/dweber
> pgp: http://dnl.ucsf.edu/users/dweber/dweber_pgp.html
>
> "To explicate the uses of the brain seems as difficult
> a task as to paint the soul, of which it is commonly
> said, that it understands all things but itself."
> Thomas Willis (The Anatomy of the Brain and Nerves, 1664)
> ------------------------------------------------------------------------
> Any questions? Get answers on any topic at Yahoo! Answers
> <http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx>.
> Try it now.
- --
Darren L. Weber, Ph.D.
Postdoctoral Scholar
Dynamic Neuroimaging Laboratory,
UCSF Department of Radiology,
185 Berry Street, Suite 350, Box 0946,
San Francisco, CA 94107, USA.
Tel: +1 415 353-9444
Fax: +1 415 353-9421
www: http://dnl.ucsf.edu/users/dweber
pgp: http://dnl.ucsf.edu/users/dweber/dweber_pgp.html
"To explicate the uses of the brain seems as difficult
a task as to paint the soul, of which it is commonly
said, that it understands all things but itself."
Thomas Willis (The Anatomy of the Brain and Nerves, 1664)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF50Q8xaCYN7qs0v4RArxSAKCQajUPXsxEQuGnEOSumwPUrMEfigCfZNxu
yL59G6QcjH1uBRV7anEkUtA=
=+8P7
-----END PGP SIGNATURE-----
|