VisPro  1.0
Project of Visualisierung 2
BufferView Class Referenceabstract

#include <BufferView.h>

Inheritance diagram for BufferView:
RGBBufferView TextureView ZBufferView FrameBufferObjectView

Public Member Functions

 BufferView (int width, int height, const std::string &windowName, Channels channels=Channels::RGB)
 
virtual bool ShowBufferView (bool show)
 
virtual bool UpdateBufferView ()
 

Protected Member Functions

virtual cv::Mat ReadBufferToMatrix ()=0
 
virtual std::vector< std::tuple< cv::Mat, std::string > > SplitMatrixToChannels (const cv::Mat &rgbMat)
 
virtual std::string GetBufferWindowChannelName (const std::string &channelName)
 

Protected Attributes

std::string m_bufferWindowName = "buffer view"
 
std::vector< std::tuple< HWND, std::string > > m_bufferWindowHandles
 
int m_width = 1024
 
int m_height = 800
 
Channels m_channels
 

Detailed Description

Buffer view base class. Provides OpenCV Window for given buffer. splits up buffer in several channels if desired.

Constructor & Destructor Documentation

BufferView::BufferView ( int  width,
int  height,
const std::string &  windowName,
Channels  channels = Channels::RGB 
)
inline

Constructor.

Parameters
widthwidth of buffer
heightheight of buffer
windowNamebasic name part of OpenCV windows for viewing the buffer
channelsidentifies the channel combination that should be shown (in several windows)

Member Function Documentation

std::string BufferView::GetBufferWindowChannelName ( const std::string &  channelName)
protectedvirtual

Get the name of the OpenCV buffer window for given channels.

Parameters
channelNamethe name identifier of the given channels
Returns
name of OpenCV buffer window
virtual cv::Mat BufferView::ReadBufferToMatrix ( )
protectedpure virtual

Read the given matrix into an OpenCV matrix.

Returns
return the RGB matrix.

Implemented in ZBufferView, RGBBufferView, TextureView, and FrameBufferObjectView.

bool BufferView::ShowBufferView ( bool  show)
virtual

Open OpenCV windows with specialized views on given buffer.

Parameters
showopens OpenCV windows it true, close existing windows if false
Returns
true if operation was successful
std::vector< std::tuple< cv::Mat, std::string > > BufferView::SplitMatrixToChannels ( const cv::Mat &  rgbMat)
protectedvirtual

Split the given RGB OpenCV matrix into its channels.

Parameters
rgbMatthe RGB OpenCV matrix to split
Returns
vector of OpenCV matrix and channel name pairs
bool BufferView::UpdateBufferView ( )
virtual

Update already opened OpenCV windows with specialized views on given buffer.

Returns
true if operation was successful

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