0001 function movie_left_view_create(fiber_tracking_file, ...
0002 current_file, movie_file, Timefrom, Tfreq)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 if exist(fiber_tracking_file, 'file') ~= 2
0025 error('fiber_tracking_file not found.');
0026 end
0027 if exist(current_file, 'file') ~= 2
0028 error('current_file not found.');
0029 end
0030 if ~exist('movie_file', 'var')
0031 movie_file = [];
0032 elseif ~isempty(movie_file)
0033 [p_, f_, e_] = fileparts(movie_file);
0034 if exist(p_, 'dir') ~= 7
0035 mkdir(p_);
0036 end
0037 end
0038
0039 if ~exist('Timefrom', 'var')
0040 Timefrom = 0;
0041 end
0042 if ~exist('Tfreq', 'var')
0043 Tfreq = 1000;
0044 end
0045
0046
0047
0048
0049
0050
0051 plot_para.conn_file = fiber_tracking_file;
0052 plot_para.curr_file = current_file;
0053
0054
0055 plot_para.fig_unit = 'pixels';
0056 plot_para.fig_pos = [200, 200, 768, 720];
0057
0058
0059 plot_para.faceclr = [0.8 0.7 0.6];
0060 plot_para.faceclr0 = [1 1 1];
0061 plot_para.alpha = [0.1 0.1 0.01];
0062
0063
0064 plot_para.face_on = 1;
0065 plot_para.alpha_face = 0.5;
0066 plot_para.face_file = which('Subject.face.mat');
0067 plot_para.zoom_factor= 1.3;
0068
0069
0070 plot_para.alpha_area = [0.8 0.08 0.01];
0071 plot_para.cbox = 0;
0072
0073
0074 plot_para.angle = [-90 0];
0075 plot_para.dang = [0 0];
0076 plot_para.Ntime = 0;
0077
0078
0079 plot_para.roi = 0;
0080
0081
0082 plot_para.Tfreq = Tfreq;
0083 plot_para.Timefrom= Timefrom;
0084 plot_para.Tstay = 100;
0085 plot_para.Tstop = 600;
0086
0087
0088 plot_para.Nskip = 1;
0089 plot_para.Nstep = 1;
0090
0091
0092
0093
0094 plot_para.pmove = 1;
0095 plot_para.pause1 = 0.01;
0096 plot_para.pause2 = 0.05;
0097
0098 plot_para.dN = 10;
0099 plot_para.dr = 0.3;
0100
0101 plot_para.omega = 0.5;
0102
0103 plot_para.show_max = 1;
0104 plot_para.abs_mode = 1;
0105 plot_para.max_norm = 1;
0106 plot_para.wmulti = 0;
0107 plot_para.vertex_show = 2;
0108 plot_para.Msize = 10;
0109 plot_para.th_show = 0.8;
0110
0111
0112 plot_para.mbox = 0;
0113 plot_para.video = 0;
0114 if ~isempty(movie_file)
0115 plot_para.video = 1;
0116 plot_para.video_dir = p_;
0117 end
0118
0119
0120 color_parm.Nlevel = 64;
0121 color_parm.Nwidth = 13;
0122 color_parm.Ncycle = 20;
0123 color_parm.Nrepeat = 5;
0124 color_parm.Nback = 21;
0125 color_parm.mode = 'gradation';
0126
0127
0128 color_parm.active_color = 'white';
0129 color_parm.rest_color = 'navyblue';
0130 color_parm.back_color = 'blue';
0131
0132
0133
0134 C1 = cmap_move2(color_parm);
0135
0136
0137
0138 color_parm.active_color = 'yellow';
0139 color_parm.rest_color = 'orange';
0140 color_parm.back_color = 'bottlegreen';
0141
0142 C2 = cmap_move2(color_parm);
0143
0144
0145 plot_para.cmap = C1;
0146 plot_para.cmap2 = C2;
0147
0148
0149 connection = load_connection_from_vmni_connect_file(plot_para.conn_file);
0150
0151
0152 close all;
0153 [hfig, Q, id] = plot_cylinder_prepare(connection, plot_para);
0154 set(gca, 'Position', [0.0500 0.1100 0.7750 0.8150]);
0155
0156 plot_cylinder_anime(plot_para, hfig, Q, id);
0157
0158 if plot_para.video
0159 [success, message] = movefile(fullfile(p_, 'cylinder.avi'), movie_file);
0160 if success
0161 disp(['left view: ' movie_file ' was created.']);
0162 else
0163 error(message);
0164 end
0165 end