1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602
|
#include "ui_Kinetic_surface_reconstruction_plugin.h"
#include "Color_map.h"
#include "Color_ramp.h"
#include "id_printing.h"
#include "Messages_interface.h"
#include "Scene.h"
#include "Scene_polygon_soup_item.h"
#include "Scene_surface_mesh_item.h"
#include "Scene_points_with_normal_item.h"
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/Dynamic_property_map.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <CGAL/Polygon_mesh_processing/repair_polygon_soup.h>
#include <CGAL/Kinetic_surface_reconstruction_3.h>
#include <QAbstractItemView>
#include <QAction>
#include <QApplication>
#include <QColor>
#include <QColorDialog>
#include <QInputDialog>
#include <QMainWindow>
#include <QMessageBox>
#include <QSlider>
#include <QObject>
#include <QPalette>
#include <QStyleFactory>
#include <boost/algorithm/clamp.hpp>
#include <boost/range/value_type.hpp>
#include <type_traits>
#include <unordered_map>
#include <vector>
#include <typeinfo>
using namespace CGAL::Three;
using FT = typename Kernel::FT;
using Point_3 = typename Kernel::Point_3;
using Vector_3 = typename Kernel::Vector_3;
using Segment_3 = typename Kernel::Segment_3;
using Point_map = typename Point_set::Point_map;
using Normal_map = typename Point_set::Vector_map;
using KSR = CGAL::Kinetic_surface_reconstruction_3<CGAL::Epick, Point_set, Point_map, Normal_map>;
Viewer_interface* (&getActiveViewer)() = Three::activeViewer;
class DockWidget
: public QDockWidget,
public Ui::KineticSurfaceReconstructionWidget
{
public:
DockWidget(const QString& name, QWidget* parent)
: QDockWidget(name, parent)
{
setupUi(this);
}
};
class Kinetic_surface_reconstruction_plugin
: public QObject,
public CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
private:
QAction* actionKineticSurfaceReconstruction;
DockWidget* dock_widget;
Scene_points_with_normal_item* m_pwn_item = nullptr;
// A dock widget allows switching between items which makes managing parameters and intermediate results a mess.
// I could create a map from item to KSR and also reference intermediate results (in case they are recalculated with changed parameters)?
KSR *m_ksr = nullptr;
bool m_known_file = false;
public:
virtual ~Kinetic_surface_reconstruction_plugin() {
if (m_ksr)
delete m_ksr;
m_ksr = nullptr;
}
bool applicable(QAction*) const override
{
Scene_item* item = scene->item(scene->mainSelectionIndex());
if (!item)
return false;
Scene_points_with_normal_item* pwn_item = qobject_cast<Scene_points_with_normal_item*>(item);
if (pwn_item != nullptr && pwn_item->has_normals())
return true;
else
return false;
}
QList<QAction*> actions() const override
{
return QList<QAction*>() << actionKineticSurfaceReconstruction;
}
void init(QMainWindow* mw,
Scene_interface* sc,
Messages_interface*) override
{
this->scene = sc;
this->mw = mw;
// Main action
actionKineticSurfaceReconstruction = new QAction(QString("Kinetic Surface Reconstruction"), mw);
actionKineticSurfaceReconstruction->setObjectName("actionKineticSurfaceReconstruction");
connect(actionKineticSurfaceReconstruction, SIGNAL(triggered()),
this, SLOT(openDialog()));
Scene* scene_item = static_cast<Scene*>(scene);
connect(scene_item, SIGNAL(itemIndexSelected(int)),
this, SLOT(onItemIndexSelected(int)));
// Dock Widget
dock_widget = new DockWidget("Kinetic Surface Reconstruction", mw);
addDockWidget(dock_widget);
dock_widget->setVisible(false);
//dock_widget->setEnabled(false);
connect(dock_widget->sdRunButton, SIGNAL(clicked(bool)), this, SLOT(run_detection()));
connect(dock_widget->partRunButton, SIGNAL(clicked(bool)), this, SLOT(run_partition()));
connect(dock_widget->recRunButton, SIGNAL(clicked(bool)), this, SLOT(run_reconstruction()));
connect(dock_widget->partSubdivisionCheck, SIGNAL(stateChanged(int)), this, SLOT(onSubdivisionStateChanged(int)));
connect(dock_widget, SIGNAL(visibilityChanged(bool)), this, SLOT(onVisibilityChanged(bool)));
}
private Q_SLOTS:
void openDialog()
{
if (!dock_widget->isVisible())
dock_widget->show();
dock_widget->raise();
}
void closure() override
{
dock_widget->hide();
if (m_ksr) {
delete m_ksr;
m_ksr = nullptr;
}
}
void onItemIndexSelected(int item_index) {
if (!dock_widget->isVisible())
return;
Scene_points_with_normal_item *selection = qobject_cast<Scene_points_with_normal_item*>(scene->item(item_index));
if (selection == nullptr) {
// Keep old reference if no new point cloud has been selected.
if (m_pwn_item == nullptr)
dock_widget->setEnabled(false);
return;
}
if (m_pwn_item == selection) {
// The point cloud may have normals added after loading.
if (m_pwn_item->has_normals()) {
enable_detection(true);
enable_regularization(true);
}
return;
}
QObject* scene_obj = dynamic_cast<QObject*>(scene);
if (m_pwn_item) {
disconnect(m_pwn_item, nullptr, this, SLOT(onItemChanged()));
if (scene_obj)
disconnect(scene_obj, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(onItemDestroyed(CGAL::Three::Scene_item*)));
}
m_pwn_item = selection;
connect(m_pwn_item, SIGNAL(itemChanged()), this, SLOT(onItemChanged()));
if (scene_obj)
connect(scene_obj, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(onItemDestroyed(CGAL::Three::Scene_item*)));
if (m_ksr) {
delete m_ksr;
m_ksr = nullptr;
}
dock_widget->setEnabled(true);
if (m_pwn_item && m_pwn_item->has_normals()) {
enable_detection(true);
enable_regularization(true);
}
else {
enable_detection(false);
enable_regularization(false);
}
enable_partition(false);
enable_reconstruction(false);
prefill_parameters();
}
void onItemChanged() {
// Enable detection if the point set item has normals now
assert(m_pwn_item);
if (m_pwn_item->has_normals())
enable_detection(true);
}
void onItemDestroyed(CGAL::Three::Scene_item* item) {
if (m_pwn_item == item) {
m_pwn_item = nullptr;
if (m_ksr) {
delete m_ksr;
m_ksr = nullptr;
}
enable_detection(false);
enable_regularization(false);
enable_partition(false);
enable_reconstruction(false);
dock_widget->hide();
}
}
void run_detection() {
assert(m_pwn_item);
if (!m_pwn_item->has_normals())
return;
m_ksr->detect_planar_shapes(CGAL::parameters::maximum_distance(dock_widget->sdMaxDistanceBox->value())
.maximum_angle(dock_widget->sdMaxAngleBox->value())
.k_neighbors(dock_widget->sdkNeighborsBox->value())
.minimum_region_size(dock_widget->sdMinRegionSizeBox->value())
.regularize_parallelism(dock_widget->srParallelismCheck->isChecked())
.regularize_coplanarity(dock_widget->srCoplanarityCheck->isChecked())
.regularize_orthogonality(dock_widget->srOrthogonalityCheck->isChecked())
.regularize_axis_symmetry(false)
.angle_tolerance(dock_widget->srAngleToleranceBox->value())
.maximum_offset(dock_widget->srMaxOffsetBox->value()));
CGAL::Three::Three::information(QString::number(m_ksr->detected_planar_shapes().size()) + " regularized planar shapes detected");
if (m_ksr->detected_planar_shapes().empty()) {
enable_partition(false);
enable_reconstruction(false);
return;
}
const std::vector<CGAL::Epick::Plane_3> &planes = m_ksr->detected_planar_shapes();
const std::vector<std::vector<std::size_t>> ®ions = m_ksr->detected_planar_shape_indices();
SMesh* mesh = new SMesh();
std::vector<std::vector<CGAL::Epick::Point_3> > polys;
for (std::size_t i = 0; i < regions.size(); i++)
convex_hull(regions[i], planes[i], polys);
for (std::size_t i = 0; i < polys.size(); i++) {
std::vector<typename SMesh::Vertex_index> vtx(polys[i].size());
for (std::size_t j = 0; j < polys[i].size(); j++)
vtx[j] = mesh->add_vertex(polys[i][j]);
mesh->add_face(vtx);
}
Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(mesh);
new_item->setName(tr("%1 convex shapes d%2 a%3").arg(m_pwn_item->name()).arg(dock_widget->sdMaxDistanceBox->value()).arg(dock_widget->sdMaxAngleBox->value()));
new_item->setColor(Qt::darkCyan);
scene->addItem(new_item);
if (!m_known_file) {
std::size_t max_depth = m_ksr->estimate_max_subdivision_depth();
dock_widget->partReorientCheck->setChecked(true);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(max_depth);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(2);
}
enable_partition(true);
enable_reconstruction(false);
}
void run_partition() {
assert(m_pwn_item);
assert(m_ksr);
assert(!m_ksr->detected_planar_shapes().empty());
m_ksr->initialize_partition(CGAL::parameters::reorient_bbox(dock_widget->partReorientCheck->checkState() == Qt::Checked)
.max_octree_depth(dock_widget->partSubdivisionCheck->checkState() == Qt::Checked ? dock_widget->partMaxDepthBox->value() : 0)
.max_octree_node_size(dock_widget->partPolygonsPerNodeBox->value()));
m_ksr->partition(dock_widget->partKBox->value());
CGAL::Three::Three::information(QString::number(m_ksr->kinetic_partition().number_of_volumes()) + " volumes in partition");
if (m_ksr->kinetic_partition().number_of_volumes() != 0)
enable_reconstruction(true);
else std::cout << "kinetic partition is empty!" << std::endl;
}
void run_reconstruction() {
assert(m_pwn_item);
assert(m_ksr);
assert(m_ksr->kinetic_partition().number_of_volumes() != 0);
std::vector<Point_3> vtx;
std::vector<std::vector<std::size_t> > polylist;
std::map<typename KSR::KSP::Face_support, bool> external_nodes;
if (dock_widget->recGroundCheck->checkState() == Qt::Checked) {
external_nodes[KSR::KSP::Face_support::ZMIN] = false;
m_ksr->reconstruct_with_ground(dock_widget->recLambdaBox->value(), std::back_inserter(vtx), std::back_inserter(polylist));
}
else {
m_ksr->reconstruct(dock_widget->recLambdaBox->value(), external_nodes, std::back_inserter(vtx), std::back_inserter(polylist));
}
if (!polylist.empty())
{
// Add polygon mesh to scene
Scene_polygon_soup_item* new_item = new Scene_polygon_soup_item();
new_item->load(vtx, polylist);
new_item->setName(tr("%1 ksr lambda %2").arg(m_pwn_item->name()).arg(dock_widget->recLambdaBox->value()));
new_item->setColor(Qt::darkGray);
new_item->invalidateOpenGLBuffers();
scene->addItem(new_item);
}
}
void onSubdivisionStateChanged(int state) {
dock_widget->partMaxDepthBox->setEnabled(state != 0);
dock_widget->partPolygonsPerNodeBox->setEnabled(state != 0);
}
void onVisibilityChanged(bool) {
if (!dock_widget->isVisible())
return;
onItemIndexSelected(scene->mainSelectionIndex());
}
private:
void convex_hull(const std::vector<std::size_t>& region, const CGAL::Epick::Plane_3& plane, std::vector<std::vector<CGAL::Epick::Point_3> > &polys) {
if (m_pwn_item == nullptr)
return;
Point_set* points = m_pwn_item->point_set();
std::vector<CGAL::Epick::Point_2> pts2d;
pts2d.reserve(region.size());
for (const std::size_t idx : region) {
CGAL_assertion(idx < points->size());
const auto& p = points->point(idx);
const auto q = plane.projection(p);
const auto point = plane.to_2d(q);
pts2d.push_back(point);
}
CGAL_assertion(pts2d.size() == region.size());
std::vector<CGAL::Epick::Point_2> ch;
CGAL::convex_hull_2(pts2d.begin(), pts2d.end(), std::back_inserter(ch));
std::vector<CGAL::Epick::Point_3> polygon;
for (const auto& p : ch) {
const auto point = plane.to_3d(p);
polygon.push_back(point);
}
polys.push_back(polygon);
}
void enable_detection(bool enable) {
dock_widget->shapeDetectionGroup->setEnabled(enable);
dock_widget->sdRunButton->setEnabled(enable);
}
void enable_regularization(bool enable) {
dock_widget->shapeRegularizationGroup->setEnabled(enable);
}
void enable_partition(bool enable) {
dock_widget->kineticPartitionGroup->setEnabled(enable);
dock_widget->partRunButton->setEnabled(enable);
}
void enable_reconstruction(bool enable) {
dock_widget->kineticReconstructionGroup->setEnabled(enable);
dock_widget->recRunButton->setEnabled(enable);
}
void prefill_parameters() {
if (m_pwn_item == nullptr)
return;
std::string filename = m_pwn_item->name().toStdString();
m_known_file = true;
if (m_ksr) {
delete m_ksr;
m_ksr = nullptr;
}
Point_set* points = m_pwn_item->point_set();
m_ksr = new KSR(*points);
if (filename == "foam_box" || filename == "foam_box_new") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.05);
dock_widget->sdMaxAngleBox->setValue(15);
dock_widget->sdMinRegionSizeBox->setValue(250);
dock_widget->sdkNeighborsBox->setValue(12);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(false);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(10);
dock_widget->srMaxOffsetBox->setValue(0.01);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(2);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.7);
}
else if (filename == "lans") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.15);
dock_widget->sdMaxAngleBox->setValue(20);
dock_widget->sdMinRegionSizeBox->setValue(300);
dock_widget->sdkNeighborsBox->setValue(12);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(false);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(8);
dock_widget->srMaxOffsetBox->setValue(0.08);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(2);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.7);
}
else if (filename == "building_c_1M") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(1.1);
dock_widget->sdMaxAngleBox->setValue(26);
dock_widget->sdMinRegionSizeBox->setValue(500);
dock_widget->sdkNeighborsBox->setValue(15);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(false);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(3);
dock_widget->srMaxOffsetBox->setValue(0.5);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(2);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(true);
dock_widget->recLambdaBox->setValue(0.77);
}
else if (filename == "dragon") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.7);
dock_widget->sdMaxAngleBox->setValue(26);
dock_widget->sdMinRegionSizeBox->setValue(150);
dock_widget->sdkNeighborsBox->setValue(10);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(false);
dock_widget->srOrthogonalityCheck->setChecked(false);
dock_widget->srCoplanarityCheck->setChecked(false);
dock_widget->srAngleToleranceBox->setValue(0);
dock_widget->srMaxOffsetBox->setValue(0);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(1);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.75);
}
else if (filename == "full_thing_pds_1M") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.3);
dock_widget->sdMaxAngleBox->setValue(36);
dock_widget->sdMinRegionSizeBox->setValue(30);
dock_widget->sdkNeighborsBox->setValue(12);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(false);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(3);
dock_widget->srMaxOffsetBox->setValue(0.05);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(3);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.5);
}
else if (filename == "hilbert_cube2_pds_100k") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.3);
dock_widget->sdMaxAngleBox->setValue(10);
dock_widget->sdMinRegionSizeBox->setValue(10);
dock_widget->sdkNeighborsBox->setValue(12);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(true);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(5);
dock_widget->srMaxOffsetBox->setValue(0.03);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(4);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.5);
}
else if (filename == "Meetingroom_3M") {
// Shape detection parameters
dock_widget->sdMaxDistanceBox->setValue(0.03);
dock_widget->sdMaxAngleBox->setValue(19);
dock_widget->sdMinRegionSizeBox->setValue(100);
dock_widget->sdkNeighborsBox->setValue(15);
// Shape regularization parameters
dock_widget->srParallelismCheck->setChecked(true);
dock_widget->srOrthogonalityCheck->setChecked(true);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srAngleToleranceBox->setValue(10);
dock_widget->srMaxOffsetBox->setValue(0.03);
// Partition parameters
dock_widget->partReorientCheck->setChecked(false);
dock_widget->partSubdivisionCheck->setChecked(true);
dock_widget->partMaxDepthBox->setValue(3);
dock_widget->partPolygonsPerNodeBox->setValue(40);
dock_widget->partKBox->setValue(3);
// Reconstruction parameters
dock_widget->recGroundCheck->setChecked(false);
dock_widget->recLambdaBox->setValue(0.5);
}
else {
m_known_file = false;
FT max_distance, max_angle;
std::size_t min_region_size;
m_ksr->estimate_detection_parameters(max_distance, max_angle, min_region_size);
dock_widget->sdMaxDistanceBox->setValue(max_distance);
dock_widget->sdMaxAngleBox->setValue(max_angle);
dock_widget->sdMinRegionSizeBox->setValue(min_region_size);
dock_widget->sdkNeighborsBox->setValue(12);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srMaxOffsetBox->setValue(max_distance * 0.5);
}
}
};
#include "Kinetic_surface_reconstruction_plugin.moc"
|