CVB++ 14.1
ImageScene Class Reference

Scene to provide a convenient display for an image. More...

#include <cvb/ui/image_scene.hpp>

Inherits QGraphicsScene.

Public Member Functions

 ImageScene (QObject *parent=nullptr)
 

Protected Member Functions

virtual void UploadImage (const Image &image) noexcept
 Upload an image. More...
 
class ImageViewImageView () noexcept
 Return the image view associated with this scene. More...
 

Detailed Description

Scene to provide a convenient display for an image.

This class can be subclasses to gain full access to Qt's graphics view frame work (e.g events). However, for most use cases you will not need this class at all therefore it it is recommended to use or subclass CvbQtImageView.

Examples
ShapeFinder2/QtShapeFinder2.

Constructor & Destructor Documentation

◆ ImageScene()

ImageScene ( QObject parent = nullptr)
inlineexplicit
Parameters
[in]parentParent object in Qt's object hierarchie.
Exceptions
Anyexception derived from std::exception including CvbException.

Member Function Documentation

◆ ImageView()

ImageView * ImageView ( )
inlineprotectednoexcept

Return the image view associated with this scene.

Returns
A pointer to the ImageView or nullptr if there is none.
Exceptions
Doesnot throw any exception.

This method is provided for convenience only.

◆ UploadImage()

void UploadImage ( const Image image)
inlineprotectedvirtualnoexcept

Upload an image.

Parameters
[in]imageImage to upload for rendering.
Exceptions
Doesnot throw any exception.

Do not call this method directly. You may override it in a subclass it required.