51 #include <utils/mp/fixdictmp.h>
54 #include "ui_editorwindow.h"
56 #include "ui_formulaeditor.h"
58 #include "ui_enhancededitorwindow.h"
60 #include "ui_deletemessagebox.h"
62 #include "ui_processdurationmessagebox.h"
63 #include "treebaseddictwindow.h"
64 #include "ui_treebaseddictwindow.h"
65 #include "settingwindow.h"
66 #include "ui_settingwindow.h"
73 #include <QMainWindow>
75 #include <QAbstractTableModel>
77 #include <QAbstractItemDelegate>
78 #include <QFontMetrics>
79 #include <QModelIndex>
83 typedef unsigned int UINT32, *PUINT32;
86 typedef signed int INT32, *PINT32;
89 #define MAXUINT32 ((UINT32)~((UINT32)0))
92 #define MAXINT32 ((INT32)(MAXUINT32 >> 1))
95 #define MININT32 ((INT32)~MAXINT32)
112 enum truncation_criterion
119 enum source_file_type
142 typedef QList<QList<GaborAtom> > adaptive_atom_list;
143 typedef QList<FixDictAtom> fix_dict_atom_list;
144 typedef QMap<qint32, bool> select_map;
145 typedef Eigen::VectorXd VectorXd;
146 typedef Eigen::RowVectorXi RowVectorXi;
157 void fill_dict_combobox();
171 void save_fif_file();
185 void on_btt_Calc_clicked();
197 void on_actionW_rterbucheditor_triggered();
209 void on_actionAtomformeleditor_triggered();
221 void on_actionErweiterter_W_rterbucheditor_triggered();
233 void on_actionNeu_triggered();
245 void on_btt_OpenSignal_clicked();
259 void cb_selection_changed(
const QModelIndex&,
const QModelIndex&);
271 void tbv_selection_changed(
const QModelIndex& topLeft,
const QModelIndex& bottomRight);
289 void recieve_result(qint32 current_iteration, qint32 max_iterations, qreal current_energy, qreal max_energy, MatrixXd residuum,
290 adaptive_atom_list adaptive_atom_res_list, fix_dict_atom_list fix_dict_atom_res_list);
312 void recieve_warnings(qint32 warning_number);
324 void calc_thread_finished();
336 void on_actionCreate_treebased_dictionary_triggered();
348 void on_dsb_from_editingFinished();
360 void on_dsb_to_editingFinished();
374 void on_dsb_to_valueChanged(
double arg1);
388 void on_dsb_from_valueChanged(
double arg1);
400 void on_sb_sample_count_editingFinished();
414 void on_sb_sample_count_valueChanged(
int arg1);
426 void on_cb_all_select_clicked();
450 void on_actionSettings_triggered();
462 void on_dicts_saved();
474 void on_actionSpeicher_unter_triggered();
486 void on_actionSpeicher_triggered();
498 void on_actionExport_triggered();
510 void on_dsb_sample_rate_editingFinished();
524 void on_cb_Dicts_currentIndexChanged(
const QString &arg1);
536 void on_rb_adativMp_clicked();
548 void activate_info_label();
560 void recieve_save_progress(qint32 current_progress, qint32 finished);
564 void on_dsb_energy_valueChanged(
double arg1);
565 void on_actionBeenden_triggered();
566 void on_mouse_button_release();
568 void on_rb_OwnDictionary_clicked();
572 void send_input(MatrixXd send_signal, qint32 send_max_iterations, qreal send_epsilon,
bool fix_phase, qint32 boost, qint32 simplex_it,
573 qreal simplex_reflection, qreal simplex_expansion, qreal simplex_contraction, qreal simplex_full_contraction,
bool trial_separation);
574 void send_input_fix_dict(MatrixXd send_signal, qint32 send_max_iterations, qreal send_epsilon, qint32 boost, QString path, qreal delta);
575 void to_save(QString source_path, QString save_path, fiff_int_t start_change, fiff_int_t end_change, MatrixXd changes, MatrixXd original_signal, select_map select_channel_map, RowVectorXi picks, source_file_type file_type);
576 void kill_save_thread();
585 bool was_partialchecked;
586 bool read_fiff_changed;
590 fiff_int_t last_from;
591 qint32 last_sample_count;
592 qreal residuum_energy;
594 qreal composed_energy;
595 qint32 recieved_result_counter;
596 qint32 max_tbv_header_width;
599 source_file_type file_type;
600 QString last_open_path;
601 QString last_save_path;
602 QMap<qint32, bool> select_channel_map;
603 QMap<qint32, bool> select_atoms_map;
604 QList<QColor> original_colors;
605 QList<QList<GaborAtom> > _adaptive_atom_list;
606 QList<FixDictAtom> _fix_dict_atom_list;
608 RowVectorXf times_vec;
610 MatrixXd original_signal_matrix;
611 MatrixXd reference_matrix;
612 MatrixXd real_residuum_matrix;
619 QStandardItem* cb_item;
620 QStandardItemModel* cb_model;
621 std::vector<QStandardItem*> cb_items;
626 QTimer *_counter_timer;
655 bool read_matlab_file(QString fileName);
669 void read_matlab_file_new();
684 void calc_adaptiv_mp(MatrixXd signal, truncation_criterion criterion);
698 bool read_fiff_file(QString fileName);
710 void read_fiff_file_new(QString file_name);
724 bool read_fiff_ave(QString file_name);
738 void read_fiff_ave_new();
750 void fill_channel_combobox();
763 void save_parameters();
779 void calc_fix_mp(QString path, MatrixXd signal, truncation_criterion criterion);
793 QString create_display_text(
FixDictAtom global_best_matching);
807 void closeEvent(QCloseEvent * event);
822 static bool sort_energy_adaptive(
const QList<GaborAtom> atom_1,
const QList<GaborAtom> atom_2);
848 fiff_int_t press_pos;
851 void paintEvent(QPaintEvent *event);
852 void mouseMoveEvent(QMouseEvent *event);
853 void mousePressEvent(QMouseEvent *event);
854 void mouseReleaseEvent(QMouseEvent *event);
855 void wheelEvent (QWheelEvent *event);
871 void paint_signal(MatrixXd signalMatrix, QSize windowSize);
886 void paintEvent(QPaintEvent *event);
887 void mouseMoveEvent(QMouseEvent *event);
905 void paint_atom_sum(MatrixXd atom_matrix, QSize windowSize, qreal signalMaximum, qreal signalNegativeMaximum);
917 void paintEvent(QPaintEvent *event);
918 void mouseMoveEvent(QMouseEvent *event);
936 void paint_residuum(MatrixXd residuum_matrix, QSize windowSize, qreal maxPos, qreal maxNeg);
947 void paintEvent(QPaintEvent *event);
963 void paint_axis(MatrixXd signalMatrix, QSize windowSize);
973 typedef QMap<qint32, bool> select_map;
974 typedef Eigen::MatrixXd MatrixXd;
975 typedef FIFFLIB::fiff_int_t fiff_int_t;
976 typedef Eigen::RowVectorXi RowVectorXi;
994 void save_fif_file(QString source_path, QString save_path, fiff_int_t start_change, fiff_int_t end_change, MatrixXd changes, MatrixXd original_signal, select_map select_channel_map, RowVectorXi picks, source_file_type file_type);
997 void save_progress(qint32 current_progress, qint32 finished);
1003 #endif // MAINWINDOW_H
FIFF measurement file information.
ADAPIVEMP class declaration, providing the implemetation of the Matching Pursuit Algorithm introduced...
Editorwindow class declaration which enables the generation of individual dictionaries. Gaussian atoms (with parameters scale, modulation and phase) or chirp atoms could be created and saved as part dictionaries. For using the atoms for decompostion it's necessary to build an entire dictionary from serveral (minimum one) part dictionaries.
ProcessDurationMessagebox class declaration which gives the notice that calculation might take long...
FixDictAtom used in fix dict MP Algorithm.
The fixdictMP class provides functions several calculating functions to run the Matching Pursuit Algo...
EnhancedEditorWindow class declaration which enables the adaption of parameters for stored formulas...
The adaptiveMP class provides functions several calculating functions to run the Matching Pursuit Alg...
ATOM class declaration, providing core features and parameters of Atoms used in Matching Pursiut Algo...
DeleteMessageBox class declaration, which asked for acknowledgment to delete dictionaries or formulas...