示例#1
0
def edit_movie_example2():
    movie_fol = '/home/noam/Videos/mmvt'
    if not op.isdir(movie_fol):
        movie_fol = '/cluster/neuromind/npeled/videos/mmvt'
    subclips_times = [(2, 34)]
    mu.cut_movie(movie_fol, 'out-6.ogv', 'freeview-mmvt-electrodes.mp4',
                 subclips_times)
    mu.crop_movie(movie_fol, 'freeview-mmvt-electrodes.mp4',
                  'freeview-mmvt-electrodes_crop.mp4')
    subs = [((0, 3), 'Choosing the LAT lead'),
            ((3, 7), 'Choosing the first electrode in the lead (LAT1)'),
            ((7, 11), "The current electrode's averaged evoked response"),
            ((11, 14), "The program estimates the electrode's sources"),
            ((14, 18),
             "The sources' probabilities are colored from yellow to red"),
            ((18, 20), "The electrode (green dot) in FreeView"),
            ((20, 24), "Going over the different electrodes in the lead"),
            ((24, 26), "By combing MMVT and Freeview"),
            ((26, 32), "The user can benefit from both 3D and 2D views")]
    mu.add_text_to_movie(movie_fol,
                         'freeview-mmvt-electrodes.mp4',
                         'freeview-mmvt-electrodes_sub.mp4',
                         subs,
                         fontsize=60)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4',
                           'mg78_elecs_coh_meg_diff.gif')
示例#2
0
def edit_movie_example():
    movie_fol = '/cluster/neuromind/npeled/Documents/brain-map'
    mu.cut_movie(movie_fol, 'out-7.ogv', 'freeview-mmvt.mp4')
    mu.crop_movie(movie_fol, 'freeview-mmvt.mp4', 'freeview-mmvt_crop.mp4')
    subs = [((0, 4), 'Clicking on the OFC activation in Freeview'),
            ((4, 9), 'The cursor moved to the same coordinates in the MMVT'),
            ((9, 12), 'Finding the closest activation in the coordinates'),
            ((12, 16), 'The activation is displayed with its statistics')]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt_crop.mp4', 'freeview-mmvt_crop_text.mp4', subs)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
示例#3
0
def edit_movie_example():
    movie_fol = '/cluster/neuromind/npeled/Documents/brain-map'
    mu.cut_movie(movie_fol, 'out-7.ogv', 'freeview-mmvt.mp4')
    mu.crop_movie(movie_fol, 'freeview-mmvt.mp4', 'freeview-mmvt_crop.mp4')
    subs = [((0, 4), 'Clicking on the OFC activation in Freeview'),
            ((4, 9), 'The cursor moved to the same coordinates in the MMVT'),
            ((9, 12), 'Finding the closest activation in the coordinates'),
            ((12, 16), 'The activation is displayed with its statistics')]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt_crop.mp4', 'freeview-mmvt_crop_text.mp4', subs)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
示例#4
0
文件: movies.py 项目: keshava/mmvt
def edit_mmvt_demo():
    movie_fol = op.join(MMVT_DIR, 'colin27', 'movies')
    mu.add_text_to_movie(
        movie_fol,
        'MMVT_demo.mp4',
        'MMVT_demo_subs.mp4',
        'subs',
        fontsize=60,
        txt_color='red',
        bg_color='0, 0, 1',
    )
示例#5
0
def edit_skull_movie():
    movie_fol = op.join(MMVT_DIR, 'DC', 'movies')
    subs = [
        ((0, 5),'Skull thickness (mm) is plotted on the skull'),
        ((5, 10), 'Picking the thickness in specific coordinates'),
        ((10, 17), 'Using the MRI to pick a point on the skull'),
        ((17, 20), 'Adding the implantable device'),
        ((20, 23), 'Aligning and rotating the device'),
        ((23, 26), 'The thickness under the device is calculated'),
        ((26, 32), 'Aligning the device to the cursor position')
    ]
    mu.add_text_to_movie(movie_fol, 'skull.mp4', 'skull_subs.mp4', subs, fontsize=60)
示例#6
0
def edit_movie_example2():
    movie_fol = '/home/noam/Videos/mmvt'
    if not op.isdir(movie_fol):
        movie_fol = '/cluster/neuromind/npeled/videos/mmvt'
    subclips_times = [(2, 34)]
    mu.cut_movie(movie_fol, 'out-6.ogv', 'freeview-mmvt-electrodes.mp4', subclips_times)
    mu.crop_movie(movie_fol, 'freeview-mmvt-electrodes.mp4', 'freeview-mmvt-electrodes_crop.mp4')
    subs = [((0, 3), 'Choosing the LAT lead'),
            ((3, 7), 'Choosing the first electrode in the lead (LAT1)'),
            ((7, 11), "The current electrode's averaged evoked response"),
            ((11, 14), "The program estimates the electrode's sources"),
            ((14, 18), "The sources' probabilities are colored from yellow to red"),
            ((18, 20), "The electrode (green dot) in FreeView"),
            ((20, 24), "Going over the different electrodes in the lead"),
            ((24, 26), "By combing MMVT and Freeview"),
            ((26, 32), "The user can benefit from both 3D and 2D views")]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt-electrodes.mp4', 'freeview-mmvt-electrodes_sub.mp4', subs, fontsize=60)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
示例#7
0
def mg106_electrodes_activity_add_annotation():
    from src.utils import movies_utils as mu
    mu.check_movipy()

    video_fol = '/home/npeled/Documents/darpa_year3_meeting'
    if not op.isdir(video_fol):
        video_fol = '/autofs/space/thibault_001/users/npeled/Documents/darpa_year3_meeting'
    if not op.isdir(video_fol):
        video_fol = 'I:\\mmvt\\mg106\\figures'
    video_name = 'lvf4-5_dt5.mp4'
    video_new_name = 'lvf4-5_dt5_annot.mp4'
    subs = [((0, 38), 'Stim Off'), ((39, 50), 'Stim On'),
            ((51, 79), 'Stim Off')]
    mu.add_text_to_movie(video_fol,
                         video_name,
                         video_new_name,
                         subs,
                         fontsize=50,
                         txt_color='White',
                         font='Xolonium-Bold')