Home > vbmeg > functions > tool_box > dynamics_movie > tutorial_movie_create.m

tutorial_movie_create

PURPOSE ^

Copyright (C) 2011, ATR All Rights Reserved.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %
0002 % Copyright (C) 2011, ATR All Rights Reserved.
0003 % License : New BSD License(see VBMEG_LICENSE.txt)
0004 
0005 root = 'data';
0006 
0007 % Input files
0008 fiber_tracking_file   = '~/dynamics_movie/Vmni_connect.mat';
0009 movie_current_file    = fullfile(root, '/dynamics/input_for_movie/a.mat';
0010 
0011 % load current info
0012 load(movie_current_file, 'sampling_rate', 'time')
0013 
0014 % Output files - movie file(.avi)
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 % movie create
0023 time_of_first_sample = time(1)*1000; % first sample of time([msec])
0024 
0025 view_type = 'LT'; % Left/Top
0026 title_str = 'Subject-task';
0027 
0028 switch view_type
0029     case 'LB'     % Left/Bottom
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'     % Left/Top
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'     % Right/Bottom
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'     % Right/Top
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 % --- combine movies
0059 %
0060 
0061 % left_is_left % set to true when you make top view movie.
0062 movie_combine(left_side_file, right_side_file, movie_file, title_str, left_is_left);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005