Keine Beschreibung

mainwindow.h 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QFileDialog>
  5. #include <QDir>
  6. #include <QMessageBox>
  7. #include <QImage>
  8. using namespace std;
  9. //void RemoveNoise(QImage &, const vector<QImage> &) ;
  10. namespace Ui {
  11. class MainWindow;
  12. }
  13. class MainWindow : public QMainWindow{
  14. Q_OBJECT
  15. public:
  16. /// \fn MainWindow::MainWindow(QWidget *parent)
  17. /// \~English
  18. /// \brief Constructor
  19. /// \~Spanish
  20. /// \brief Constructor
  21. explicit MainWindow(QWidget *parent = 0);
  22. /// \fn void MainWindow::RemoveNoise(QImage & finalImage, const vector<QImage> & images)
  23. /// \~English
  24. /// \brief Function that removes the noise from a set of images.
  25. /// For each position (i,j) of the pixels, insert the pixel in that position of each of
  26. /// the images in a pixels vector, sort the pixel vector, and finally set
  27. /// the median pixel to the new image in position (i,j)
  28. /// \param finalImage Image with the noise removed
  29. /// \param images Vector of images to remove the noise
  30. /// \~Spanish
  31. /// \brief Funcion que elimina el ruido de un conjunto de imagenes.
  32. /// Por cada posicion (i, j) de los pixeles, inserta en un vector el pixel en
  33. /// esa posicion por cada una de las imagenes, ordena el vector de pixeles, y finalmente
  34. /// ajusta el pixel (i,j) de la nueva imagen al pixel en la media.
  35. void RemoveNoise(const vector<QImage> & images, QImage & finalImage);
  36. /// \fn MainWindow::MainWindow(QWidget *parent)
  37. /// \~English
  38. /// \brief Destructor
  39. /// \~Spanish
  40. /// \brief Destructor
  41. ~MainWindow();
  42. private slots:
  43. /// \fn void MainWindow::on_btnLoadImages_clicked()
  44. /// \~English
  45. /// \brief Function that sets an image to a given label
  46. /// \~Spanish
  47. /// \brief Funcion que carga una imagen a una etiqueta del GUI.
  48. void on_btnLoadImages_clicked();
  49. /// \fn void MainWindow::on_btnRemoveNoise_clicked()
  50. /// \~English
  51. /// \brief Function that invokes the function that removes the noise from the images
  52. /// and sets the returned image in the GUI
  53. /// \~Spanish
  54. /// \brief Funcion que invoca la funcion que elimina el ruido de las imagenes y
  55. /// ajusta la imagen que devuelve enn el GUI.
  56. void on_btnRemoveNoise_clicked();
  57. /// \fn void MainWindow::on_btnSaveImage_clicked()
  58. /// \~English
  59. /// \brief Function that saves the image without noise in the computer.
  60. /// \~Spanish
  61. /// \brief Funcion que guarda la imagen sin ruido en la computadora.
  62. void on_btnSaveImage_clicked();
  63. /// \fn on_actLoad_Images_triggered()
  64. /// \~English
  65. /// \brief Call on_btnLoadImages_clicked() from the buttons
  66. /// \~Spanish
  67. /// \brief Invoca on_btnLoadImages_clicked() desde los botones
  68. void on_actLoad_Images_triggered();
  69. /// \fn on_actRemoveNoise_triggered()
  70. /// \~English
  71. /// \brief Call on_btnRemoveNoise_clicked() from the buttons
  72. /// \~Spanish
  73. /// \brief Invoca on_btnRemoveNoise_clicked() desde los botones
  74. void on_actRemoveNoise_triggered();
  75. /// \fn on_actSaveImage_triggered()()
  76. /// \~English
  77. /// \brief Call on_actSaveImage_triggered() from the buttons
  78. /// \~Spanish
  79. /// \brief Invoca on_actSaveImage_triggered() desde los botones
  80. void on_actSaveImage_triggered();
  81. private:
  82. Ui::MainWindow *ui;
  83. QImage finalImage;
  84. // Vectors that contain the image and its values
  85. vector<QImage> images;
  86. /// \fn void MainWindow::loadImages(vector<QImage> & images, QString path)
  87. /// \~English
  88. /// \brief Function that loads multiple images from a directory path
  89. /// \param images image vector for images with noise.
  90. /// \param path path of the directory with the images to load.
  91. /// \~Spanish
  92. /// \brief Funcion que carga multiples imagenes de un directorio
  93. /// \param images vector de imagenes con ruido
  94. /// \param path camino al directorio con las imagenes para cargar.
  95. void loadImages(vector<QImage> & , QString);
  96. };
  97. #endif // MAINWINDOW_H