diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2017-02-07 17:33:01 +0100 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2017-02-07 17:33:01 +0100 |
commit | 55c7181126aa7defce38c9b82872d14223d4c1dd (patch) | |
tree | 7c683f014709459f066fd87a21da7f74cfc31a53 /GudhUI/gui |
Initial import of upstream's 1.3.1.upstream/1.3.1
Diffstat (limited to 'GudhUI/gui')
-rw-r--r-- | GudhUI/gui/KNearestNeighborsMenu.ui | 150 | ||||
-rw-r--r-- | GudhUI/gui/MainWindow.cpp | 299 | ||||
-rw-r--r-- | GudhUI/gui/MainWindow.h | 118 | ||||
-rw-r--r-- | GudhUI/gui/MenuEdgeContraction.ui | 118 | ||||
-rw-r--r-- | GudhUI/gui/Menu_edge_contraction.cpp | 97 | ||||
-rw-r--r-- | GudhUI/gui/Menu_edge_contraction.h | 63 | ||||
-rw-r--r-- | GudhUI/gui/Menu_k_nearest_neighbors.cpp | 59 | ||||
-rw-r--r-- | GudhUI/gui/Menu_k_nearest_neighbors.h | 51 | ||||
-rw-r--r-- | GudhUI/gui/Menu_persistence.cpp | 53 | ||||
-rw-r--r-- | GudhUI/gui/Menu_persistence.h | 51 | ||||
-rw-r--r-- | GudhUI/gui/Menu_uniform_neighbors.cpp | 60 | ||||
-rw-r--r-- | GudhUI/gui/Menu_uniform_neighbors.h | 51 | ||||
-rw-r--r-- | GudhUI/gui/PersistenceMenu.ui | 139 | ||||
-rw-r--r-- | GudhUI/gui/UniformNeighborsMenu.ui | 153 | ||||
-rw-r--r-- | GudhUI/gui/gudhui.cpp | 38 | ||||
-rw-r--r-- | GudhUI/gui/main_window.ui | 255 |
16 files changed, 1755 insertions, 0 deletions
diff --git a/GudhUI/gui/KNearestNeighborsMenu.ui b/GudhUI/gui/KNearestNeighborsMenu.ui new file mode 100644 index 00000000..472db48b --- /dev/null +++ b/GudhUI/gui/KNearestNeighborsMenu.ui @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>KNearestNeighborsMenu</class> + <widget class="QDialog" name="KNearestNeighborsMenu"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>298</width> + <height>209</height> + </rect> + </property> + <property name="windowTitle"> + <string>k-nearest neighbors</string> + </property> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>50</x> + <y>160</y> + <width>171</width> + <height>32</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QWidget" name="formLayoutWidget"> + <property name="geometry"> + <rect> + <x>30</x> + <y>10</y> + <width>229</width> + <height>84</height> + </rect> + </property> + <layout class="QFormLayout" name="formLayout_2"> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::AllNonFixedFieldsGrow</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>k </string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QSpinBox" name="spinBoxK"> + <property name="maximum"> + <number>10000000</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Metric</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="comboBoxMetric"> + <item> + <property name="text"> + <string>Ambient</string> + </property> + </item> + <item> + <property name="text"> + <string>Reduced Space</string> + </property> + </item> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="gridLayoutWidget"> + <property name="geometry"> + <rect> + <x>30</x> + <y>110</y> + <width>250</width> + <height>40</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="1"> + <widget class="QPushButton" name="pushButtonCompute"> + <property name="text"> + <string>Compute</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="checkBoxAutoUpdate"> + <property name="text"> + <string>auto update</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>KNearestNeighborsMenu</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>KNearestNeighborsMenu</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/GudhUI/gui/MainWindow.cpp b/GudhUI/gui/MainWindow.cpp new file mode 100644 index 00000000..779ccd33 --- /dev/null +++ b/GudhUI/gui/MainWindow.cpp @@ -0,0 +1,299 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "MainWindow.h" + +#include <QWidget> +#include <QInputDialog> +#include <QFileDialog> + +#include <fenv.h> + +#include "gui/Menu_k_nearest_neighbors.h" +#include "gui/Menu_uniform_neighbors.h" +#include "gui/Menu_edge_contraction.h" +#include "gui/Menu_persistence.h" + +MainWindow::MainWindow(QWidget* parent) : + menu_k_nearest_neighbors_(new Menu_k_nearest_neighbors(this)), + menu_uniform_neighbors_(new Menu_uniform_neighbors(this)), + menu_edge_contraction_(new Menu_edge_contraction(this, model_)), + menu_persistence_(new Menu_persistence(this)) { + // #ifndef NDEBUG // catch nan + // feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); + // #endif + + setupUi(this); + + viewer_instructor_ = new Viewer_instructor( + this, + this->viewer, + model_.complex_); + + connectActions(); + + update_view(); +} + +void +MainWindow::closeEvent(QCloseEvent *event) { + exit(0); +} + +void +MainWindow::connectActions() { + QObject::connect(this->actionLoad_complex, SIGNAL(triggered()), this, + SLOT(off_file_open())); + QObject::connect(this->actionLoad_points, SIGNAL(triggered()), this, + SLOT(off_points_open())); + QObject::connect(this->actionSave_complex, SIGNAL(triggered()), this, + SLOT(off_file_save())); + QObject::connect(this->actionSave_points, SIGNAL(triggered()), this, + SLOT(off_points_save())); + + QObject::connect(this->actionShow_graph_stats, SIGNAL(triggered()), this, + SLOT(show_graph_stats())); + QObject::connect(this->actionShow_complex_stats, SIGNAL(triggered()), this, + SLOT(show_complex_stats())); + QObject::connect(this->actionShow_complex_dimension, SIGNAL(triggered()), this, + SLOT(show_complex_dimension())); + + QObject::connect(this->actionUniform_proximity_graph, SIGNAL(triggered()), this, + SLOT(build_rips_menu())); + QObject::connect(this->actionK_nearest_neighbors_graph, SIGNAL(triggered()), this, + SLOT(build_k_nearest_neighbors_menu())); + + + QObject::connect(this->actionContract_edges, SIGNAL(triggered()), this, + SLOT(contract_edge_menu())); + + QObject::connect(this->actionCollapse_vertices, SIGNAL(triggered()), this, + SLOT(collapse_vertices())); + + QObject::connect(this->actionCollapse_edges, SIGNAL(triggered()), this, + SLOT(collapse_edges())); + + QObject::connect(this->actionNoise, SIGNAL(triggered()), this, + SLOT(uniform_noise())); + QObject::connect(this->actionLloyd, SIGNAL(triggered()), this, + SLOT(lloyd())); + + + // view + QObject::connect(this->actionPoints, SIGNAL(triggered()), this->viewer_instructor_, + SLOT(change_draw_vertices())); + QObject::connect(this->actionEdges, SIGNAL(triggered()), this->viewer_instructor_, + SLOT(change_draw_edges())); + QObject::connect(this->actionTriangles, SIGNAL(triggered()), this->viewer_instructor_, + SLOT(change_draw_triangles())); + + // topology + QObject::connect(this->actionShow_homology_group, SIGNAL(triggered()), this, + SLOT(show_homology_group())); + QObject::connect(this->actionEuler_characteristic, SIGNAL(triggered()), this, + SLOT(show_euler_characteristic())); + QObject::connect(this->actionPersistence, SIGNAL(triggered()), this, + SLOT(persistence_menu())); + QObject::connect(this->actionEstimate_topological_changes, SIGNAL(triggered()), this, + SLOT(critical_points_menu())); + QObject::connect(this->actionIs_manifold, SIGNAL(triggered()), this, + SLOT(is_manifold_menu())); + + + QObject::connect(this, SIGNAL(sceneChanged()), this->viewer_instructor_, + SLOT(sceneChanged())); +} + +void +MainWindow::init_view() const { + viewer_instructor_->initialize_bounding_box(); + viewer_instructor_->show_entire_scene(); + update_view(); +} + +void +MainWindow::update_view() const { + emit(sceneChanged()); +} + +/** + * open a file chooser to choose an off to load + */ +void +MainWindow::off_file_open() { + QString fileName = QFileDialog::getOpenFileName(this, tr("Open off File"), + "~/", tr("off files (*.off)")); + if (!fileName.isEmpty()) { + model_.off_file_open(fileName.toStdString()); + init_view(); + } +} + +void +MainWindow::off_points_open() { + QString fileName = QFileDialog::getOpenFileName(this, tr("Open points in a off file"), + "~/", tr("off files (*.off)")); + if (!fileName.isEmpty()) { + model_.off_points_open(fileName.toStdString()); + init_view(); + } +} + +/** + * open a file chooser to choose an off to save + */ +void +MainWindow::off_file_save() { + QString fileName = QFileDialog::getOpenFileName(this, tr("Save to off File"), + "~/", tr("off files (*.off)")); + if (!fileName.isEmpty()) { + model_.off_file_save(fileName.toStdString()); + } +} + +/** + * open a file chooser to choose an off to save + */ +void +MainWindow::off_points_save() { + QString fileName = QFileDialog::getOpenFileName(this, tr("Save to off File"), + "~/", tr("off files (*.off)")); + if (!fileName.isEmpty()) { + model_.off_points_save(fileName.toStdString()); + } +} + +void +MainWindow::show_graph_stats() { + model_.show_graph_stats(); +} + +void +MainWindow::show_complex_stats() { + model_.show_complex_stats(); +} + +void +MainWindow::show_complex_dimension() { + model_.show_complex_dimension(); +} + +void +MainWindow::build_rips_menu() { + menu_uniform_neighbors_->show(); +} + +void +MainWindow::build_rips(double alpha) { + model_.build_rips(alpha); + update_view(); +} + +void +MainWindow::build_k_nearest_neighbors_menu() { + menu_k_nearest_neighbors_->show(); +} + +void +MainWindow::build_k_nearest_neighbors(unsigned k) { + model_.build_k_nearest_neighbors(k); + update_view(); +} + +void +MainWindow::contract_edge_menu() { + menu_edge_contraction_->show(); +} + +void +MainWindow::contract_edges(unsigned num_collapses) { + std::cerr << "Collapse " << num_collapses << " vertices\n"; + model_.contract_edges(num_collapses); + update_view(); +} + +void +MainWindow::collapse_edges() { + model_.collapse_edges(model_.num_edges()); + update_view(); +} + +void +MainWindow::collapse_vertices() { + std::cerr << "Collapse vertices edges\n"; + model_.collapse_vertices(0); + update_view(); +} + +void +MainWindow::uniform_noise() { + bool ok; + double amplitude = QInputDialog::getDouble(this, tr("Uniform noise"), + tr("Amplitude:"), 0, 0, 10000, 3, &ok); + srand(time(NULL)); + if (ok) + model_.uniform_noise(amplitude); +} + +void +MainWindow::lloyd() { + // todo 1 ask lloyd parameters + model_.lloyd(0, 0); + update_view(); +} + +void +MainWindow::show_homology_group() { + model_.show_homology_group(); +} + +void +MainWindow::show_euler_characteristic() { + model_.show_euler_characteristic(); +} + +void +MainWindow::persistence_menu() { + menu_persistence_->show(); +} + +void +MainWindow::compute_persistence(int p, double threshold, int max_dim, double min_pers) { + model_.show_persistence(p, threshold, max_dim, min_pers); +} + +void +MainWindow::critical_points_menu() { + bool ok; + double max_length = QInputDialog::getDouble(this, tr("Maximal edge length for the Rips"), + tr("Maximal edge length:"), 0, 0, 10000, 3, &ok); + if (ok) + model_.show_critical_points(max_length); +} + +void +MainWindow::is_manifold_menu() { + model_.show_is_manifold(); +} + + +#include "MainWindow.moc" diff --git a/GudhUI/gui/MainWindow.h b/GudhUI/gui/MainWindow.h new file mode 100644 index 00000000..c8c3fcf6 --- /dev/null +++ b/GudhUI/gui/MainWindow.h @@ -0,0 +1,118 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GUI_MAINWINDOW_H_ +#define GUI_MAINWINDOW_H_ + +// Workaround for moc-qt4 not parsing boost headers +#include <CGAL/config.h> + +#include <QMainWindow> +#include "ui_main_window.h" +#include "model/Model.h" +#include "view/Viewer_instructor.h" + + +class Menu_k_nearest_neighbors; +class Menu_uniform_neighbors; +class Menu_edge_contraction; +class Menu_persistence; + +class MainWindow : public QMainWindow, public Ui::MainWindow { + Q_OBJECT + + private: + Model model_; + Viewer_instructor* viewer_instructor_; + Menu_k_nearest_neighbors* menu_k_nearest_neighbors_; + Menu_uniform_neighbors* menu_uniform_neighbors_; + Menu_edge_contraction* menu_edge_contraction_; + Menu_persistence* menu_persistence_; + + public: + MainWindow(QWidget* parent = 0); + void connectActions(); + + /** + * compute the bounding box and calls update view + */ + void init_view() const; + void update_view() const; + + + protected: + void closeEvent(QCloseEvent *event); + + void keyPressEvent(QKeyEvent *event) { } + + public: + public slots: + /** + * open a file chooser to choose an off to load + */ + void off_file_open(); + + void off_points_open(); + + /** + * open a file chooser to choose an off to save + */ + void off_file_save(); + void off_points_save(); + + void show_graph_stats(); + void show_complex_stats(); + void show_complex_dimension(); + + + void build_rips_menu(); + void build_rips(double alpha); + void build_k_nearest_neighbors_menu(); + void build_k_nearest_neighbors(unsigned k); + + + void contract_edge_menu(); + void contract_edges(unsigned num_collapses); + + + void collapse_vertices(); + void collapse_edges(); + + + void uniform_noise(); + void lloyd(); + + void show_homology_group(); + void show_euler_characteristic(); + void persistence_menu(); + void compute_persistence(int p, double threshold, int max_dim, double min_pers); + void critical_points_menu(); + void is_manifold_menu(); + + + public: + signals: + void sceneChanged() const; +}; + + +#endif // GUI_MAINWINDOW_H_ diff --git a/GudhUI/gui/MenuEdgeContraction.ui b/GudhUI/gui/MenuEdgeContraction.ui new file mode 100644 index 00000000..b1696431 --- /dev/null +++ b/GudhUI/gui/MenuEdgeContraction.ui @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MenuEdgeContraction</class> + <widget class="QDialog" name="MenuEdgeContraction"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>362</width> + <height>209</height> + </rect> + </property> + <property name="windowTitle"> + <string>Edge contraction</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="5" column="2"> + <widget class="QSpinBox" name="spinBox_nb_remaining_vertices"> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>999999999</number> + </property> + <property name="value"> + <number>1</number> + </property> + </widget> + </item> + <item row="7" column="2"> + <widget class="QCheckBox" name="checkBox_link_condition"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Link condition</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="2" alignment="Qt::AlignRight"> + <widget class="QLabel" name="txt_nb_collapses"> + <property name="text"> + <string>1</string> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Policy</string> + </property> + </widget> + </item> + <item row="6" column="2"> + <widget class="QComboBox" name="m_simplificationMethod"> + <item> + <property name="text"> + <string>Length_midpoint</string> + </property> + </item> + </widget> + </item> + <item row="2" column="2" alignment="Qt::AlignRight"> + <widget class="QLabel" name="txt_nb_vertices"> + <property name="text"> + <string>0</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Number of vertices</string> + </property> + </widget> + </item> + <item row="3" column="0" colspan="2"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Number of contractions</string> + </property> + </widget> + </item> + <item row="5" column="0" colspan="2"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Number of vertices after </string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSlider" name="horizontalSlider"> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="pushButton_collapse"> + <property name="text"> + <string>Perform collapse</string> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/GudhUI/gui/Menu_edge_contraction.cpp b/GudhUI/gui/Menu_edge_contraction.cpp new file mode 100644 index 00000000..a679b0bf --- /dev/null +++ b/GudhUI/gui/Menu_edge_contraction.cpp @@ -0,0 +1,97 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GUI_MENU_EDGE_CONTRACTION_CPP_ +#define GUI_MENU_EDGE_CONTRACTION_CPP_ + +#include "Menu_edge_contraction.h" + +Menu_edge_contraction::Menu_edge_contraction(MainWindow* parent, const Model& model) : + parent_(parent), model_(model) { + setupUi(this); + connectActions(parent_); +} + +void Menu_edge_contraction::connectActions(MainWindow* parent) { + QObject::connect( + this->horizontalSlider, + SIGNAL(valueChanged(int)), + this, + SLOT(slider_value_changed(int))); + + + QObject::connect(this, SIGNAL(contract_edges(unsigned)), parent, SLOT(contract_edges(unsigned))); + + QObject::connect(this->pushButton_collapse, SIGNAL(clicked()), this, SLOT(send_contract_edges())); +} + +void Menu_edge_contraction::slider_value_changed(int new_slider_value) { + int num_collapses = + (horizontalSlider->value() == 1) ? 1 : horizontalSlider->value() * model_.num_vertices() / 100; + this->txt_nb_vertices->setNum(static_cast<int>(model_.num_vertices())); + this->txt_nb_collapses->setNum(num_collapses); + this->spinBox_nb_remaining_vertices->setValue(model_.num_vertices() - num_collapses); +} + +void +Menu_edge_contraction::update_slider_value() { + int num_vertices = model_.num_vertices(); + int num_collapses = (horizontalSlider->value() == 1) ? 1 : horizontalSlider->value() * num_vertices / 100; + int horizontal_slider_position = num_vertices > 0 ? num_collapses / static_cast<double>(num_vertices * 100) : 1; + horizontalSlider->setValue(horizontal_slider_position); +} + +void +Menu_edge_contraction::update_gui_numbers() { + update_slider_value(); + bool ok; + int num_collapses = this->txt_nb_collapses->text().toInt(&ok, 10); + if (!ok) return; + this->txt_nb_vertices->setNum(static_cast<int>(model_.num_vertices())); + this->txt_nb_collapses->setNum(num_collapses); + this->spinBox_nb_remaining_vertices->setValue(model_.num_vertices() - num_collapses); +} + +void +Menu_edge_contraction::update_gui_numbers(int new_value) { + update_gui_numbers(); +} + +void +Menu_edge_contraction::send_contract_edges() { + emit(contract_edges(num_collapses())); + update_gui_numbers(); +} + +unsigned +Menu_edge_contraction::num_vertices() { + return model_.num_vertices(); +} + +unsigned +Menu_edge_contraction::num_collapses() { + return (horizontalSlider->value() == 1) ? 1 : horizontalSlider->value() * num_vertices() / 100; +} + +#include "Menu_edge_contraction.moc" + +#endif // GUI_MENU_EDGE_CONTRACTION_CPP_ diff --git a/GudhUI/gui/Menu_edge_contraction.h b/GudhUI/gui/Menu_edge_contraction.h new file mode 100644 index 00000000..08f0bf67 --- /dev/null +++ b/GudhUI/gui/Menu_edge_contraction.h @@ -0,0 +1,63 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GUI_MENU_EDGE_CONTRACTION_H_ +#define GUI_MENU_EDGE_CONTRACTION_H_ + +// Workaround for moc-qt4 not parsing boost headers +#include <CGAL/config.h> + +#include "gui/MainWindow.h" +#include "gui/ui_MenuEdgeContraction.h" + +#include "model/Model.h" + +class Menu_edge_contraction : public QDialog, public Ui::MenuEdgeContraction { + Q_OBJECT + + private: + MainWindow* parent_; + const Model& model_; + + void update_slider_value(); + + public: + Menu_edge_contraction(MainWindow* parent, const Model& model); + + void connectActions(MainWindow* parent); + + private: + unsigned num_vertices(); + unsigned num_collapses(); + + public slots: + void slider_value_changed(int new_slider_value); + void update_gui_numbers(); + void update_gui_numbers(int gui_numbers); + + void send_contract_edges(); + + signals: + void contract_edges(unsigned num_collapses); +}; + +#endif // GUI_MENU_EDGE_CONTRACTION_H_ diff --git a/GudhUI/gui/Menu_k_nearest_neighbors.cpp b/GudhUI/gui/Menu_k_nearest_neighbors.cpp new file mode 100644 index 00000000..e24865f2 --- /dev/null +++ b/GudhUI/gui/Menu_k_nearest_neighbors.cpp @@ -0,0 +1,59 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "Menu_k_nearest_neighbors.h" + +Menu_k_nearest_neighbors::Menu_k_nearest_neighbors(QMainWindow* parent_) + : parent(parent_) { + setupUi(this); + connectActions(parent_); +} + +void Menu_k_nearest_neighbors::connectActions(QMainWindow* parent) { + QObject::connect(this->pushButtonCompute, + SIGNAL(clicked()), + this, + SLOT(send_compute_k_nearest_neighbors())); + QObject::connect(this->spinBoxK, + SIGNAL(valueChanged(int)), + this, + SLOT(update_k(int))); + QObject::connect(this, + SIGNAL(compute_k_nearest_neighbors(unsigned)), + parent, + SLOT(build_k_nearest_neighbors(unsigned))); +} + +void Menu_k_nearest_neighbors::send_compute_k_nearest_neighbors() { + emit(compute_k_nearest_neighbors((unsigned) spinBoxK->value())); +} + +void Menu_k_nearest_neighbors::accept() { + send_compute_k_nearest_neighbors(); +} + +void Menu_k_nearest_neighbors::update_k(int new_k_value) { + if (checkBoxAutoUpdate->isChecked()) + emit(compute_k_nearest_neighbors((unsigned) spinBoxK->value())); +} + +#include "Menu_k_nearest_neighbors.moc" diff --git a/GudhUI/gui/Menu_k_nearest_neighbors.h b/GudhUI/gui/Menu_k_nearest_neighbors.h new file mode 100644 index 00000000..8088b768 --- /dev/null +++ b/GudhUI/gui/Menu_k_nearest_neighbors.h @@ -0,0 +1,51 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GUI_MENU_K_NEAREST_NEIGHBORS_H_ +#define GUI_MENU_K_NEAREST_NEIGHBORS_H_ + +#include <QMainWindow> +#include "gui/ui_KNearestNeighborsMenu.h" + +class QWidget; + +class Menu_k_nearest_neighbors : public QDialog, public Ui::KNearestNeighborsMenu { + Q_OBJECT + + private: + QMainWindow* parent; + + public: + Menu_k_nearest_neighbors(QMainWindow* parent_); + + void connectActions(QMainWindow* parent); + + public slots: + void send_compute_k_nearest_neighbors(); + void update_k(int k); + void accept(); + + signals: + void compute_k_nearest_neighbors(unsigned k); +}; + +#endif // GUI_MENU_K_NEAREST_NEIGHBORS_H_ diff --git a/GudhUI/gui/Menu_persistence.cpp b/GudhUI/gui/Menu_persistence.cpp new file mode 100644 index 00000000..016c076b --- /dev/null +++ b/GudhUI/gui/Menu_persistence.cpp @@ -0,0 +1,53 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +#include "Menu_persistence.h" + +Menu_persistence::Menu_persistence(QMainWindow* parent_) : parent(parent_) { + setupUi(this); + connectActions(parent_); +} + +void Menu_persistence::connectActions(QMainWindow* parent) { + QObject::connect(this, + SIGNAL(compute_persistence(int, double, int, double)), + parent, + SLOT(compute_persistence(int, double, int, double))); +} + +void Menu_persistence::send_compute_persistence() { + emit(compute_persistence(p_spinBox->value(), threshold_doubleSpinBox->value(), + maxdimension_spinBox->value(), minpersistence_doubleSpinBox->value())); +} + +void Menu_persistence::accept() { + send_compute_persistence(); +} + +// void Menu_persistence::compute_persistence(int p_fied,double threshold,int dim_max,double min_persistence) { +// if(checkBoxAutoUpdate->isChecked()) +// emit(compute_k_nearest_neighbors((unsigned)spinBoxK->value())); +// } + +#include "Menu_persistence.moc" diff --git a/GudhUI/gui/Menu_persistence.h b/GudhUI/gui/Menu_persistence.h new file mode 100644 index 00000000..8c4df158 --- /dev/null +++ b/GudhUI/gui/Menu_persistence.h @@ -0,0 +1,51 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef GUI_MENU_PERSISTENCE_H_ +#define GUI_MENU_PERSISTENCE_H_ + +#include <QMainWindow> +#include "gui/ui_PersistenceMenu.h" + +class QWidget; + +class Menu_persistence : public QDialog, public Ui::PersistenceMenu { + Q_OBJECT + + private: + QMainWindow* parent; + + public: + Menu_persistence(QMainWindow* parent_); + + void connectActions(QMainWindow* parent); + + public slots: + void send_compute_persistence(); + void accept(); + + signals: + void compute_persistence(int p_fied, double threshold, int dim_max, double min_persistence); +}; + +#endif // GUI_MENU_PERSISTENCE_H_ diff --git a/GudhUI/gui/Menu_uniform_neighbors.cpp b/GudhUI/gui/Menu_uniform_neighbors.cpp new file mode 100644 index 00000000..20e4f98f --- /dev/null +++ b/GudhUI/gui/Menu_uniform_neighbors.cpp @@ -0,0 +1,60 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "Menu_uniform_neighbors.h" + +Menu_uniform_neighbors::Menu_uniform_neighbors(QMainWindow* parent_) : + parent(parent_) { + setupUi(this); + connectActions(parent_); +} + +void Menu_uniform_neighbors::connectActions(QMainWindow* parent) { + QObject::connect(this->pushButtonCompute, + SIGNAL(clicked()), + this, + SLOT(send_compute_uniform_neighbors())); + QObject::connect(this->doubleSpinBoxAlpha, + SIGNAL(valueChanged(double)), + this, + SLOT(update_alpha(double))); + QObject::connect(this, + SIGNAL(compute_uniform_neighbors(double)), + parent, + SLOT(build_rips(double))); +} + +void Menu_uniform_neighbors::send_compute_uniform_neighbors() { + emit(compute_uniform_neighbors(doubleSpinBoxAlpha->value())); +} + +void Menu_uniform_neighbors::accept() { + send_compute_uniform_neighbors(); +} + +void Menu_uniform_neighbors::update_alpha(double alpha) { + if (checkBoxAutoUpdate->isChecked()) + emit(compute_uniform_neighbors(doubleSpinBoxAlpha->value())); +} + +#include "Menu_uniform_neighbors.moc" diff --git a/GudhUI/gui/Menu_uniform_neighbors.h b/GudhUI/gui/Menu_uniform_neighbors.h new file mode 100644 index 00000000..0b6f65fe --- /dev/null +++ b/GudhUI/gui/Menu_uniform_neighbors.h @@ -0,0 +1,51 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef GUI_MENU_UNIFORM_NEIGHBORS_H_ +#define GUI_MENU_UNIFORM_NEIGHBORS_H_ + +#include <QMainWindow> +#include "gui/ui_UniformNeighborsMenu.h" + +class Menu_uniform_neighbors : public QDialog, public Ui::UniformMenu { + Q_OBJECT + + private: + QMainWindow* parent; + + public: + Menu_uniform_neighbors(QMainWindow* parent_); + + void connectActions(QMainWindow* parent); + + public slots: + void send_compute_uniform_neighbors(); + void update_alpha(double alpha); + void accept(); + + signals: + void compute_uniform_neighbors(double alpha); +}; + + +#endif // GUI_MENU_UNIFORM_NEIGHBORS_H_ diff --git a/GudhUI/gui/PersistenceMenu.ui b/GudhUI/gui/PersistenceMenu.ui new file mode 100644 index 00000000..29327db2 --- /dev/null +++ b/GudhUI/gui/PersistenceMenu.ui @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PersistenceMenu</class> + <widget class="QDialog" name="PersistenceMenu"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>354</width> + <height>275</height> + </rect> + </property> + <property name="windowTitle"> + <string>Point cloud persistence</string> + </property> + <widget class="QWidget" name=""> + <property name="geometry"> + <rect> + <x>20</x> + <y>23</y> + <width>318</width> + <height>226</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QSpinBox" name="p_spinBox"> + <property name="minimum"> + <number>2</number> + </property> + <property name="value"> + <number>2</number> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Coefficient Z/pZ</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSpinBox" name="maxdimension_spinBox"> + <property name="maximum"> + <number>9999</number> + </property> + <property name="value"> + <number>10</number> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Max dimension</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QDoubleSpinBox" name="threshold_doubleSpinBox"> + <property name="maximum"> + <double>9999.000000000000000</double> + </property> + <property name="value"> + <double>1.000000000000000</double> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Max Rips offset</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QDoubleSpinBox" name="minpersistence_doubleSpinBox"/> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Minimum Persistence</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>PersistenceMenu</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>PersistenceMenu</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/GudhUI/gui/UniformNeighborsMenu.ui b/GudhUI/gui/UniformNeighborsMenu.ui new file mode 100644 index 00000000..f8ef7a24 --- /dev/null +++ b/GudhUI/gui/UniformNeighborsMenu.ui @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>UniformMenu</class> + <widget class="QDialog" name="UniformMenu"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>292</width> + <height>209</height> + </rect> + </property> + <property name="windowTitle"> + <string>Uniform neighbors (Rips)</string> + </property> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>50</x> + <y>160</y> + <width>171</width> + <height>32</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QWidget" name="formLayoutWidget"> + <property name="geometry"> + <rect> + <x>30</x> + <y>10</y> + <width>262</width> + <height>84</height> + </rect> + </property> + <layout class="QFormLayout" name="formLayout_2"> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::AllNonFixedFieldsGrow</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>alpha</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Metric</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="comboBoxMetric"> + <item> + <property name="text"> + <string>Ambient</string> + </property> + </item> + <item> + <property name="text"> + <string>Reduced Space</string> + </property> + </item> + </widget> + </item> + <item row="0" column="1"> + <widget class="QDoubleSpinBox" name="doubleSpinBoxAlpha"> + <property name="decimals"> + <number>3</number> + </property> + <property name="maximum"> + <double>100000000.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="gridLayoutWidget"> + <property name="geometry"> + <rect> + <x>30</x> + <y>110</y> + <width>250</width> + <height>40</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="1"> + <widget class="QPushButton" name="pushButtonCompute"> + <property name="text"> + <string>Compute</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="checkBoxAutoUpdate"> + <property name="text"> + <string>auto update</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>UniformMenu</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>UniformMenu</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/GudhUI/gui/gudhui.cpp b/GudhUI/gui/gudhui.cpp new file mode 100644 index 00000000..276c4a5f --- /dev/null +++ b/GudhUI/gui/gudhui.cpp @@ -0,0 +1,38 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "MainWindow.h" +#include <QApplication> +#include <CGAL/Qt/resources.h> + +int main(int argc, char** argv) { + QApplication application(argc, argv); + application.setOrganizationDomain("inria.fr"); + application.setOrganizationName("INRIA"); + application.setApplicationName("GudhUI"); + + MainWindow mw; + application.setQuitOnLastWindowClosed(false); + mw.show(); + return application.exec(); +} diff --git a/GudhUI/gui/main_window.ui b/GudhUI/gui/main_window.ui new file mode 100644 index 00000000..312480b6 --- /dev/null +++ b/GudhUI/gui/main_window.ui @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>861</width> + <height>880</height> + </rect> + </property> + <property name="windowTitle"> + <string>GudhUI</string> + </property> + <property name="tabShape"> + <enum>QTabWidget::Rounded</enum> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="Viewer" name="viewer" native="true"> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>861</width> + <height>34</height> + </rect> + </property> + <widget class="QMenu" name="menuFile"> + <property name="title"> + <string>File</string> + </property> + <addaction name="actionLoad_points"/> + <addaction name="actionLoad_complex"/> + <addaction name="actionSave_points"/> + <addaction name="actionSave_complex"/> + </widget> + <widget class="QMenu" name="menuPoints"> + <property name="title"> + <string>Points</string> + </property> + <addaction name="actionNoise"/> + </widget> + <widget class="QMenu" name="menuGraph"> + <property name="title"> + <string>Graph</string> + </property> + <addaction name="actionK_nearest_neighbors_graph"/> + <addaction name="actionUniform_proximity_graph"/> + <addaction name="actionShow_graph_stats"/> + </widget> + <widget class="QMenu" name="menuComplex"> + <property name="title"> + <string>Complex</string> + </property> + <addaction name="actionContract_edges"/> + <addaction name="actionCollapse_vertices"/> + <addaction name="actionCollapse_edges"/> + <addaction name="actionShow_complex_stats"/> + <addaction name="actionShow_complex_dimension"/> + </widget> + <widget class="QMenu" name="menuView"> + <property name="title"> + <string>View</string> + </property> + <addaction name="actionPoints"/> + <addaction name="actionEdges"/> + <addaction name="actionTriangles"/> + <addaction name="actionChange_projection"/> + </widget> + <widget class="QMenu" name="menuTopology"> + <property name="title"> + <string>Topology</string> + </property> + <addaction name="actionEuler_characteristic"/> + <addaction name="actionShow_homology_group"/> + <addaction name="actionPersistence"/> + <addaction name="actionEstimate_topological_changes"/> + <addaction name="actionIs_manifold"/> + </widget> + <addaction name="menuFile"/> + <addaction name="menuPoints"/> + <addaction name="menuGraph"/> + <addaction name="menuComplex"/> + <addaction name="menuTopology"/> + <addaction name="menuView"/> + </widget> + <widget class="QStatusBar" name="statusbar"/> + <action name="actionLoad_points"> + <property name="text"> + <string>Load points</string> + </property> + </action> + <action name="actionLoad_complex"> + <property name="text"> + <string>Load complex</string> + </property> + </action> + <action name="actionSave_points"> + <property name="text"> + <string>Save points</string> + </property> + </action> + <action name="actionSave_complex"> + <property name="text"> + <string>Save complex</string> + </property> + </action> + <action name="actionNoise"> + <property name="text"> + <string>Noise</string> + </property> + </action> + <action name="actionLloyd"> + <property name="text"> + <string>Lloyd</string> + </property> + </action> + <action name="actionUniform_proximity_graph"> + <property name="text"> + <string>Uniform proximity graph</string> + </property> + </action> + <action name="actionK_nearest_neighbors_graph"> + <property name="text"> + <string>k-nearest neighbors graph</string> + </property> + </action> + <action name="actionShow_graph_stats"> + <property name="text"> + <string>Show graph stats</string> + </property> + </action> + <action name="actionBuild_complex_from_graph"> + <property name="text"> + <string>Graph expansion</string> + </property> + </action> + <action name="actionBuild_Delaunay_from_points"> + <property name="text"> + <string>Delaunay from points</string> + </property> + </action> + <action name="actionContract_edges"> + <property name="text"> + <string>Contract edges</string> + </property> + </action> + <action name="actionCollapse_vertices"> + <property name="text"> + <string>Collapse vertices</string> + </property> + </action> + <action name="actionCollapse_edges"> + <property name="text"> + <string>Collapse edges</string> + </property> + </action> + <action name="actionPoints"> + <property name="text"> + <string>Points</string> + </property> + </action> + <action name="actionEdges"> + <property name="text"> + <string>Edges</string> + </property> + </action> + <action name="actionTriangles"> + <property name="text"> + <string>Triangles</string> + </property> + </action> + <action name="actionChange_projection"> + <property name="text"> + <string>Change projection</string> + </property> + </action> + <action name="actionShow_complex_stats"> + <property name="text"> + <string>Show complex stats</string> + </property> + </action> + <action name="actionShow_complex_dimension"> + <property name="text"> + <string>Show complex dimension</string> + </property> + </action> + <action name="actionShow_homology_group"> + <property name="text"> + <string>Homology groups</string> + </property> + </action> + <action name="actionPersistence"> + <property name="text"> + <string>Point cloud persistence</string> + </property> + </action> + <action name="actionEuler_characteristic"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Euler characteristic</string> + </property> + <property name="visible"> + <bool>true</bool> + </property> + </action> + <action name="actionHomology_groups"> + <property name="text"> + <string>Homology groups</string> + </property> + </action> + <action name="actionEstimate_topological_changes"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Rips critical points approximation</string> + </property> + <property name="visible"> + <bool>false</bool> + </property> + </action> + <action name="actionIs_manifold"> + <property name="text"> + <string>Is manifold</string> + </property> + </action> + </widget> + <customwidgets> + <customwidget> + <class>Viewer</class> + <extends>QWidget</extends> + <header>view/Viewer.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> |