A singleton manager class for playing videos. More...
#include <vvid_vil_file_manager.h>

Public Member Functions | |
| vvid_vil_file_manager () | |
| ~vvid_vil_file_manager () | |
| unsigned | get_height () const |
| height (in pixels) of the video frame. | |
| unsigned | get_width () const |
| width (in pixels) of the video frame. | |
| void | quit () |
| quit the application. | |
| void | load_video_file () |
| load each frame of the video into a cached vector of overlays if caching is enabled. | |
| void | load_pyramid_video () |
| load a pyramid video as a set of tiff images. | |
| void | play_video () |
| loop through the frames and display. | |
| void | play_pyramid () |
| loop through the pyramid frames and display. | |
| void | pause_video () |
| stop at the current frame. | |
| void | stop_video () |
| stop playing and return to the first frame. | |
| void | start_frame () |
| pops up a dialog to indicate what frame to start play. | |
| void | end_frame () |
| pops up a dialog to indicate what frame to start play. | |
| void | next_frame () |
| index to the next frame (must be paused). | |
| void | prev_frame () |
| index to the previous frame (must be paused). | |
| void | set_speed () |
| set the frame rate. | |
| void | set_range_params () |
| set the range map rate. | |
| void | create_box () |
| create a box as a vsol_polygon. | |
| void | save_roi () |
| save a video of according to a specified roi. | |
| vgui_window * | get_window () |
| get the window of this player. | |
| void | set_window (vgui_window *win) |
| set the window. | |
| virtual bool | handle (const vgui_event &) |
| tableau handle function. | |
| bool | add_child (vgui_tableau_sptr const &) |
| bool | remove_child (vgui_tableau_sptr const &) |
| vcl_string | file_name () const |
| vcl_string | pretty_name () const |
| vcl_string | type_name () const |
| bool | get_bounding_box (float low[3], float high[3]) const |
| virtual vcl_string | name () const |
| void | get_parents (vcl_vector< vgui_tableau_sptr > *out) const |
| void | get_children (vcl_vector< vgui_tableau_sptr > *out) const |
| vgui_tableau_sptr | get_child (unsigned i) const |
| virtual bool | notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child) |
| virtual void | add_popup (vgui_menu &) |
| virtual void | get_popup (vgui_popup_params const &, vgui_menu &) |
| virtual void | post_message (char const *, void const *) |
| virtual void | post_redraw () |
| virtual void | post_overlay_redraw () |
| virtual void | post_idle_request () |
| virtual bool | draw () |
| virtual bool | mouse_down (int x, int y, vgui_button, vgui_modifier) |
| virtual bool | mouse_up (int x, int y, vgui_button, vgui_modifier) |
| virtual bool | motion (int x, int y) |
| virtual bool | key_press (int x, int y, vgui_key, vgui_modifier) |
| virtual bool | help () |
| virtual bool | idle () |
| void | ref () const |
| void | unref () const |
Static Public Member Functions | |
| static vvid_vil_file_manager * | instance () |
| returns the unique instance of vvid_vil_file_manger. | |
| static void | get_all (vcl_vector< vgui_tableau_sptr > *out) |
| static bool | exists (vgui_tableau_sptr const &) |
Public Attributes | |
| vgui_parent_child_link | child |
Protected Member Functions | |
| void | init () |
| set up the tableaux at each grid cell. | |
| void | un_cached_play () |
| void | pyramid_play () |
Private Attributes | |
| bool | cache_frames_ |
| bool | play_video_ |
| bool | pause_video_ |
| bool | next_frame_ |
| bool | prev_frame_ |
| vgui_range_map_params_sptr | rmps_ |
| int | window_ |
| int | start_frame_ |
| int | end_frame_ |
| float | time_interval_ |
| int | display_frame_repeat_ |
| unsigned | width_ |
| unsigned | height_ |
| unsigned | x0_ |
| unsigned | y0_ |
| unsigned | xsize_ |
| unsigned | ysize_ |
| vidl1_movie_sptr | my_movie_ |
| vcl_vector < vil_image_resource_sptr > | pyramid_movie_ |
| vgui_window * | win_ |
| vsol_polygon_2d_sptr | box_ |
| vcl_vector < vgui_easy2D_tableau_sptr > | tabs_ |
| vgui_viewer2D_tableau_sptr | v2D0_ |
| vgui_viewer2D_tableau_sptr | v2D1_ |
| vgui_easy2D_tableau_sptr | easy0_ |
| vgui_easy2D_tableau_sptr | easy1_ |
| bgui_image_tableau_sptr | itab0_ |
| vgui_rubberband_tableau_sptr | rubber0_ |
| bgui_picker_tableau_sptr | picktab0_ |
| vgui_image_tableau_sptr | itab1_ |
| vpro_vil_video_process_sptr | video_process_ |
| vgui_grid_tableau_sptr | grid_ |
Static Private Attributes | |
| static vvid_vil_file_manager * | instance_ = 0 |
A singleton manager class for playing videos.
A vector of images with enclosing image and easy2D tableaux is cached so that computed overlays such as Harris corners can be played back quickly. The cache option can be turned off if one is going to just play the video and not apply image segmentation processing to the frames.
A demo of overlaying points on the video is provide by ::easy2D_demo to get rid of the points, reload the video
It is planned to extend the class to handle multiple panes (grid locations) so that different (or the same) videos can be playing simultaneously in different zoom states as well as pause states. This extension will the state variables to be changed to vectors as well as having multiple caches.. etc.
Known problems:
Definition at line 56 of file vvid_vil_file_manager.h.
| vvid_vil_file_manager::vvid_vil_file_manager | ( | ) |
Definition at line 74 of file vvid_vil_file_manager.cxx.
| vvid_vil_file_manager::~vvid_vil_file_manager | ( | ) |
Definition at line 93 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::create_box | ( | ) |
create a box as a vsol_polygon.
draw the box in easy2D tableau.
Definition at line 447 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::end_frame | ( | ) |
pops up a dialog to indicate what frame to start play.
Definition at line 367 of file vvid_vil_file_manager.cxx.
| unsigned vvid_vil_file_manager::get_height | ( | ) | const [inline] |
height (in pixels) of the video frame.
Definition at line 65 of file vvid_vil_file_manager.h.
| unsigned vvid_vil_file_manager::get_width | ( | ) | const [inline] |
width (in pixels) of the video frame.
Definition at line 68 of file vvid_vil_file_manager.h.
| vgui_window* vvid_vil_file_manager::get_window | ( | ) | [inline] |
get the window of this player.
Definition at line 114 of file vvid_vil_file_manager.h.
| bool vvid_vil_file_manager::handle | ( | const vgui_event & | e | ) | [virtual] |
tableau handle function.
Reimplemented from vgui_wrapper_tableau.
Definition at line 100 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::init | ( | ) | [protected] |
set up the tableaux at each grid cell.
Definition at line 46 of file vvid_vil_file_manager.cxx.
| vvid_vil_file_manager * vvid_vil_file_manager::instance | ( | ) | [static] |
returns the unique instance of vvid_vil_file_manger.
Definition at line 34 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::load_pyramid_video | ( | ) |
load a pyramid video as a set of tiff images.
Loads a pyramid video.
Definition at line 169 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::load_video_file | ( | ) |
load each frame of the video into a cached vector of overlays if caching is enabled.
Loads a video file, e.g. avi into the viewer.
Definition at line 112 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::next_frame | ( | ) |
index to the next frame (must be paused).
Definition at line 377 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::pause_video | ( | ) |
stop at the current frame.
Definition at line 352 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::play_pyramid | ( | ) |
loop through the pyramid frames and display.
Definition at line 331 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::play_video | ( | ) |
loop through the frames and display.
Definition at line 317 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::prev_frame | ( | ) |
index to the previous frame (must be paused).
Definition at line 383 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::pyramid_play | ( | ) | [protected] |
Definition at line 279 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::quit | ( | ) |
quit the application.
Definition at line 105 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::save_roi | ( | ) |
save a video of according to a specified roi.
Definition at line 480 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::set_range_params | ( | ) |
set the range map rate.
Definition at line 393 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::set_speed | ( | ) |
set the frame rate.
Definition at line 388 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::set_window | ( | vgui_window * | win | ) | [inline] |
set the window.
Definition at line 117 of file vvid_vil_file_manager.h.
| void vvid_vil_file_manager::start_frame | ( | ) |
pops up a dialog to indicate what frame to start play.
Definition at line 359 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::stop_video | ( | ) |
stop playing and return to the first frame.
Definition at line 346 of file vvid_vil_file_manager.cxx.
| void vvid_vil_file_manager::un_cached_play | ( | ) | [protected] |
Definition at line 224 of file vvid_vil_file_manager.cxx.
Definition at line 149 of file vvid_vil_file_manager.h.
bool vvid_vil_file_manager::cache_frames_ [private] |
Definition at line 129 of file vvid_vil_file_manager.h.
int vvid_vil_file_manager::display_frame_repeat_ [private] |
Definition at line 139 of file vvid_vil_file_manager.h.
Definition at line 153 of file vvid_vil_file_manager.h.
Definition at line 154 of file vvid_vil_file_manager.h.
int vvid_vil_file_manager::end_frame_ [private] |
Definition at line 137 of file vvid_vil_file_manager.h.
Definition at line 160 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::height_ [private] |
Definition at line 141 of file vvid_vil_file_manager.h.
vvid_vil_file_manager * vvid_vil_file_manager::instance_ = 0 [static, private] |
Definition at line 161 of file vvid_vil_file_manager.h.
Definition at line 155 of file vvid_vil_file_manager.h.
Definition at line 158 of file vvid_vil_file_manager.h.
vidl1_movie_sptr vvid_vil_file_manager::my_movie_ [private] |
Definition at line 146 of file vvid_vil_file_manager.h.
bool vvid_vil_file_manager::next_frame_ [private] |
Definition at line 132 of file vvid_vil_file_manager.h.
bool vvid_vil_file_manager::pause_video_ [private] |
Definition at line 131 of file vvid_vil_file_manager.h.
Definition at line 157 of file vvid_vil_file_manager.h.
bool vvid_vil_file_manager::play_video_ [private] |
Definition at line 130 of file vvid_vil_file_manager.h.
bool vvid_vil_file_manager::prev_frame_ [private] |
Definition at line 133 of file vvid_vil_file_manager.h.
vcl_vector<vil_image_resource_sptr> vvid_vil_file_manager::pyramid_movie_ [private] |
Definition at line 147 of file vvid_vil_file_manager.h.
Definition at line 134 of file vvid_vil_file_manager.h.
Definition at line 156 of file vvid_vil_file_manager.h.
int vvid_vil_file_manager::start_frame_ [private] |
Definition at line 136 of file vvid_vil_file_manager.h.
vcl_vector<vgui_easy2D_tableau_sptr> vvid_vil_file_manager::tabs_ [private] |
Definition at line 150 of file vvid_vil_file_manager.h.
float vvid_vil_file_manager::time_interval_ [private] |
Definition at line 138 of file vvid_vil_file_manager.h.
Definition at line 151 of file vvid_vil_file_manager.h.
Definition at line 152 of file vvid_vil_file_manager.h.
Definition at line 159 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::width_ [private] |
Definition at line 140 of file vvid_vil_file_manager.h.
vgui_window* vvid_vil_file_manager::win_ [private] |
Definition at line 148 of file vvid_vil_file_manager.h.
int vvid_vil_file_manager::window_ [private] |
Definition at line 135 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::x0_ [private] |
Definition at line 142 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::xsize_ [private] |
Definition at line 144 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::y0_ [private] |
Definition at line 143 of file vvid_vil_file_manager.h.
unsigned vvid_vil_file_manager::ysize_ [private] |
Definition at line 145 of file vvid_vil_file_manager.h.
1.7.5.1