QtCvWrapper Class Reference

The QtCvWrapper implements a wrapper between Qt GUI and OpenCV framework. More...

#include <QtCvWrapper.h>

Collaboration diagram for QtCvWrapper:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotImageOpened ()
 slot is called when a new image is opened to synchronize the IplImage
void slotSnakeButtonPressed ()
 when the snake buttin is hit the algorithm should start
void slotTest ()
 just does a small demo with a simple ellipse in the image
void slotInitCurve ()
 does initialisation of the initial snake
void slotIterationOn ()
 iteration visualisation is turned on
void slotIterationOff ()
 iteration visualisation is turned off
void slotIterationStep ()
 iteration visualisation is turned on with user interaction

Public Member Functions

 QtCvWrapper (MainProgram *parent, MainWindow *gui)
 constructs the wrapper between Qt and OpenCV
 ~QtCvWrapper (void)
 destructor
bool iterate ()
 indicates if the iteration is schown or not
bool step ()
 indicates if the iteration is schown or not

Private Member Functions

void createTestImage (CvPoint center, CvSize axes, CvScalar color, CvScalar background)
 a simple test image with an ellipse is created
void convertImage (IplImage *src, QImage *dst)
 converts an ipl image to a qimage (hopefully)
CvPoint * createEllipse (QPoint ulPt, QPoint lrPt, int numSegments)
 creates an ellipse with the initialized upper left and lower right boundingbox vertices

Private Attributes

MainProgramm_parent
MainWindowm_gui
 parent that created the wrapper
Snakem_snake
 pointer to the actual gui
IplImage * m_iplImg
 m_snake is used for applying the snake algorithm to m_iplImg
bool m_iterate
 the actual shown and processed image
bool m_step
 switches iterations on/off

Detailed Description

The QtCvWrapper implements a wrapper between Qt GUI and OpenCV framework.

The QtCvWrapper implements some connections between the Qt GUI and the Intel OpenCV library. Also signal and slot connections from Qt to the non-Qt part are handeled here. Most of the functions from the Snake class are initiated from this wrapper when certain signals comming from the GUI.

Parameters:
parent represents the connection to the Image-Processing part
gui holds the pointer to the GUI

Definition at line 34 of file QtCvWrapper.h.


Constructor & Destructor Documentation

QtCvWrapper::QtCvWrapper ( MainProgram parent,
MainWindow gui 
)

constructs the wrapper between Qt and OpenCV

Definition at line 12 of file QtCvWrapper.cpp.

QtCvWrapper::~QtCvWrapper ( void   ) 

destructor

Definition at line 24 of file QtCvWrapper.cpp.

References m_snake.


Member Function Documentation

void QtCvWrapper::convertImage ( IplImage *  src,
QImage *  dst 
) [private]

converts an ipl image to a qimage (hopefully)

Definition at line 53 of file QtCvWrapper.cpp.

Referenced by slotInitCurve(), slotSnakeButtonPressed(), and slotTest().

CvPoint * QtCvWrapper::createEllipse ( QPoint  ulPt,
QPoint  lrPt,
int  numSegments 
) [private]

creates an ellipse with the initialized upper left and lower right boundingbox vertices

Definition at line 61 of file QtCvWrapper.cpp.

Referenced by slotInitCurve().

void QtCvWrapper::createTestImage ( CvPoint  center,
CvSize  axes,
CvScalar  color,
CvScalar  background 
) [private]

a simple test image with an ellipse is created

Definition at line 44 of file QtCvWrapper.cpp.

References m_iplImg.

Referenced by slotTest().

bool QtCvWrapper::iterate (  )  [inline]

indicates if the iteration is schown or not

Definition at line 45 of file QtCvWrapper.h.

References m_iterate.

Referenced by Snake::iterateSnakeCurve().

void QtCvWrapper::slotImageOpened (  )  [slot]

slot is called when a new image is opened to synchronize the IplImage

Definition at line 79 of file QtCvWrapper.cpp.

References MainWindow::getFileName(), m_gui, and m_iplImg.

void QtCvWrapper::slotInitCurve (  )  [slot]

does initialisation of the initial snake

Definition at line 101 of file QtCvWrapper.cpp.

References convertImage(), createEllipse(), MainWindow::getLRPt(), MainWindow::getULPt(), m_gui, m_iplImg, m_snake, and MainWindow::showImage().

void QtCvWrapper::slotIterationOff (  )  [slot]

iteration visualisation is turned off

Definition at line 127 of file QtCvWrapper.cpp.

References m_iterate, and m_step.

void QtCvWrapper::slotIterationOn (  )  [slot]

iteration visualisation is turned on

Definition at line 119 of file QtCvWrapper.cpp.

References m_iterate, and m_step.

void QtCvWrapper::slotIterationStep (  )  [slot]

iteration visualisation is turned on with user interaction

Definition at line 136 of file QtCvWrapper.cpp.

References m_iterate, and m_step.

void QtCvWrapper::slotSnakeButtonPressed (  )  [slot]

when the snake buttin is hit the algorithm should start

Definition at line 32 of file QtCvWrapper.cpp.

References convertImage(), Snake::iterateSnakeCurve(), m_gui, m_snake, and MainWindow::showImage().

void QtCvWrapper::slotTest (  )  [slot]

just does a small demo with a simple ellipse in the image

Definition at line 87 of file QtCvWrapper.cpp.

References convertImage(), createTestImage(), Snake::initSnakeCurve(), Snake::iterateSnakeCurve(), m_gui, m_iplImg, m_snake, and MainWindow::showImage().

bool QtCvWrapper::step (  )  [inline]

indicates if the iteration is schown or not

Definition at line 47 of file QtCvWrapper.h.

References m_step.

Referenced by Snake::iterateSnakeCurve().


Member Data Documentation

MainWindow* QtCvWrapper::m_gui [private]

parent that created the wrapper

Definition at line 77 of file QtCvWrapper.h.

Referenced by slotImageOpened(), slotInitCurve(), slotSnakeButtonPressed(), and slotTest().

IplImage* QtCvWrapper::m_iplImg [private]

m_snake is used for applying the snake algorithm to m_iplImg

Definition at line 79 of file QtCvWrapper.h.

Referenced by createTestImage(), slotImageOpened(), slotInitCurve(), and slotTest().

bool QtCvWrapper::m_iterate [private]

the actual shown and processed image

Definition at line 81 of file QtCvWrapper.h.

Referenced by iterate(), slotIterationOff(), slotIterationOn(), and slotIterationStep().

MainProgram* QtCvWrapper::m_parent [private]

Definition at line 76 of file QtCvWrapper.h.

Snake* QtCvWrapper::m_snake [private]

pointer to the actual gui

Definition at line 78 of file QtCvWrapper.h.

Referenced by slotInitCurve(), slotSnakeButtonPressed(), slotTest(), and ~QtCvWrapper().

bool QtCvWrapper::m_step [private]

switches iterations on/off

Definition at line 82 of file QtCvWrapper.h.

Referenced by slotIterationOff(), slotIterationOn(), slotIterationStep(), and step().


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 23:17:07 2006 for Snake Ballooning by  doxygen 1.4.7