2025-04-06 06:29:35 +00:00
|
|
|
|
#include "ImagePlaneAtiInterpDialog.h"
|
|
|
|
|
#include "ui_ImagePlaneAtiInterpDialog.h"
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include <QMessageBox>
|
2025-04-07 15:15:18 +00:00
|
|
|
|
#include <QCheckBox>
|
2025-04-06 06:29:35 +00:00
|
|
|
|
#include "BaseConstVariable.h"
|
|
|
|
|
#include "ImageNetOperator.h"
|
|
|
|
|
|
|
|
|
|
ImagePlaneAtiInterpDialog::ImagePlaneAtiInterpDialog(QWidget *parent)
|
|
|
|
|
: QDialog(parent)
|
|
|
|
|
, ui(new Ui::ImagePlaneAtiInterpDialogClass)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
connect(ui->pushButtonImageLLASelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageLLASelect_clicked()));
|
|
|
|
|
connect(ui->pushButtonImageNet0Select, SIGNAL(clicked()), this, SLOT(onpushButtonImageNet0Select_clicked()));
|
|
|
|
|
connect(ui->pushButtonRefRangeDEMSelect, SIGNAL(clicked()), this, SLOT(onpushButtonRefRangeDEMSelect_clicked()));
|
2025-04-06 08:52:33 +00:00
|
|
|
|
connect(ui->pushButtonEchoGPSPointDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoGPSPointSelect_clicked()));
|
2025-04-06 06:29:35 +00:00
|
|
|
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBoxAccepted()));
|
|
|
|
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBoxRejected()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImagePlaneAtiInterpDialog::~ImagePlaneAtiInterpDialog()
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
void ImagePlaneAtiInterpDialog::onpushButtonImageNet0Select_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
|
|
|
this,
|
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditImageNet0Path->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-06 08:48:37 +00:00
|
|
|
|
void ImagePlaneAtiInterpDialog::onpushButtonEchoGPSPointSelect_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
|
|
|
this, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
QString(), // Ĭ<><C4AC>·<EFBFBD><C2B7>
|
|
|
|
|
tr(u8"GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>(*.gpspos.data);;All Files(*.*)") // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
);
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>У<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditGPSPointsPath->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-06 06:29:35 +00:00
|
|
|
|
void ImagePlaneAtiInterpDialog::onpushButtonRefRangeDEMSelect_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
2025-04-07 16:13:36 +00:00
|
|
|
|
this,
|
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD>ο<EFBFBD>DEM"),
|
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
2025-04-06 06:29:35 +00:00
|
|
|
|
);
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditRefRangeDEMPath->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ImagePlaneAtiInterpDialog::onpushButtonImageLLASelect_clicked()
|
|
|
|
|
{
|
2025-04-06 17:27:57 +00:00
|
|
|
|
QString fileNames = QFileDialog::getSaveFileName(
|
2025-04-07 16:13:36 +00:00
|
|
|
|
this,
|
|
|
|
|
tr(u8"<EFBFBD><EFBFBD>ʾ"),
|
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
2025-04-06 06:29:35 +00:00
|
|
|
|
);
|
2025-04-07 16:13:36 +00:00
|
|
|
|
|
2025-04-06 06:29:35 +00:00
|
|
|
|
if (!fileNames.isEmpty()) {
|
2025-04-06 17:27:57 +00:00
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
2025-04-06 06:29:35 +00:00
|
|
|
|
this->ui->lineEditImageLLAPath->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ImagePlaneAtiInterpDialog::onbuttonBoxAccepted()
|
|
|
|
|
{
|
|
|
|
|
QString imageNet0Path = this->ui->lineEditImageNet0Path->text().trimmed();
|
|
|
|
|
QString refRangeDEMPath = this->ui->lineEditRefRangeDEMPath->text().trimmed();
|
|
|
|
|
QString imageLLAPath = this->ui->lineEditImageLLAPath->text().trimmed();
|
2025-04-06 08:48:37 +00:00
|
|
|
|
QString echoGPSDataPath = this->ui->lineEditGPSPointsPath->text().trimmed();
|
|
|
|
|
if (imageNet0Path.isEmpty() || refRangeDEMPath.isEmpty() || imageLLAPath.isEmpty()||echoGPSDataPath.isEmpty()) {
|
2025-04-06 06:29:35 +00:00
|
|
|
|
QMessageBox::warning(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-06 08:48:37 +00:00
|
|
|
|
if (GPSPointsNumberEqualCheck(imageNet0Path, echoGPSDataPath)) {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::warning(nullptr, u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", u8"<EFBFBD>ز<EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2025-04-07 15:15:18 +00:00
|
|
|
|
|
|
|
|
|
bool checkflag= this->ui->checkBoxOverLap->isChecked();
|
2025-04-07 16:13:36 +00:00
|
|
|
|
if (checkflag) {
|
|
|
|
|
InterploateClipAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath, echoGPSDataPath);
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
2025-04-06 06:29:35 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else {
|
2025-04-07 16:13:36 +00:00
|
|
|
|
if (OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
|
|
|
|
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath, echoGPSDataPath);
|
|
|
|
|
|
|
|
|
|
QMessageBox::information(nullptr, u8"<EFBFBD><EFBFBD>ʾ", u8"completed!!");
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::warning(nullptr, u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", u8"DEMӰ<EFBFBD><EFBFBD>С<EFBFBD>ڳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2025-04-06 06:29:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ImagePlaneAtiInterpDialog::onbuttonBoxRejected()
|
|
|
|
|
{
|
|
|
|
|
this->close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|