class
#include <diplib/viewer/slice.h>
SliceViewer Interactive nD tensor image viewer.
Contents
Base classes
- class Viewer
- A Window for viewing a
dip::
Image
Public functions
- auto options() -> ViewingOptions& override
- Returns the
Viewer
's model. -
auto image() -> const dip::
Image& override - Returns the
dip::
being visualized, converted to real valued.Image -
auto original() -> const dip::
Image& override - Returns the
dip::
being visualized.Image -
void setImage(const dip::
Image& image) override - Sets the image to be visualized.
- void updateLinkedViewers()
- Update linked viewers.
- void link(SliceViewer& other)
- Link this viewer to another, compatible one.
Public static functions
-
static auto Create(const dip::
Image& image, std::string name = "SliceViewer", size_t width = 0, size_t height = 0) -> Ptr - Construct a new SliceViewer.
Protected functions
- void create() override
- Overridable callback that is called when the window is created.
- void reshape(int, int) override
- Overridable callback that is called when the window shape is changed.
- void draw() override
- Overridable callback that draws the visualization.
- void key(unsigned char k, int x, int y, int mods) override
- Overridable callback that is called when a key is pressed.
- void click(int, int, int, int, int) override
- Overridable callback that is called when a mouse button is clicked.
- void motion(int, int) override
- Overridable callback that is called when the mouse is moved while a button is clicked.
Function documentation
ViewingOptions& dip:: viewer:: SliceViewer:: options() override
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; }
const dip:: Image& dip:: viewer:: SliceViewer:: image() override
Returns the dip::
being visualized, converted to real valued.
Only call this under lock.
Example usage:
{ dip::viewer::Viewer::Guard(*viewer); dip::Image image = viewer->image(); }
const dip:: Image& dip:: viewer:: SliceViewer:: original() override
Returns the dip::
being visualized.
Only call this under lock.
Example usage:
{ dip::viewer::Viewer::Guard(*viewer); dip::Image image = viewer->original(); }
void dip:: viewer:: SliceViewer:: setImage(const dip:: Image& image) override
Sets the image to be visualized.
Only call this under lock.
Example usage:
{ dip::viewer::Viewer::Guard(*viewer); viewer->setImage(image); }
static Ptr dip:: viewer:: SliceViewer:: Create(const dip:: Image& image,
std::string name = "SliceViewer",
size_t width = 0,
size_t height = 0)
Construct a new SliceViewer.
As the constructor is protected, this is the only way to create a SliceViewer.
Example usage:
manager.createWindow( dip::viewer::SliceViewer::Create( image ));