dip::viewer::ImageViewer class

Non-interactive 2D RGB image viewer.

Contents

Base classes

class dip::viewer::Viewer abstract
A Window for viewing a dip::Image

Aliases

using Ptr = std::shared_ptr<ImageViewer>
A pointer to an ImageViewer.

Functions

static auto Create(dip::Image const& image, std::string name = "ImageViewer", dip::uint width = 0, dip::uint height = 0) -> dip::viewer::ImageViewer::Ptr
Construct a new ImageViewer.

Function documentation

static dip::viewer::ImageViewer::Ptr Create(dip::Image const& image, std::string name = "ImageViewer", dip::uint width = 0, dip::uint height = 0)

Construct a new ImageViewer.

As the constructor is protected, this is the only way to create an ImageViewer. Note that the ImageViewer only supports 8-bit 2D RGB images.

If either width or height is 0, it is computed from the other value so as to preserve the image’s aspect ratio. If both are zero, the image is displayed in its natural size (one image pixel to one screen pixel) but scaled down if otherwise the window would exceed 512 pixels along either dimension.

Example usage:

manager.createWindow( dip::viewer::ImageViewer::Create( image ));