1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #include "mainwindow.h"
- #include <iostream>
- #include <cassert>
- using namespace std;
-
- void messageBox(const QString &st) {
- QMessageBox* msgBox = new QMessageBox();
- msgBox->setWindowTitle("Pesky Tourist");
- msgBox->setText(st);
- msgBox->setWindowFlags(Qt::WindowStaysOnTopHint);
- msgBox->show();
- }
-
- // Given a vector of ints, sorts it in ascending order
- void Sort(vector<int> &V){
- // Implement your selection sort algorithm here
-
- }
-
- // Given a (possibly unsorted) vector of ints, returns its median
- int Median(vector<int> &V){
-
- // Implement your median function ...
-
- return 0;
- }
-
- // Given a (possibly unsorted) vector of QRgbs, returns the median
- // composed of the medians of the color components.
- QRgb MedianPixel(const vector<QRgb> &V){
-
- // Implement you pixel median function here....
- return qRgb(0,0,0);
- }
-
-
-
- void test_Sort() {
-
- // Implement your unit test for sort here .....
-
- // You may change this to a congratulatory message once you
- // implement this unit test :-)
- messageBox("Sort unit test not yet implemented!!");
-
- }
-
- void test_Median() {
-
- // Implement your unit test for median here .....
-
- messageBox("Median unit test not yet implemented!!");
- }
-
- void test_MedianPixel() {
-
- // Implement your unit test for median pixel here .....
-
- messageBox("MedianPixel unit test not yet implemented!!");
- }
-
-
-
-
- void MainWindow::RemoveNoise(const vector<QImage> & images, QImage & finalImage){
-
- test_Sort();
- test_Median();
- test_MedianPixel();
-
- // Implement the filter here! See the algorithm in the lab
- messageBox("RemoveNoise function not yet implemented!!!");
-
- }
|