dip::viewer::Viewer class

A Window for viewing a dip::Image

Base classes

class dip::viewer::Window
Simple GL window

Derived classes

class dip::viewer::ImageViewer
Non-interactive 2D RGB image viewer.
class dip::viewer::SliceViewer
Interactive nD tensor image viewer.

Functions

auto options() -> dip::viewer::ViewingOptions& pure virtual
Returns the Viewer’s model
auto image() -> dip::Image const& pure virtual
Returns the dip::Image being visualized, converted to real valued.
auto original() -> dip::Image const& pure virtual
Returns the dip::Image being visualized.
void setImage(dip::Image const& image) pure virtual
Sets the image to be visualized.
auto name() -> std::string const& virtual
Returns the Viewer’s name
void setWindowTitle(char const* name) virtual
Set window title, in addition to the Viewer’s name
void lock()
Lock the viewer. Necessary before making programmatic changes.
void unlock()
Unlock the viewer.

Function documentation

dip::viewer::ViewingOptions& options() pure virtual

Returns the Viewer’s model

Only call or change this under lock.

Example usage:

{
   dip::viewer::Viewer::Guard(*viewer);
   viewer->options().mapping_range_.first = 0;
}

dip::Image const& image() pure virtual

Returns the dip::Image being visualized, converted to real valued.

Only call this under lock.

Example usage:

{
   dip::viewer::Viewer::Guard(*viewer);
   dip::Image image = viewer->image();
}

dip::Image const& original() pure virtual

Returns the dip::Image being visualized.

Only call this under lock.

Example usage:

{
   dip::viewer::Viewer::Guard(*viewer);
   dip::Image image = viewer->original();
}

void setImage(dip::Image const& image) pure virtual

Sets the image to be visualized.

Only call this under lock.

Example usage:

{
   dip::viewer::Viewer::Guard(*viewer);
   viewer->setImage(image);
}