Bruce
I wrote the code in matlab, and it works ok. My code is available at: http://www.nmr.mgh.harvard.edu/~daniel/links/matlab/labels_to_annot.m
It isn't elegant though. The annotation file does not name each label, and the colors appear to be fairly random.
If I had more knowledge of the annotation file format, I could fix this, but nonetheless it works as is. Anyone out there with the desire to use it is free to do so.
Daniel
On Thu, 22 Jul 2004, Bruce Fischl wrote:
Hi Daniel,
here's a .m file for reading in the .annot files, which should give you the format.
cheers, Bruce
On Thu, 22 Jul 2004, Daniel Goldenholz wrote:
Ok. Well I wouldn't mind whipping this up in matlab, but I need to know the format.
Daniel
On Thu, 22 Jul 2004, Doug Greve wrote:
You'd also have to make sure that the labels did not overlap as there is no way to represent this in the annot file.
doug
Bruce Fischl wrote:
no, I don't think so. I guess you'd need a color file as well. It would be pretty easy....
Bruce
On Wed, 21 Jul 2004, Daniel Goldenholz wrote:
Is there a command out there that converts a set of labels into an annot file automatically? It would be very useful...
_______________________________________________ Freesurfer mailing list [EMAIL PROTECTED] https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422
-- Daniel Goldenholz ----------------------------------------------------- Cell: 617-935-9421 http://people.bu.edu/danielg/
function [annots] = read_annotation(fname)
% % [annots] = read_annotation(fname) % reads a binary annotation file into a vector % % open it as a big-endian file fid = fopen(fname, 'rb', 'b') ; if (fid < 0) str = sprintf('could not open annotation file %s.', fname) ; error(str) ; end vnum = fread(fid, 1, 'int32') ; tmp = fread(fid, vnum*2, 'int') ; annots = tmp(2:2:vnum*2) ; fclose(fid) ;
_______________________________________________ Freesurfer mailing list [EMAIL PROTECTED] https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer