MachineIntelligenceCore:Visualization
|
OpenGL-based window responsible for displaying RGB (three channel) batch in a window. More...
#include <WindowRGBTensor.hpp>
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 |
OpenGL-based window responsible for displaying RGB (three channel) batch in a window.
Definition at line 125 of file WindowRGBTensor.hpp.
|
inline |
Constructor. Sets window position (x,y), size (width, height) and display properties (normalization, grid).
Definition at line 131 of file WindowRGBTensor.hpp.
|
inlinevirtual |
Virtual destructor - empty.
Definition at line 150 of file WindowRGBTensor.hpp.
|
inlinevirtual |
Refreshes the content of the window.
Implements mic::opengl::visualization::Window.
Definition at line 178 of file WindowRGBTensor.hpp.
References mic::opengl::visualization::WindowRGBTensor< eT >::batch_data, mic::opengl::visualization::WindowRGBTensor< eT >::channel_display, mic::opengl::visualization::DrawingUtils::draw_filled_rectangle(), mic::opengl::visualization::DrawingUtils::draw_grid(), mic::opengl::visualization::WindowRGBTensor< eT >::grid, mic::opengl::visualization::Window::height, and mic::opengl::visualization::Window::width.
|
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().
|
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.
|
inline |
Sets displayed batch.
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.
|
inline |
Sets displayed batch. Unsynchronized i.e. must be used inside of manually synchronized section.
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.
|
inline |
Sets pointer to displayed sample.
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.
|
inline |
Sets pointer to displayed sample. Unsynchronized i.e. must be used inside of manually synchronized section.
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.
|
private |
Pointer to displayed batch.
Definition at line 426 of file WindowRGBTensor.hpp.
Referenced by mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), mic::opengl::visualization::WindowRGBTensor< eT >::setBatchSynchronized(), mic::opengl::visualization::WindowRGBTensor< eT >::setBatchUnsynchronized(), mic::opengl::visualization::WindowRGBTensor< eT >::setSampleSynchronized(), and mic::opengl::visualization::WindowRGBTensor< eT >::setSampleUnsynchronized().
|
private |
Grid display mode.
Definition at line 429 of file WindowRGBTensor.hpp.
Referenced by mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), and mic::opengl::visualization::WindowRGBTensor< eT >::keyhandlerToggleChannelDisplayMode().
|
private |
Grid display mode.
Definition at line 435 of file WindowRGBTensor.hpp.
Referenced by mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), and mic::opengl::visualization::WindowRGBTensor< eT >::keyhandlerGridMode().
|
private |
Normalization mode.
Definition at line 432 of file WindowRGBTensor.hpp.