| 547 | } |
| 548 | |
| 549 | void ImageTab::ShowImage() { |
| 550 | QItemSelectionModel* select = table_widget_->selectionModel(); |
| 551 | |
| 552 | if (!select->hasSelection()) { |
| 553 | QMessageBox::critical(this, "", tr("No image selected.")); |
| 554 | return; |
| 555 | } |
| 556 | |
| 557 | if (select->selectedRows().size() > 1) { |
| 558 | QMessageBox::critical(this, "", tr("Only one image may be selected.")); |
| 559 | return; |
| 560 | } |
| 561 | |
| 562 | const auto& image = images_[select->selectedRows().begin()->row()]; |
| 563 | |
| 564 | const auto keypoints = database_->ReadKeypoints(image.ImageId()); |
| 565 | const std::vector<char> tri_mask(keypoints.size(), false); |
| 566 | |
| 567 | image_viewer_widget_->ReadAndShowWithKeypoints( |
| 568 | *options_->image_path / image.Name(), keypoints, tri_mask); |
| 569 | image_viewer_widget_->setWindowTitle( |
| 570 | QString::fromStdString("Image " + std::to_string(image.ImageId()))); |
| 571 | } |
| 572 | |
| 573 | void ImageTab::ShowMatches() { |
| 574 | QItemSelectionModel* select = table_widget_->selectionModel(); |
nothing calls this directly
no test coverage detected