The ProcessWidget class handles image display and pattern tracing.
More...
The ProcessWidget class handles image display and pattern tracing.
ProcessWidget::ProcessWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Constructs ProcessWidget.
Reads an example file and sets up gui elements.
- Parameters
-
ProcessWidget::~ProcessWidget |
( |
| ) |
|
Destroys ProcessWidget.
Releases resources held by img and traceImg.
Point ProcessWidget::convertPoint |
( |
QPoint |
old | ) |
|
|
private |
Converts between Qt::Qpoint and cv::Point.
- Parameters
-
- Returns
- a cv::Point.
void ProcessWidget::drawLine |
( |
cv::Point |
start, |
|
|
cv::Point |
end |
|
) |
| |
|
private |
Draws a line on traceImg.
- Parameters
-
start | Start point. |
end | End point. |
void ProcessWidget::keyPressEvent |
( |
QKeyEvent * |
ev | ) |
|
|
privatevirtual |
Captures key press events.
Using the Enter key triggers a stop to the current trace. The trace is normalized and passed on to FourierAnalysis::analyze(QVector<QPointF>)
- Parameters
-
Reimplemented from QWidget.
void ProcessWidget::manualTraceInProgress |
( |
QString |
text | ) |
|
|
signal |
This signal is emitted once a trace has been initiated.
- Parameters
-
void ProcessWidget::mousePressEvent |
( |
QMouseEvent * |
ev | ) |
|
|
privatevirtual |
Records mouse clicks if a trace is active.
- Parameters
-
Reimplemented from QWidget.
Normalizes trace points.
- Parameters
-
samples | The trace to be normalized. |
- Returns
- a normalized trace on the range [0,1].
bool ProcessWidget::openImage |
( |
const QString & |
filepath | ) |
|
Loads an image from disk.
- Parameters
-
filepath | The image file path. |
- Returns
True
if the load is successful; otherwise False
.
bool ProcessWidget::saveTrace |
( |
QString |
filepath | ) |
|
Saves a normalized pattern trace to disk.
Format: x1, y1, \n x2, y2, \n etc.
- Parameters
-
filepath | The image file path. |
- Returns
True
if the save is successful; otherwise False
.
This signal is emitted when the trace is completed.
- Parameters
-
traceModel | The model resulting from the Fourier Analysis. |
The documentation for this class was generated from the following files:
- /home/sigrid/Code/processwidget.h
- /home/sigrid/Code/processwidget.cpp