elec_load_scan_tri

elec_load_scan_tri - function [tri] =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function [tri] = elec_load_scan_tri(file) % elec_load_scan_tri - read sensor coordinates from Scan .tri files % % INPUTS: % file - string, name of the .tri file % OUTPUTS: % tri.hdr - header and electrode fields % tri.XYZ - electrode coordinates (tri.hdr.elec) % tri.label - first 4 letters of electrode names % % Also check small script at the end of the code to print % out coordinates together with names (a fast hack) % % Information on Neuroscan .tri format is at % http://www.neuro.com/neuroscan/triformat.htm, which % is copied at the end of this function .m file % % .tri faces and vertices are not returned in this version % % $Revision: 1.1 $ $Date: 2009/04/28 22:13:55 $ % Licence: GNU GPL, no express or implied warranties % History: 10/2002, Yaroslav Halchenko, CS Dept. UNM % (yoh@onerussian.com, ICQ#: 60653192) % 01/2003, Darren.Weber_at_radiology.ucsf.edu %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fid = fopen(file,'r'); if isequal(fid,-1), msg = sprintf('Could not open file: "%s"',file); error(msg); else fprintf('. ..Reading NeuroScan Tesselation (.tri)'); tri.hdr.ID = fread(fid,1,'long'); % Long ID (should be 100003, or 100004. (or 100002) ) tri.hdr.filetype = fread(fid,1,'short'); % Short Filetype (=2 for triangle file) tri.hdr.rev
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/04/2010 for the course ENG 42336 taught by Professor Thomasholland during the Spring '10 term at UC Davis.

Page1 / 4

elec_load_scan_tri - function [tri] =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online