ImageViewer Class Reference

#include <imgviewer.h>

List of all members.

Public Member Functions

 ImageViewer (int x, int y, int w, int h)
 ImageViewer Creates a new ImageViewer from an OpenGL Window.
bool initialize ()
 Initializes ImageViewer depending on imgvmode (_MUAN_PLAYER / _MUAN_FULL) _MUAN_PLAYER: Alloc image _MUAN_FULL : Alloc image and start camera connection.
void changeConnectMode (int mode)
 Sets the camera connection mode.
void play ()
 Plays a video.
void stop ()
 Stops the video.
void flick (void)
 Does the flip operation if the user turns it on, that is, alternates the last captured image and the "live" image.
void insert_frame (int delay, int frame_duration)
 Inserts a new frame.
void goToFrame (int frameNumber)
 Goes to specified frame.
void playInRange (int begin, int end)
 Plays specified range from a video.
void setModeViewer (Boolean _camera_on, Boolean _mem_alert, setLabelModeViewerFunc setLabel=NULL)
 Sets the visualization mode (CAMERA or MEMORY) Starts or stops the connection with the camera depending on the mode.
Boolean get_video_on (void)

Public Attributes

PlayMode imgvmode
Boolean flick_on
Boolean is_playing
Boolean is_looping
Boolean is_saving
double flick_delay
ImgListimgl
Imageimg
Framefrm

Private Member Functions

void init_GL ()
 Sets up Viewport and Projection of the GLWindow.
void draw ()
 Draws an image from the ImageList (captured image) or from the camera.
void resize (int X, int Y, int W, int H)
 Resizes the GLwindow.
void calcule_aspect_ratio ()
 Calculates aspect_ratio of the GLWindow.

Private Attributes

Boolean video_on
double aspect_ratio


Constructor & Destructor Documentation

ImageViewer::ImageViewer ( int  x,
int  y,
int  w,
int  h 
)

ImageViewer Creates a new ImageViewer from an OpenGL Window.

Parameters:
x the x coordinate of window position.
y the y coordinate of window position.
w the image width.
h the image height.
Returns:
The ImageViewer created.


Member Function Documentation

void ImageViewer::calcule_aspect_ratio (  )  [private]

Calculates aspect_ratio of the GLWindow.

void ImageViewer::changeConnectMode ( int  mode  ) 

Sets the camera connection mode.

Parameters:
mode the type of connection (0: FIREWIRE 1:V4L)

void ImageViewer::draw (  )  [private]

Draws an image from the ImageList (captured image) or from the camera.

void ImageViewer::flick ( void   ) 

Does the flip operation if the user turns it on, that is, alternates the last captured image and the "live" image.

Boolean ImageViewer::get_video_on ( void   )  [inline]

void ImageViewer::goToFrame ( int  frameNumber  ) 

Goes to specified frame.

Parameters:
frameNumber the frame number in animation.

void ImageViewer::init_GL (  )  [private]

Sets up Viewport and Projection of the GLWindow.

bool ImageViewer::initialize (  ) 

Initializes ImageViewer depending on imgvmode (_MUAN_PLAYER / _MUAN_FULL) _MUAN_PLAYER: Alloc image _MUAN_FULL : Alloc image and start camera connection.

Returns:
true for success or false if can't initialize communication with device.

void ImageViewer::insert_frame ( int  delay,
int  frame_duration 
)

Inserts a new frame.

Parameters:
delay the frame delay.
frame_duration the frame duration.

void ImageViewer::play (  ) 

Plays a video.

void ImageViewer::playInRange ( int  begin,
int  end 
)

Plays specified range from a video.

Parameters:
begin the begin of the range.
end the end of the range.

void ImageViewer::resize ( int  X,
int  Y,
int  W,
int  H 
) [private]

Resizes the GLwindow.

Parameters:
X the x coordinate of window position
Y the y coordinate of window position
W the window width.
H the window height.

void ImageViewer::setModeViewer ( Boolean  _camera_on,
Boolean  _mem_alert,
setLabelModeViewerFunc  setLabel = NULL 
)

Sets the visualization mode (CAMERA or MEMORY) Starts or stops the connection with the camera depending on the mode.

In fail case of changing to camera mode (start camera connection), can display a message. Sets the label of the switch mode button.

Parameters:
_camera_on true to CAMERA mode or false to MEMORY mode.
_mem_alert defines if display an alert or not.
setLabel the function that sets the label of UI.

void ImageViewer::stop (  ) 

Stops the video.


Member Data Documentation

double ImageViewer::aspect_ratio [private]

double ImageViewer::flick_delay

Boolean ImageViewer::flick_on

Frame* ImageViewer::frm

Image* ImageViewer::img

ImgList* ImageViewer::imgl

PlayMode ImageViewer::imgvmode

Boolean ImageViewer::is_looping

Boolean ImageViewer::is_playing

Boolean ImageViewer::is_saving

Boolean ImageViewer::video_on [private]


The documentation for this class was generated from the following files:
Generated on Tue Jan 22 17:07:31 2008 for MUAN by  doxygen 1.4.7