112 lines
3.2 KiB
C++
112 lines
3.2 KiB
C++
|
#include "ImagePlaneAtiInterpDialog.h"
|
|||
|
#include "ui_ImagePlaneAtiInterpDialog.h"
|
|||
|
#include <QFileDialog>
|
|||
|
#include <QMessageBox>
|
|||
|
#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()));
|
|||
|
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>"));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void ImagePlaneAtiInterpDialog::onpushButtonRefRangeDEMSelect_clicked()
|
|||
|
{
|
|||
|
QString fileNames = QFileDialog::getOpenFileName(
|
|||
|
this, // ??????
|
|||
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD>ο<EFBFBD>DEM"), // ????
|
|||
|
QString(), // ???<3F><>??
|
|||
|
tr(ENVI_FILE_FORMAT_FILTER) // ?????????
|
|||
|
);
|
|||
|
// ??????????????
|
|||
|
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()
|
|||
|
{
|
|||
|
QString fileNames = QFileDialog::getOpenFileName(
|
|||
|
this, // ??????
|
|||
|
tr(u8"<EFBFBD><EFBFBD>ʾ"), // ????
|
|||
|
QString(), // ???<3F><>??
|
|||
|
tr(ENVI_FILE_FORMAT_FILTER) // ?????????
|
|||
|
);
|
|||
|
// ??????????????
|
|||
|
if (!fileNames.isEmpty()) {
|
|||
|
QString message = "????????<3F><>?\n";
|
|||
|
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();
|
|||
|
|
|||
|
if (imageNet0Path.isEmpty() || refRangeDEMPath.isEmpty() || imageLLAPath.isEmpty()) {
|
|||
|
QMessageBox::warning(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|||
|
return;
|
|||
|
}
|
|||
|
else {
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
if (OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
|||
|
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath);
|
|||
|
|
|||
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void ImagePlaneAtiInterpDialog::onbuttonBoxRejected()
|
|||
|
{
|
|||
|
this->close();
|
|||
|
}
|
|||
|
|
|||
|
|