QVImageCanvas Class Reference
[Graphical User Interface]

Viewer widget for QVImage objects and other data types. More...

#include <qvgui/qvimagecanvas.h>

Inherits QVPropertyContainer.

List of all members.

Public Slots

void rectSelectedSlot (QRect rect)
void polySelectedSlot (QPoint point, bool reset, TPolyMode mode)
void circleSelectedSlot (QPoint center, float radius)

Public Member Functions

 QVImageCanvas (const QString name=QString(), QWidget *parent=0)
bool linkProperty (QVWorker &worker, const QString propertyName, QColor color=Qt::red, bool printTags=false)
bool linkROI (QVWorker *worker, const QString propertyName)
bool linkPolyline (QVWorker *worker, const QString propertyName)
bool unlink (QVWorker *worker, const QString propertyName)
void setLowHigh (float low, float high)
virtual void custom_viewer ()


Detailed Description

Viewer widget for QVImage objects and other data types.

When created an object derived from this class, the interface opens a window that depicts the content of a property of type QVImage contained in a property holder (normally a QVWorker object).

Usage is as follows: first create a QVImageCanvas object in the main() function of a program, then link a QVImage type property from a property holder:

[...]

CannyWorker cannyWorker("Canny");

[...]

QVImageCanvas imageCanvas;
imageCanvas.linkProperty(cannyWorker,"Canny image");

[...]

and latter call for the exec() function of the QVApplication object of the program. This will automatically create a window like the following:

qvimagecanvas_penguin.png

You can see it has a zoom number indicator (z = 1), horizontal and vertical rules (in pixels), and some buttons. These latter control zooming and moving around a zoomed area of the image mostly, and a detailed explanation of each one follows:

Zoom in button
qvimagecanvas_zoomin.png
This button zooms the image in. Canvas window doesn't change size, but the area of the image displayed becomes smaller by a factor of 4 (width and height gets divided by 2). The label of the left bottom corner displays the text
z=<zoom>
where <zoom> is a number indicating the zoom factor that divides width and height in the actual zoom level.

Zoom out button
qvimagecanvas_zoomout.png
This button divides zoom factor by 2, if it is equal or greater than 2. If the canvas window is bigger than the image at the final zoom, it is adjusted to the size of the latter.

Zoom restore button
qvimagecanvas_zoomrestore.png
This button sets zoom factor by 1, and resizes canvas window to its original size.

Select zoom region button
qvimagecanvas_zoomregion.png
This button lets you select a rectangle in the image to zoom, adjusting zoom factor and canvas window size to it.

Select polyline button
qvimagecanvas_polyline.png
This button lets you select points in the image. That points list can be get as the "poly select" imageCanvas's property. You can explain this button by pushing it for a few seconds, and you can select a polyline representation, a point list representation, or generate a circular polyline, by a click and drag mode.

Select ROI button
qvimagecanvas_roi.png
This button lets you select a rectangle in the image, that rectangle can be get as the "rect select" imageCanvas's property. And can be use to apply operations only to this rectangle.

Drag mode
qvimagecanvas_drag.png
This button activates drag mode. With it you can move around the image displayed in the canvas window, if the zoom factor forces the canvas window to show only a sub-region of the image, by holding click and dragging over the depicted image.

In the following figure you can see a zoomed canvas window depicting a sub-region of the original image:

qvimagecanvas_penguinpixels.png

Another interesting feature of image canvas is that at a zoom factor bigger or equal to 32, the canvas renders the gray-scale pixel value over every pixel if the image is gray-scale, or the three different values for each of the RGB channels over every pixel, if the image is RGB, as depicted below:

qvimagecanvas_penguinpixelnumbers.png

Definition at line 105 of file qvimagecanvas.h.


Member Function Documentation

void QVImageCanvas::circleSelectedSlot ( QPoint  center,
float  radius 
) [slot]

Todo:
¿El ROI debe mandarse al worker mientras se está arrastrando, o solo cuando se suente el ratón? -> Hacer concilio

¿Cuantos puntos debe contener la polilínea de la circunferencia, uno por pixel o menos? -> Hacer concilio

Definition at line 335 of file qvimagecanvas.cpp.


The documentation for this class was generated from the following files: