MachineIntelligenceCore:Visualization
mic::opengl::visualization::WindowRGBTensor< eT > Class Template Reference

OpenGL-based window responsible for displaying RGB (three channel) batch in a window. More...

#include <WindowRGBTensor.hpp>

Inheritance diagram for mic::opengl::visualization::WindowRGBTensor< eT >:
Collaboration diagram for mic::opengl::visualization::WindowRGBTensor< eT >:

Public Member Functions

 WindowRGBTensor (std::string name_="WindowRGBTensor", ChannelDisplay channel_display_=Chan_RGB, Normalization normalization_=Norm_None, Grid grid_=Grid_Batch, unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512, bool draw_batch_grid_=true, bool draw_sample_grid_=false)
 
virtual ~WindowRGBTensor ()
 
void keyhandlerToggleChannelDisplayMode (void)
 
void keyhandlerGridMode (void)
 
void displayHandler (void)
 
void setSampleSynchronized (mic::types::TensorPtr< eT > sample_ptr_)
 
void setSampleUnsynchronized (mic::types::TensorPtr< eT > sample_ptr_)
 
void setBatchSynchronized (std::vector< mic::types::TensorPtr< eT > > &batch_data_)
 
void setBatchUnsynchronized (std::vector< mic::types::TensorPtr< eT > > &batch_data_)
 
- Public Member Functions inherited from mic::opengl::visualization::Window
 Window (std::string name_="OpenGlWindow", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512)
 
virtual ~Window ()
 
unsigned int getId () const
 
std::string getName () const
 
virtual void mouseHandler (int button, int state, int x, int y)
 
virtual void reshapeHandler (int width_, int height_)
 
- Public Member Functions inherited from mic::opengl::visualization::DrawingUtils
virtual ~DrawingUtils ()
 
void draw_frame (float x1, float y1, float x2, float y2, float r, float g, float b, float a)
 
void draw_grid (float r, float g, float b, float a, float cells_h, float cells_v, float line_width_=1.0)
 
void draw_mark (mark m, float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_circle (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_plus (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_cross (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_square (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_square_in_place (float size, float line_width, float r, float g, float b, float a)
 
void draw_filled_square (float x, float y, float size, float r, float g, float b, float a)
 
void draw_rectangle (float x, float y, float h, float w, float r, float g, float b, float a)
 
void draw_filled_rectangle (float x, float y, float h, float w, float r, float g, float b, float a)
 
void draw_texture_in_place (float size)
 
void draw_filled_square_in_place (float radius, float line_width, float r, float g, float b, float a)
 
void draw_filled_rectangle_in_place (float radius_x, float radius_y, float line_width, float r, float g, float b, float a)
 
void draw_cuboid (float radius, float line_width, float height, float r, float g, float b, float a)
 
void draw_text (float x, float y, char *string, float r, float g, float b, float a, void *font)
 
void draw_text_3i (float x, float y, float z, char *string, float r, float g, float b, float a, void *font)
 
void draw_cursor (float x, float y, float r, float g, float b, float a)
 
void draw_text_3d (GLfloat x, GLfloat y, char *text)
 
float to_radians (float degrees)
 
- Public Member Functions inherited from mic::opengl::visualization::RGB
std::string chan2str (ChannelDisplay chan_)
 
std::string norm2str (Normalization norm_)
 
std::string grid2str (Grid grid_)
 

Private Attributes

std::vector
< mic::types::TensorPtr< eT > > 
batch_data
 
ChannelDisplay channel_display
 Grid display mode. More...
 
Normalization normalization
 Normalization mode. More...
 
Grid grid
 Grid display mode. More...
 

Additional Inherited Members

- Public Types inherited from mic::opengl::visualization::RGB
enum  ChannelDisplay { Chan_SeparateColor, Chan_SeparateGrayscale, Chan_RGB }
 
enum  Normalization { Norm_None }
 
enum  Grid { Grid_None, Grid_Sample, Grid_Batch, Grid_Both }
 
- Protected Member Functions inherited from mic::opengl::visualization::Window
void keyhandlerFullscreen (void)
 
- Protected Attributes inherited from mic::opengl::visualization::Window
std::string name
 
unsigned int position_x
 
unsigned int position_y
 
unsigned int width
 
unsigned int height
 
unsigned int previous_width
 
unsigned int previous_height
 
unsigned int id
 
bool fullscreen_mode
 

Detailed Description

template<typename eT = float>
class mic::opengl::visualization::WindowRGBTensor< eT >

OpenGL-based window responsible for displaying RGB (three channel) batch in a window.

Author
tkornuta @tparam eT Precission (float/double) (DEFAULT=float).

Definition at line 125 of file WindowRGBTensor.hpp.

Constructor & Destructor Documentation

template<typename eT = float>
mic::opengl::visualization::WindowRGBTensor< eT >::WindowRGBTensor ( std::string  name_ = "WindowRGBTensor< eT >",
ChannelDisplay  channel_display_ = Chan_RGB,
Normalization  normalization_ = Norm_None,
Grid  grid_ = Grid_Batch,
unsigned int  position_x_ = 0,
unsigned int  position_y_ = 0,
unsigned int  width_ = 512,
unsigned int  height_ = 512,
bool  draw_batch_grid_ = true,
bool  draw_sample_grid_ = false 
)
inline

Constructor. Sets window position (x,y), size (width, height) and display properties (normalization, grid).

Definition at line 131 of file WindowRGBTensor.hpp.

template<typename eT = float>
virtual mic::opengl::visualization::WindowRGBTensor< eT >::~WindowRGBTensor ( )
inlinevirtual

Virtual destructor - empty.

Definition at line 150 of file WindowRGBTensor.hpp.

Member Function Documentation

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::keyhandlerGridMode ( void  )
inline

Changes grid visualization mode.

Definition at line 166 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::WindowRGBTensor< eT >::grid, and mic::opengl::visualization::RGB::grid2str().

Here is the call graph for this function:

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::keyhandlerToggleChannelDisplayMode ( void  )
inline

Changes channel display mode.

Definition at line 155 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::RGB::chan2str(), and mic::opengl::visualization::WindowRGBTensor< eT >::channel_display.

Here is the call graph for this function:

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::setBatchSynchronized ( std::vector< mic::types::TensorPtr< eT > > &  batch_data_)
inline

Sets displayed batch.

Parameters
batch_data_Pointer to a batch (of pointers to 3D tensors) to be displayed.

Definition at line 403 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::WindowRGBTensor< eT >::batch_data.

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::setBatchUnsynchronized ( std::vector< mic::types::TensorPtr< eT > > &  batch_data_)
inline

Sets displayed batch. Unsynchronized i.e. must be used inside of manually synchronized section.

Parameters
batch_data_Pointer to a batch (of pointers to 3D tensors) to be displayed.

Definition at line 416 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::WindowRGBTensor< eT >::batch_data.

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::setSampleSynchronized ( mic::types::TensorPtr< eT >  sample_ptr_)
inline

Sets pointer to displayed sample.

Parameters
sample_ptr_Pointer to a sample (3D tensor) to be displayed.

Definition at line 376 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::WindowRGBTensor< eT >::batch_data.

template<typename eT = float>
void mic::opengl::visualization::WindowRGBTensor< eT >::setSampleUnsynchronized ( mic::types::TensorPtr< eT >  sample_ptr_)
inline

Sets pointer to displayed sample. Unsynchronized i.e. must be used inside of manually synchronized section.

Parameters
sample_ptr_Pointer to a sample (3D tensor) to be displayed.

Definition at line 392 of file WindowRGBTensor.hpp.

References mic::opengl::visualization::WindowRGBTensor< eT >::batch_data.

Member Data Documentation

template<typename eT = float>
Normalization mic::opengl::visualization::WindowRGBTensor< eT >::normalization
private

Normalization mode.

Definition at line 432 of file WindowRGBTensor.hpp.


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