⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dipplot.m

📁 含有多种ICA算法的eeglab工具箱
💻 M
📖 第 1 页 / 共 4 页
字号:
% dipplot() - Visualize EEG equivalent-dipole locations and orientations %             in the BESA spherical head model or in a averaged MRI model.% Usage:%   >> dipplot( sources, 'key', 'val', ...);%   >> [sources X Y Z XE YE ZE] = dipplot( sources, 'key', 'val', ...);%% Inputs:%   sources   -  structure array of dipole information: can contain%                either BESA or DIPFIT dipole information%                besaexent: BESA eccentricity of the dipole%                besathloc: BESA azimuth angle of the dipole%                besaphloc: BESA horizontal angle of the dipole%                besathori: BESA azimuth angle of the dipole orientation%                besaphori: BESA horiz. angle of the dipole orientation%                posxyz: DIPFIT dipole 3D carthesian position in mm%                momxyz: DIPFIT dipole 3D carthesian orientation%                optional fields for BESA and DIPFIT dipole info%                     component: component number%                     rv:        residual variance%% Optional input:%  'rvrange'  - [min max] Only plot dipoles with residual variace within the%               given range. Default: plot all dipoles.%  'summary'  - Build a summary plot with three views (top, back, side)%  'image'    - ['besa'|'mri'] Background image. %               'mri' (or 'fullmri') uses mean-MRI brain images from the Montreal %               Neurological Institute. This option can also contain a 3-D MRI%               volume (dim 1: left to right; dim 2: anterior-posterior; dim 3: %               superior-inferior). Use 'coregist' to coregister electrodes%               with the MRI. {default: 'mri'} %  'coreg'    - [cx cy cz scale pitch roll yaw] the electrodes coordinates are%               rotated in 3-D using pitch (x plane), rool (y plane) and yaw%               (z plane). They are then scaled using 'scale' and recentered to%               3-D coordinates [cx cy cz].%% Plotting options:%  'color'    - [cell array of color strings or (1,3) color arrays]. For%               exemple { 'b' 'g' [1 0 0] } gives blue, green and red. %               Dipole colors will rotate through the given colors if%               the number given is less than the number of dipoles to plot.%               A single number will be used as color index in the jet colormap.%  'view'     - 3-D viewing angle in cartesian coords.,%               [0 0 1] gives a sagittal view, [0 -1 0] a view from the rear;%               [1 0 0] gives a view from the side of the head.%  'mesh'     - ['on'|'off'] Display spherical mesh. {Default is 'on'}%  'axistight' - ['on'|'off'] For MRI only, display the closest MRI%               slide. {Default is 'off'}%  'gui'      - ['on'|'off'] Display controls. {Default is 'on'} If gui 'off', %               a new figure is not created. Useful for incomporating a dipplot %               into a complex figure.%  'num'      - ['on'|'off'] Display component number. Take into account%               dipole size. {Default: 'off'}%  'cornermri' - ['on'|'off'] force MRI images to the corner of the MRI volume%               (usefull when background is not black). Default: 'off'.%  'drawedges' - ['on'|'off'] draw edges of the 3-D MRI (black in axistight,%                white otherwise.) Default is 'off'.%  'projimg'  - ['on'|'off'] Project dipole(s) onto the 2-D images, for use%               in making 3-D plots {Default 'off'}%  'projlines' - ['on'|'off'] Plot lines connecting dipole with 2-D projection.%                Color is dashed black for BESA head and dashed black for the%                MNI brain {Default 'off'}%  'projcol'   - [color] color for the projected line {Default is same as dipole}%  'dipolesize' - Size of the dipole sphere(s) {Default: 30}%  'dipolelength' - Length of the dipole bar(s) {Default: 1}%  'pointout' - ['on'|'off'] Point the dipoles outward. {Default: 'off'}%  'sphere'   - [float] radius of sphere corresponding to the skin. Default is 1.%  'spheres'  - ['on'|'off'] {default: 'off'} plot dipole markers as 3-D spheres. %               Does not yet interact with gui buttons, produces non-gui mode.%  'spheresize' - [real>0] size of spheres (if 'on'). {default: 5}%  'normlen'  - ['on'|'off'] Normalize length of all dipoles. {Default: 'off'}%  'std'      - [cell array] plot standard deviation of dipoles. i.e.%               { [1:6] [7:12] } plot two elipsoids that best fit all the dipoles%               from 1 to 6 and 7 to 12 with radius 1 standard deviation.%               { { [1:6] 2 'linewidth' 2 } [7:12] } do the same but now the%               first elipsoid is 2 standard-dev and the lines are thicker.% Outputs:%   sources   - EEG.source structure with updated 'X', 'Y' and 'Z' fields%   X,Y,Z     - Locations of dipole heads (Cartesian coordinates). If there is%               more than one dipole per components, the last dipole is returned.%   XE,YE,ZE  - Locations of dipole ends (Cartesian coordinates). The same%               remark as above applies.%% Author: Arnaud Delorme, CNL / Salk Institute, 1st July 2002%% Notes: Visualized locations are not exactly the same as in BESA (because of% manual tuning of the size of the head textures).  Because of a bug in the % Matlab warp() function, the side-view texture cannot be displayed. % To diplay head textures, the files 'besarear.pcx' and 'besasagittal.pcx' % are required. The Matlab image processing toolbox is also required.%% Example:%  % position and orientation of the first dipole%  sources(1).besaexent= 69.036;%  sources(1).besathloc= -26.71;%  sources(1).besaphloc= 19.702;%  sources(1).besathori= -80.02;%  sources(1).besaphori= 87.575;%  sources(1).rv = 0.1;%  % position and orientation of the second dipole%  sources(2).besaexent= 69.036;%  sources(2).besathloc= 46;%  sources(2).besaphloc= 39;%  sources(2).besathori= 150;%  sources(2).besaphori= -3;%  sources(2).rv = 0.05;%  % plot of the two dipoles (first in green, second in blue)%  dipplot( sources, 'color', { 'g' 'b' }); %%  % To make a stereographic plot%  figure; %  subplot(1,2,1); dipplot( sources, 'view', [43 10], 'gui', 'off');%  subplot(1,2,2); dipplot( sources, 'view', [37 10], 'gui', 'off');%%  % To make a summary plot%  dipplot( sources, 'summary', 'on', 'dipolesize', 15, 'mesh', 'off');%% See also: eeglab(), dipfit()%123456789012345678901234567890123456789012345678901234567890123456789012% Copyright (C) 2002 Arnaud Delorme%% This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2 of the License, or% (at your option) any later version.%% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the% GNU General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this program; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA% README -- Plotting strategy:% - All buttons have a tag 'tmp' so they can be removed% - The component-number buttons have 'userdata' equal to 'editor' and %   can be found easily by other buttons find('userdata', 'editor')% - All dipoles have a tag 'dipoleX' (X=their number) and can be made %     visible/invisible% - The gcf object 'userdat' field stores the handle of the dipole that %     is currently being modified% - Gca 'userdata' stores imqge names and position%$Log: dipplot.m,v $%Revision 1.100  2004/06/15 17:57:06  arno%do not know%%Revision 1.99  2004/06/11 00:16:12  arno%change light%%Revision 1.98  2004/06/09 21:15:01  arno%debug projcol%%Revision 1.97  2004/06/09 21:12:34  arno%fixing projcolor%%Revision 1.96  2004/06/09 16:27:11  arno%color debug%%Revision 1.95  2004/06/02 22:47:38  arno%debug color%%Revision 1.94  2004/06/02 22:44:03  arno%projection color decoding%%Revision 1.93  2004/06/02 22:15:42  arno%debug color problem%%Revision 1.92  2004/06/01 20:37:01  arno%fixing projection color%%Revision 1.91  2004/06/01 18:48:31  arno%fixing spheres%%Revision 1.90  2004/06/01 16:53:35  scott%spherecolor now works (undocumented) but gives weird color palette ??%%Revision 1.89  2004/06/01 15:48:50  scott%sphere colors%%Revision 1.88  2004/06/01 05:03:41  scott%sphere color%%Revision 1.87  2004/06/01 01:06:28  scott%still puzzling about spheres colors ...%%Revision 1.86  2004/05/13 18:57:48  arno%plot middle of two dipoles%%Revision 1.85  2004/05/10 14:37:59  arno%image type%%Revision 1.84  2004/05/05 15:25:41  scott%typo%%Revision 1.83  2004/05/05 15:24:50  scott%typo%,%%Revision 1.82  2004/05/05 15:24:00  scott%working on sphere coloring -> ????????%%Revision 1.81  2004/05/05 01:17:27  scott%added spheresize%%Revision 1.80  2004/05/05 00:52:11  scott%dipole length 0 + 'spheres' again...%%Revision 1.79  2004/05/04 17:04:22  scott%test for s1, p1 if spheres on%%Revision 1.78  2004/05/04 05:37:26  scott%turn off 'spheres' cylinder plotting if g.dipolelenth == 0%%Revision 1.77  2004/04/30 18:48:53  scott%made default image 'mri' - debugged spheres/cylinders%%Revision 1.76  2004/04/29 15:35:32  scott%adding cylinders for spheres pointers%%Revision 1.75  2004/04/14 01:40:32  scott%hid 'spheres' option%%Revision 1.74  2004/04/13 18:24:58  scott%nothing%%Revision 1.73  2004/04/12 23:40:50  arno%nothing%%Revision 1.72  2004/03/26 01:39:04  arno%only plotting active dipoles%%Revision 1.71  2004/03/26 01:22:20  arno%mricorner with tightview%%Revision 1.70  2004/03/26 00:57:17  arno%read custom mri%%Revision 1.69  2004/02/27 19:13:25  arno%nothing%%Revision 1.68  2004/02/23 19:17:00  arno%remove debug msg%%Revision 1.67  2004/02/23 19:16:16  arno%fixing 2 dipole problem%%Revision 1.66  2004/02/23 19:09:05  arno%*** empty log message ***%%Revision 1.65  2004/01/28 15:26:14  arno%detecting empty dipoles%%Revision 1.64  2003/11/05 20:30:51  arno%nothing%%Revision 1.63  2003/11/05 18:50:28  arno%nothing%%Revision 1.62  2003/10/31 23:29:29  arno%dicreases dipole size for summary mode%%Revision 1.61  2003/10/31 19:50:38  arno%reordering 2 dipoles, delete old edges%%Revision 1.60  2003/10/31 18:59:41  arno%divide rvrange by 100%%Revision 1.59  2003/10/30 03:25:17  arno%adding projection lines%%Revision 1.58  2003/10/29 23:44:38  arno%don't know%%Revision 1.57  2003/10/27 18:50:06  arno%adding edges%%Revision 1.56  2003/10/09 01:02:12  arno%nothing%%Revision 1.55  2003/09/11 00:53:04  arno%same%%Revision 1.54  2003/09/11 00:52:38  arno%documenting new arg cornermri\%%Revision 1.53  2003/09/11 00:51:19  arno%adding new param cornermri%%Revision 1.52  2003/08/13 00:46:07  arno%*** empty log message ***%%Revision 1.51  2003/08/04 21:29:06  arno%scale besa for summary plot%%Revision 1.50  2003/08/04 21:15:54  arno%num color on MRI%%Revision 1.49  2003/08/04 19:08:09  arno%fixing normlen in summarize mode%%Revision 1.48  2003/07/31 23:37:07  arno%adding property to structure attatched to dipole%%Revision 1.47  2003/07/31 23:30:05  arno%*** empty log message ***%%Revision 1.46  2003/07/24 17:08:03  arno%making component number for dipfit%%Revision 1.45  2003/07/22 01:10:06  arno%*** empty log message ***%%Revision 1.44  2003/07/21 22:04:09  arno%debug for Matlab 5.3%%Revision 1.43  2003/07/21 21:55:14  arno%fixing MNI brain for distribution%%Revision 1.42  2003/07/16 18:39:14  arno%nothing%%Revision 1.41  2003/07/03 00:02:43  arno%undo last change%%Revision 1.40  2003/07/02 23:48:56  arno%changing outputs%%Revision 1.39  2003/07/02 23:38:58  arno%debuging projections and summary%%Revision 1.38  2003/07/01 23:52:50  arno%test for sphere 1 before renormalizing%%Revision 1.37  2003/07/01 23:49:21  arno%try to implement contextual menu: does not work in 3-D%%Revision 1.36  2003/07/01 22:10:14  arno%debuging for 2 dipoles/component%%Revision 1.35  2003/07/01 19:04:13  arno%fixing view problem%%Revision 1.34  2003/07/01 00:21:18  arno%implementing 3-D MNI volume%%Revision 1.33  2003/06/12 23:49:56  arno

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -