A FrameOstream class that sends images to (multiple) on-screen window(s). More...
#include <GUI/ImageDisplayStream.H>
Classes | |
struct | WindowMap |
Public Member Functions | |
ImageDisplayStream (OptionManager &mgr) | |
Constructor. | |
virtual | ~ImageDisplayStream () |
Virtual destructor. | |
virtual void | writeFrame (const GenericFrame &image, const std::string &shortname, const FrameInfo &auxinfo=FrameOstream::defaultInfo) |
Write a frame to the named onscreen window. | |
virtual bool | isVoid () const |
Returns true if the user has clicked a close button on any open window. | |
virtual void | closeStream (const std::string &shortname) |
Close the window corresponding to shortname, if any. | |
rutz::shared_ptr< XWinManaged > | getWindow (const std::string &wintitle) |
Return the window associated with wintitle, or null if there is no such window. | |
std::vector< rutz::shared_ptr < XWinManaged > > | getWindows () |
Return the windows map in here. |
A FrameOstream class that sends images to (multiple) on-screen window(s).
Definition at line 48 of file ImageDisplayStream.H.
ImageDisplayStream::ImageDisplayStream | ( | OptionManager & | mgr | ) |
Constructor.
Definition at line 119 of file ImageDisplayStream.C.
ImageDisplayStream::~ImageDisplayStream | ( | ) | [virtual] |
Virtual destructor.
Definition at line 129 of file ImageDisplayStream.C.
void ImageDisplayStream::closeStream | ( | const std::string & | shortname | ) | [virtual] |
Close the window corresponding to shortname, if any.
Implements FrameOstream.
Definition at line 179 of file ImageDisplayStream.C.
rutz::shared_ptr< XWinManaged > ImageDisplayStream::getWindow | ( | const std::string & | wintitle | ) |
Return the window associated with wintitle, or null if there is no such window.
Definition at line 192 of file ImageDisplayStream.C.
std::vector< rutz::shared_ptr< XWinManaged > > ImageDisplayStream::getWindows | ( | ) |
Return the windows map in here.
Definition at line 206 of file ImageDisplayStream.C.
bool ImageDisplayStream::isVoid | ( | ) | const [virtual] |
Returns true if the user has clicked a close button on any open window.
Reimplemented from FrameOstream.
Definition at line 173 of file ImageDisplayStream.C.
void ImageDisplayStream::writeFrame | ( | const GenericFrame & | image, | |
const std::string & | shortname, | |||
const FrameInfo & | auxinfo = FrameOstream::defaultInfo | |||
) | [virtual] |
Write a frame to the named onscreen window.
If no such window yet exists, it will be created on the fly.
This implementation is optimized to take advantage of XWindow::drawRgbLayout() and XWindow::drawGrayLayout() if the given GenericFrame includes Layout information.
Implements FrameOstream.
Definition at line 135 of file ImageDisplayStream.C.
References GenericFrame::asGrayU8(), GenericFrame::asGrayU8Layout(), GenericFrame::asRgbU8(), GenericFrame::asRgbU8Layout(), ASSERT, XWindow::drawGrayLayout(), XWindow::drawImage(), XWindow::drawRgbLayout(), GenericFrame::getDims(), OModelParam< T >::getVal(), GenericFrame::GRAY_F32, GenericFrame::GRAY_U16, GenericFrame::GRAY_U8, GenericFrame::nativeType(), GenericFrame::NONE, GenericFrame::RGB_F32, GenericFrame::RGB_U16, GenericFrame::RGB_U8, and GenericFrame::RGBD.