cajun::bitmap_window_t Class Reference

Used for displaying images alongside playback data. More...

#include <bitmap_window.H>

List of all members.

Public Member Functions

 ~bitmap_window_t ()
 Destructor.
void check_new_image ()
 Test if there is a new image in the data queue and load it.
void normalKey_callback (int key)
 Callback for normal keys.
bool check_display ()
 Test if display is enabled.
void load_BMP (const char *imageFileName)
 Loader for bmp images.
void display ()
 Display function for secondary window.

Static Public Member Functions

static bitmap_window_tcreate_window (char const *conf_filename, char const *vision_file, world_state_t *ws_)
 Create a new vision window to watch images.

Private Types

enum  { PPM, BMP, PGM }
 

Image types.

More...

Private Member Functions

 bitmap_window_t (char const *conf_filename, char const *vision_file, world_state_t *ws_)
 Describe me.
bool init_image_loader (const char *filename_)
 Initialization of the image loader based on type.

Private Attributes

bool m_display
 Display enabled or not.
image_interface_t * m_image
 Interface for loading different image types.
image_pixel_t * m_image_pixels
 Container for image data.
world_state_t * m_world_state
 World state for getting image queue.
int m_width
 Dimension for current frame.
int m_height
 Dimension for current frame.
std::string m_datafile
 Datafile for configuration?.
int m_image_num
 Current number of frame.
double m_image_tstamp
 Image timestamp in the data queue.
std::fstream inFile
 File handle for loading image?
image_data_t m_image_data
 Container for image data.

Static Private Attributes

static bitmap_window_tbitmap_window_instance = NULL
 Singleton window instance.

Detailed Description

Used for displaying images alongside playback data.


Member Enumeration Documentation

anonymous enum [private]

Image types.

Enumerator:
PPM 
BMP 
PGM 

Constructor & Destructor Documentation

bitmap_window_t::~bitmap_window_t (  ) 

Destructor.

References m_image.

bitmap_window_t::bitmap_window_t ( char const *  conf_filename,
char const *  vision_file,
world_state_t *  ws_ 
) [private]

Describe me.

Parameters:
conf_filename Filename to load configuration parameters from.
vision_file Describe me.
ws_ World state to read from image queue.

References m_datafile, m_display, m_image, m_image_num, m_image_pixels, m_image_tstamp, m_world_state, and cajun::progname.

Referenced by create_window().


Member Function Documentation

bool bitmap_window_t::check_display (  ) 

Test if display is enabled.

Returns:
True if display is enabled.

References m_display.

Referenced by cajun::simulation_draw_t::check_video_display().

void bitmap_window_t::check_new_image (  ) 

Test if there is a new image in the data queue and load it.

References load_BMP(), m_datafile, m_image_data, and m_world_state.

Referenced by cajun::simulation_draw_t::update_data3().

bitmap_window_t * bitmap_window_t::create_window ( char const *  conf_filename,
char const *  vision_file,
world_state_t *  ws_ 
) [static]

Create a new vision window to watch images.

Parameters:
conf_filename Filename to load configuration parameters from.
vision_file Describe me.
ws_ World state to read from image queue.
Returns:
A new bitmap window handle or the current one.

References bitmap_window_instance, and bitmap_window_t().

Referenced by cajun::simulation_draw_t::simulation_draw_t().

void bitmap_window_t::display (  ) 

Display function for secondary window.

References m_height, m_image, m_image_pixels, and m_width.

Referenced by cajun::simulation_draw_t::draw3().

bool bitmap_window_t::init_image_loader ( const char *  filename_  )  [private]

Initialization of the image loader based on type.

Parameters:
filename_ The filename of the image to load.
Returns:
True if the image type was recognized.

References BMP, m_image, PGM, PPM, and cajun::progname.

Referenced by load_BMP().

void bitmap_window_t::load_BMP ( const char *  filename  ) 

Loader for bmp images.

Parameters:
filename Path to image file.

References init_image_loader(), m_height, m_image, m_image_pixels, and m_width.

Referenced by check_new_image().

void bitmap_window_t::normalKey_callback ( int  key  ) 

Callback for normal keys.

Parameters:
key Id of Key pressed.

References m_display.

Referenced by cajun::simulation_draw_t::normalKey_callback().


Member Data Documentation

Singleton window instance.

Referenced by create_window().

std::fstream cajun::bitmap_window_t::inFile [private]

File handle for loading image?

std::string cajun::bitmap_window_t::m_datafile [private]

Datafile for configuration?.

Referenced by bitmap_window_t(), and check_new_image().

Display enabled or not.

Referenced by bitmap_window_t(), check_display(), and normalKey_callback().

Dimension for current frame.

Referenced by display(), and load_BMP().

image_interface_t* cajun::bitmap_window_t::m_image [private]

Interface for loading different image types.

Referenced by bitmap_window_t(), display(), init_image_loader(), load_BMP(), and ~bitmap_window_t().

image_data_t cajun::bitmap_window_t::m_image_data [private]

Container for image data.

Referenced by check_new_image().

Current number of frame.

Referenced by bitmap_window_t().

image_pixel_t* cajun::bitmap_window_t::m_image_pixels [private]

Container for image data.

Referenced by bitmap_window_t(), display(), and load_BMP().

Image timestamp in the data queue.

Referenced by bitmap_window_t().

Dimension for current frame.

Referenced by display(), and load_BMP().

world_state_t* cajun::bitmap_window_t::m_world_state [private]

World state for getting image queue.

Referenced by bitmap_window_t(), and check_new_image().


The documentation for this class was generated from the following files:

Generated on Fri Apr 9 10:45:17 2010 for Visualizer by  doxygen 1.6.1