0001
0002
0003
0004
0005 root = 'data';
0006
0007
0008 fiber_tracking_file = '~/dynamics_movie/Vmni_connect.mat';
0009 movie_current_file = fullfile(root, '/dynamics/input_for_movie/a.mat';
0010
0011
0012 load(movie_current_file, 'sampling_rate', 'time')
0013
0014
0015 output_dir = '~/dynamics_movie';
0016 movie_right_file = fullfile(output_dir, '/right_view.avi');
0017 movie_left_file = fullfile(output_dir, '/left_view.avi');
0018 movie_bottom_file = fullfile(output_dir, '/bottom_view.avi');
0019 movie_top_file = fullfile(output_dir, '/top_view.avi');
0020 movie_file = fullfile(output_dir, '/movie.avi');
0021
0022
0023 time_of_first_sample = time(1)*1000;
0024
0025 view_type = 'LT';
0026 title_str = 'Subject-task';
0027
0028 switch view_type
0029 case 'LB'
0030 movie_left_view_create(fiber_tracking_file, movie_current_file, movie_left_file, time_of_first_sample, sampling_rate);
0031 movie_bottom_view_create(fiber_tracking_file, movie_current_file, movie_bottom_file, time_of_first_sample, sampling_rate);
0032 left_side_file = movie_left_file;
0033 right_side_file = movie_bottom_file;
0034 left_is_left = false;
0035 case 'LT'
0036 movie_left_view_create(fiber_tracking_file, movie_current_file, movie_left_file, time_of_first_sample, sampling_rate);
0037 movie_top_view_create(fiber_tracking_file, movie_current_file, movie_top_file, time_of_first_sample, sampling_rate);
0038 left_side_file = movie_left_file;
0039 right_side_file = movie_top_file;
0040 left_is_left = true;
0041 case 'RB'
0042 movie_right_view_create(fiber_tracking_file, movie_current_file, movie_right_file, time_of_first_sample, sampling_rate);
0043 movie_bottom_view_create(fiber_tracking_file, movie_current_file, movie_bottom_file, time_of_first_sample, sampling_rate);
0044 left_side_file = movie_right_file;
0045 right_side_file = movie_bottom_file;
0046 left_is_left = false;
0047 case 'RT'
0048 movie_right_view_create(fiber_tracking_file, movie_current_file, movie_right_file, time_of_first_sample, sampling_rate);
0049 movie_top_view_create(fiber_tracking_file, movie_current_file, movie_top_file, time_of_first_sample, sampling_rate);
0050 left_side_file = movie_right_file;
0051 right_side_file = movie_top_file;
0052 left_is_left = true;
0053 otherwise
0054 error('Unknown view type is specified.');
0055 end
0056
0057
0058
0059
0060
0061
0062 movie_combine(left_side_file, right_side_file, movie_file, title_str, left_is_left);