#include <MainWindow.h>
Inheritance diagram for MainWindow:


Signals | |
| void | signalSnakeButtonPressed () |
| signal is emitted when the Snake button is pressed | |
| void | signalImageOpened () |
| signal is emitted when a new image is loaded within the gui | |
| void | signalDemoButtonPressed () |
| signal is emitted when the demo button is pressed | |
| void | signalInitCurve () |
| signal is emitted when the init curve should be set | |
| void | signalIterationOn () |
| signal is emitted when the iteration flag is switched on | |
| void | signalIterationOff () |
| signal is emitted when the iteration flag is switched off | |
| void | signalIterationStep () |
| signal is emitted when the iteration should be done stepwise | |
Public Member Functions | |
| MainWindow (QWidget *parent=0, Qt::WindowFlags flags=0) | |
| virtual | ~MainWindow () |
| const QImage * | getImage () |
| getter function for actual image | |
| void | setImage (QImage *img) |
| setter function for actual image | |
| void | showImage (QImage *img) |
| loads image into pixmap | |
| QLabel * | getImageLabel () |
| returns a pointer to the image label | |
| const QString * | getFileName () |
| holds the filename from the original image | |
| void | setULPt (int x, int y) |
| sets the upper left point of the ellipse bounding box | |
| QPoint | getULPt () |
| gets the upper left point of the ellipse bounding box | |
| void | setLRPt (int x, int y) |
| sets the lower right point of the ellipse bounding box | |
| QPoint | getLRPt () |
| gets the upper left point of the ellipse bounding box | |
Protected Member Functions | |
| void | setupUi (QMainWindow *MainWindow) |
| void | retranslateUi (QMainWindow *MainWindow) |
Protected Attributes | |
| QAction * | m_actionOpen |
| QAction * | m_actionSave |
| QAction * | m_actionSaveAs |
| QAction * | m_actionQuit |
| QAction * | m_actionZoomNormal |
| QAction * | m_actionZoomIn |
| QAction * | m_actionZoomOut |
| QAction * | m_actionZoomFit |
| QWidget * | centralwidget |
| QToolBox * | m_toolBox |
| QWidget * | m_snakeTools |
| QPushButton * | m_initEllipseButton |
| QPushButton * | m_snakeButton |
| QGroupBox * | m_iterationBox |
| QRadioButton * | m_iterationOn |
| QRadioButton * | m_iterationOff |
| QRadioButton * | m_iterationStep |
| QPushButton * | m_demoButton |
| QWidget * | m_preprocessingTools |
| QFrame * | m_imageFrame |
| QMenuBar * | menubar |
| QMenu * | m_menuFile |
| QMenu * | menu_View |
| QStatusBar * | statusbar |
Private Slots | |
| void | slotOpen () |
| opens and loads an image into m_imageLabel | |
| void | slotZoomNormal () |
| zooms to normal (initial) size | |
| void | slotSnakeButtonPressed () |
| fits the image to the available image space | |
| void | slotDemoButtonPressed () |
| triggers the demo with the ellipse image | |
| void | slotInitCurveButtonPressed () |
| sets the initial curve from the snake to the actual ellipse | |
| void | slotIterationOn () |
| switches the iteration window on when fitting the snake curve | |
| void | slotIterationOff () |
| switches the iteration window on when fitting the snake curve | |
| void | slotIterationStep () |
| lets the user do the iteration stepwise in the curve fitting window | |
Private Attributes | |
| QLabel * | m_imageLabel |
| space for the image | |
| QString * | m_fileName |
| filename of the actual image (for communication with OpenCV) | |
| QImage * | m_image |
| actual image | |
| double | m_scaleFactor |
| scale factor for the displayed image | |
| QPoint | m_ulPt |
| upper left of the boundary box of the ellipse | |
| QPoint | m_lrPt |
| lower right of the boundary box of the ellipse | |
Definition at line 19 of file MainWindow.h.
| MainWindow::MainWindow | ( | QWidget * | parent = 0, |
|
| Qt::WindowFlags | flags = 0 | |||
| ) |
Constructor of the MainWindow class
| parent | this optional parameter defines a parent widget the created instance will be child of | |
| flags | optional parameter defining extra widget options (see also the QT documentation) |
Definition at line 9 of file MainWindow.cpp.
References Ui_MainWindow::m_actionOpen, Ui_MainWindow::m_actionZoomNormal, Ui_MainWindow::m_demoButton, m_image, Ui_MainWindow::m_imageFrame, m_imageLabel, Ui_MainWindow::m_initEllipseButton, Ui_MainWindow::m_iterationOff, Ui_MainWindow::m_iterationOn, Ui_MainWindow::m_iterationStep, Ui_MainWindow::m_snakeButton, Ui_MainWindow::setupUi(), slotDemoButtonPressed(), slotInitCurveButtonPressed(), slotIterationOff(), slotIterationOn(), slotIterationStep(), slotOpen(), slotSnakeButtonPressed(), and slotZoomNormal().
Here is the call graph for this function:

| MainWindow::~MainWindow | ( | ) | [virtual] |
Destructor of the MainWindow class, defined virtual to guarantee that the destructor will be called even if the instance of this class is saved in a variable of a parent class type
Definition at line 41 of file MainWindow.cpp.
References m_image.
| const QString* MainWindow::getFileName | ( | ) | [inline] |
holds the filename from the original image
Definition at line 49 of file MainWindow.h.
References m_fileName.
Referenced by QtCvWrapper::slotImageOpened().
| const QImage* MainWindow::getImage | ( | ) | [inline] |
| QLabel* MainWindow::getImageLabel | ( | ) | [inline] |
returns a pointer to the image label
Definition at line 46 of file MainWindow.h.
References m_imageLabel.
| QPoint MainWindow::getLRPt | ( | ) | [inline] |
gets the upper left point of the ellipse bounding box
Definition at line 60 of file MainWindow.h.
References m_lrPt.
Referenced by ImageLabel::mouseReleaseEvent(), and QtCvWrapper::slotInitCurve().
| QPoint MainWindow::getULPt | ( | ) | [inline] |
gets the upper left point of the ellipse bounding box
Definition at line 54 of file MainWindow.h.
References m_ulPt.
Referenced by ImageLabel::mousePressEvent(), and QtCvWrapper::slotInitCurve().
| void Ui_MainWindow::retranslateUi | ( | QMainWindow * | MainWindow | ) | [inline, inherited] |
Definition at line 142 of file ui_MainWindow.h.
References Ui_MainWindow::m_actionOpen, Ui_MainWindow::m_actionQuit, Ui_MainWindow::m_actionSave, Ui_MainWindow::m_actionSaveAs, Ui_MainWindow::m_actionZoomFit, Ui_MainWindow::m_actionZoomIn, Ui_MainWindow::m_actionZoomNormal, Ui_MainWindow::m_actionZoomOut, Ui_MainWindow::m_demoButton, Ui_MainWindow::m_initEllipseButton, Ui_MainWindow::m_iterationBox, Ui_MainWindow::m_iterationOff, Ui_MainWindow::m_iterationOn, Ui_MainWindow::m_iterationStep, Ui_MainWindow::m_menuFile, Ui_MainWindow::m_preprocessingTools, Ui_MainWindow::m_snakeButton, Ui_MainWindow::m_snakeTools, Ui_MainWindow::m_toolBox, and Ui_MainWindow::menu_View.
Referenced by Ui_MainWindow::setupUi().
| void MainWindow::setImage | ( | QImage * | img | ) | [inline] |
| void MainWindow::setLRPt | ( | int | x, | |
| int | y | |||
| ) | [inline] |
sets the lower right point of the ellipse bounding box
Definition at line 58 of file MainWindow.h.
References m_lrPt.
Referenced by ImageLabel::mouseReleaseEvent().
| void MainWindow::setULPt | ( | int | x, | |
| int | y | |||
| ) | [inline] |
sets the upper left point of the ellipse bounding box
Definition at line 52 of file MainWindow.h.
References m_ulPt.
Referenced by ImageLabel::mousePressEvent().
| void Ui_MainWindow::setupUi | ( | QMainWindow * | MainWindow | ) | [inline, inherited] |
Definition at line 47 of file ui_MainWindow.h.
References Ui_MainWindow::centralwidget, Ui_MainWindow::m_actionOpen, Ui_MainWindow::m_actionQuit, Ui_MainWindow::m_actionSave, Ui_MainWindow::m_actionSaveAs, Ui_MainWindow::m_actionZoomFit, Ui_MainWindow::m_actionZoomIn, Ui_MainWindow::m_actionZoomNormal, Ui_MainWindow::m_actionZoomOut, Ui_MainWindow::m_demoButton, Ui_MainWindow::m_imageFrame, Ui_MainWindow::m_initEllipseButton, Ui_MainWindow::m_iterationBox, Ui_MainWindow::m_iterationOff, Ui_MainWindow::m_iterationOn, Ui_MainWindow::m_iterationStep, Ui_MainWindow::m_menuFile, Ui_MainWindow::m_preprocessingTools, Ui_MainWindow::m_snakeButton, Ui_MainWindow::m_snakeTools, Ui_MainWindow::m_toolBox, Ui_MainWindow::menu_View, Ui_MainWindow::menubar, Ui_MainWindow::retranslateUi(), and Ui_MainWindow::statusbar.
Referenced by MainWindow().
Here is the call graph for this function:

| void MainWindow::showImage | ( | QImage * | img | ) |
loads image into pixmap
Definition at line 51 of file MainWindow.cpp.
References m_imageLabel.
Referenced by QtCvWrapper::slotInitCurve(), QtCvWrapper::slotSnakeButtonPressed(), and QtCvWrapper::slotTest().
| void MainWindow::signalDemoButtonPressed | ( | ) | [signal] |
signal is emitted when the demo button is pressed
Definition at line 121 of file moc_MainWindow.cpp.
Referenced by slotDemoButtonPressed().
| void MainWindow::signalImageOpened | ( | ) | [signal] |
signal is emitted when a new image is loaded within the gui
Definition at line 115 of file moc_MainWindow.cpp.
Referenced by slotOpen().
| void MainWindow::signalInitCurve | ( | ) | [signal] |
signal is emitted when the init curve should be set
Definition at line 127 of file moc_MainWindow.cpp.
Referenced by slotInitCurveButtonPressed().
| void MainWindow::signalIterationOff | ( | ) | [signal] |
signal is emitted when the iteration flag is switched off
Definition at line 139 of file moc_MainWindow.cpp.
Referenced by slotIterationOff().
| void MainWindow::signalIterationOn | ( | ) | [signal] |
signal is emitted when the iteration flag is switched on
Definition at line 133 of file moc_MainWindow.cpp.
Referenced by slotIterationOn().
| void MainWindow::signalIterationStep | ( | ) | [signal] |
signal is emitted when the iteration should be done stepwise
Definition at line 145 of file moc_MainWindow.cpp.
Referenced by slotIterationStep().
| void MainWindow::signalSnakeButtonPressed | ( | ) | [signal] |
signal is emitted when the Snake button is pressed
Definition at line 109 of file moc_MainWindow.cpp.
Referenced by slotSnakeButtonPressed().
| void MainWindow::slotDemoButtonPressed | ( | ) | [private, slot] |
triggers the demo with the ellipse image
Definition at line 100 of file MainWindow.cpp.
References signalDemoButtonPressed().
Referenced by MainWindow().
| void MainWindow::slotInitCurveButtonPressed | ( | ) | [private, slot] |
sets the initial curve from the snake to the actual ellipse
Definition at line 112 of file MainWindow.cpp.
References signalInitCurve().
Referenced by MainWindow().
| void MainWindow::slotIterationOff | ( | ) | [private, slot] |
switches the iteration window on when fitting the snake curve
Definition at line 125 of file MainWindow.cpp.
References Ui_MainWindow::m_iterationOff, and signalIterationOff().
Referenced by MainWindow().
| void MainWindow::slotIterationOn | ( | ) | [private, slot] |
switches the iteration window on when fitting the snake curve
Definition at line 118 of file MainWindow.cpp.
References Ui_MainWindow::m_iterationOn, and signalIterationOn().
Referenced by MainWindow().
| void MainWindow::slotIterationStep | ( | ) | [private, slot] |
lets the user do the iteration stepwise in the curve fitting window
Definition at line 132 of file MainWindow.cpp.
References Ui_MainWindow::m_iterationStep, and signalIterationStep().
Referenced by MainWindow().
| void MainWindow::slotOpen | ( | ) | [private, slot] |
opens and loads an image into m_imageLabel
Definition at line 58 of file MainWindow.cpp.
References m_fileName, m_image, m_imageLabel, and signalImageOpened().
Referenced by MainWindow().
| void MainWindow::slotSnakeButtonPressed | ( | ) | [private, slot] |
fits the image to the available image space
Definition at line 94 of file MainWindow.cpp.
References signalSnakeButtonPressed().
Referenced by MainWindow().
| void MainWindow::slotZoomNormal | ( | ) | [private, slot] |
zooms to normal (initial) size
Definition at line 106 of file MainWindow.cpp.
Referenced by MainWindow().
QWidget* Ui_MainWindow::centralwidget [inherited] |
QAction* Ui_MainWindow::m_actionOpen [inherited] |
Definition at line 22 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionQuit [inherited] |
Definition at line 25 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionSave [inherited] |
Definition at line 23 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionSaveAs [inherited] |
Definition at line 24 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionZoomFit [inherited] |
Definition at line 29 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionZoomIn [inherited] |
Definition at line 27 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionZoomNormal [inherited] |
Definition at line 26 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QAction* Ui_MainWindow::m_actionZoomOut [inherited] |
Definition at line 28 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QPushButton* Ui_MainWindow::m_demoButton [inherited] |
Definition at line 39 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QString* MainWindow::m_fileName [private] |
filename of the actual image (for communication with OpenCV)
Definition at line 86 of file MainWindow.h.
Referenced by getFileName(), and slotOpen().
QImage* MainWindow::m_image [private] |
actual image
Definition at line 88 of file MainWindow.h.
Referenced by getImage(), MainWindow(), setImage(), slotOpen(), and ~MainWindow().
QFrame* Ui_MainWindow::m_imageFrame [inherited] |
Definition at line 41 of file ui_MainWindow.h.
Referenced by MainWindow(), and Ui_MainWindow::setupUi().
QLabel* MainWindow::m_imageLabel [private] |
space for the image
Definition at line 84 of file MainWindow.h.
Referenced by getImageLabel(), MainWindow(), showImage(), and slotOpen().
QPushButton* Ui_MainWindow::m_initEllipseButton [inherited] |
Definition at line 33 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QGroupBox* Ui_MainWindow::m_iterationBox [inherited] |
Definition at line 35 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QRadioButton* Ui_MainWindow::m_iterationOff [inherited] |
Definition at line 37 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), Ui_MainWindow::setupUi(), and slotIterationOff().
QRadioButton* Ui_MainWindow::m_iterationOn [inherited] |
Definition at line 36 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), Ui_MainWindow::setupUi(), and slotIterationOn().
QRadioButton* Ui_MainWindow::m_iterationStep [inherited] |
Definition at line 38 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), Ui_MainWindow::setupUi(), and slotIterationStep().
QPoint MainWindow::m_lrPt [private] |
QMenu* Ui_MainWindow::m_menuFile [inherited] |
Definition at line 43 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QWidget* Ui_MainWindow::m_preprocessingTools [inherited] |
Definition at line 40 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
double MainWindow::m_scaleFactor [private] |
QPushButton* Ui_MainWindow::m_snakeButton [inherited] |
Definition at line 34 of file ui_MainWindow.h.
Referenced by MainWindow(), Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QWidget* Ui_MainWindow::m_snakeTools [inherited] |
Definition at line 32 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QToolBox* Ui_MainWindow::m_toolBox [inherited] |
Definition at line 31 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QPoint MainWindow::m_ulPt [private] |
QMenu* Ui_MainWindow::menu_View [inherited] |
Definition at line 44 of file ui_MainWindow.h.
Referenced by Ui_MainWindow::retranslateUi(), and Ui_MainWindow::setupUi().
QMenuBar* Ui_MainWindow::menubar [inherited] |
QStatusBar* Ui_MainWindow::statusbar [inherited] |
1.4.7