Used for displaying images alongside playback data. More...
#include <bitmap_window.H>
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_t * | create_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_t * | bitmap_window_instance = NULL |
Singleton window instance. |
Used for displaying images alongside playback data.
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.
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().
bool bitmap_window_t::check_display | ( | ) |
Test 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.
conf_filename | Filename to load configuration parameters from. | |
vision_file | Describe me. | |
ws_ | World state to read from image queue. |
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.
filename_ | The filename of the image to load. |
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.
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.
key | Id of Key pressed. |
References m_display.
Referenced by cajun::simulation_draw_t::normalKey_callback().
bitmap_window_t * bitmap_window_t::bitmap_window_instance = NULL [static, private] |
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().
bool cajun::bitmap_window_t::m_display [private] |
Display enabled or not.
Referenced by bitmap_window_t(), check_display(), and normalKey_callback().
int cajun::bitmap_window_t::m_height [private] |
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().
int cajun::bitmap_window_t::m_image_num [private] |
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().
double cajun::bitmap_window_t::m_image_tstamp [private] |
Image timestamp in the data queue.
Referenced by bitmap_window_t().
int cajun::bitmap_window_t::m_width [private] |
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().