MachineIntelligenceCore:Visualization
|
OpenGL-based window responsible for displaying grayscale (singlechannel) batch in a window. More...
#include <WindowGrayscaleBatch.hpp>
Public Member Functions | |
WindowGrayscaleBatch (std::string name_="WindowGrayscaleBatch", 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 | ~WindowGrayscaleBatch () |
void | keyhandlerToggleNormalizationMode (void) |
void | keyhandlerGridMode (void) |
void | displayHandler (void) |
void | setSampleSynchronized (mic::types::MatrixPtr< eT > sample_ptr_) |
void | setSampleUnsynchronized (mic::types::MatrixPtr< eT > sample_ptr_) |
void | setBatchSynchronized (std::vector< std::shared_ptr< mic::types::Matrix< eT > > > &batch_data_) |
void | setBatchUnsynchronized (std::vector< std::shared_ptr< mic::types::Matrix< 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::Grayscale | |
std::string | norm2str (Normalization norm_) |
std::string | grid2str (Grid grid_) |
Private Attributes | |
std::vector< std::shared_ptr < mic::types::Matrix< eT > > > | batch_data |
Normalization | normalization |
Flag determining whether or what kind of normalization to use. More... | |
Grid | grid |
Flag determining whether or what kind of grid to draw. More... | |
Additional Inherited Members | |
Public Types inherited from mic::opengl::visualization::Grayscale | |
enum | Normalization { Norm_None, Norm_Positive, Norm_HotCold, Norm_TensorFLow } |
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 grayscale (singlechannel) batch in a window.
Definition at line 109 of file WindowGrayscaleBatch.hpp.
|
inline |
Constructor. Sets window position (x,y), size (width, height) and display properties (normalization, grid).
Definition at line 115 of file WindowGrayscaleBatch.hpp.
|
inlinevirtual |
Virtual destructor - empty.
Definition at line 132 of file WindowGrayscaleBatch.hpp.
|
inlinevirtual |
Refreshes the content of the window.
Implements mic::opengl::visualization::Window.
Definition at line 159 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< eT >::batch_data, mic::opengl::visualization::DrawingUtils::draw_filled_rectangle(), mic::opengl::visualization::DrawingUtils::draw_grid(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::grid, and mic::opengl::visualization::WindowGrayscaleBatch< eT >::normalization.
|
inline |
Changes grid visualization mode.
Definition at line 148 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< eT >::grid, and mic::opengl::visualization::Grayscale::grid2str().
|
inline |
Changes normalization mode.
Definition at line 137 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::Grayscale::norm2str(), and mic::opengl::visualization::WindowGrayscaleBatch< eT >::normalization.
|
inline |
Sets displayed batch.
batch_data_ | Pointer to a batch to be displayed. |
Definition at line 308 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< eT >::batch_data.
|
inline |
Sets displayed batch. Unsynchronized i.e. must be used inside of manually synchronized section.
batch_data_ | Pointer to a batch to be displayed. |
Definition at line 321 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< eT >::batch_data.
|
inline |
Sets pointer to displayed sample.
sample_ptr_ | Pointer to a sample (2D matrix) to be displayed. |
Definition at line 282 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< 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 (2D matrix) to be displayed. |
Definition at line 298 of file WindowGrayscaleBatch.hpp.
References mic::opengl::visualization::WindowGrayscaleBatch< eT >::batch_data.
|
private |
Pointer to displayed batch.
Definition at line 331 of file WindowGrayscaleBatch.hpp.
Referenced by mic::opengl::visualization::WindowGrayscaleBatch< eT >::displayHandler(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::setBatchSynchronized(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::setBatchUnsynchronized(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::setSampleSynchronized(), and mic::opengl::visualization::WindowGrayscaleBatch< eT >::setSampleUnsynchronized().
|
private |
Flag determining whether or what kind of grid to draw.
Definition at line 337 of file WindowGrayscaleBatch.hpp.
Referenced by mic::opengl::visualization::WindowGrayscaleBatch< eT >::displayHandler(), and mic::opengl::visualization::WindowGrayscaleBatch< eT >::keyhandlerGridMode().
|
private |
Flag determining whether or what kind of normalization to use.
Definition at line 334 of file WindowGrayscaleBatch.hpp.
Referenced by mic::opengl::visualization::WindowGrayscaleBatch< eT >::displayHandler(), and mic::opengl::visualization::WindowGrayscaleBatch< eT >::keyhandlerToggleNormalizationMode().