eeg_plot_surf_contours

eeg_plot_surf_contours - function p =...

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

View Full Document Right Arrow Icon
function [ p ] = eeg_plot_surf_contours(p,mode) % eeg_plot_surf_contours - plot 3D contours on triangulated surface % % Usage: [p] = eeg_contours_3d(p,[mode]) % % p is the eeg_toolbox struct (see eeg_toolbox_defaults) % % mode is: % % 'rb' for +ve red, -ve blue % 'bw' for +ve solid black, -ve dashed black (default) % % In development! % % $Revision: 1.1 $ $Date: 2009/04/28 22:13:52 $ % Licence: Gnu GPL, no express or implied warranties % History: 04/03 Darren.Weber_at_radiology.ucsf.edu % obtained permission from Robert Oostenveld to % distribute his code below under the GPL % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fprintf('\nEEG_PLOT_SURF_CONTOURS (%s). ..\n',['$Revision: 1.1 $']); tic; % confirm that a patch surface is available if isfield(p,'mesh'), if isfield(p.mesh,'data'), if isfield(p.mesh.data,'timeseries'), if isempty(p.mesh.data.Cdata{p.mesh.current}), msg = sprintf('. ..p.mesh.data.Cdata{%d} is empty\n',p.mesh.current); error(msg); end end end else error('. ..p.mesh.data is empty - load mesh first\n'); end if ~exist('mode','var'), mode = 'bw'; end if isempty(mode), mode = 'bw'; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Determine/validate the min, max surface color data range %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Select mesh timeseries values at samplePoint switch p.mesh.data.meshtype{p.mesh.current}, case {'scalp','elec'}, samplePoint = p.volt.samplePoint; otherwise samplePoint = p.mesh.samplePoint; end
Background image of page 1

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

View Full Document Right Arrow Icon
% get vertices and faces of mesh vertices = p.mesh.data.vertices{p.mesh.current}; faces = p.mesh.data.faces{p.mesh.current}; % get number of vertices nvert = size(p.mesh.data.vertices{p.mesh.current},1); % Assume more vertices than time points [s1,s2] = size(p.mesh.data.Cdata{p.mesh.current}); if isequal(nvert,s1), % vertices in rows, timepoints in columns meshCdata = p.mesh.data.Cdata{p.mesh.current}(:,samplePoint); else,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

eeg_plot_surf_contours - function p =...

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

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