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"选择成像粗平面文件"),
|
||
QString(),
|
||
tr(ENVI_FILE_FORMAT_FILTER)
|
||
);
|
||
|
||
if (!fileNames.isEmpty()) {
|
||
QString message = "选中文件\n";
|
||
this->ui->lineEditImageNet0Path->setText(fileNames);
|
||
}
|
||
else {
|
||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||
}
|
||
}
|
||
|
||
void ImagePlaneAtiInterpDialog::onpushButtonRefRangeDEMSelect_clicked()
|
||
{
|
||
QString fileNames = QFileDialog::getOpenFileName(
|
||
this, // ??????
|
||
tr(u8"选择参考DEM"), // ????
|
||
QString(), // ???·??
|
||
tr(ENVI_FILE_FORMAT_FILTER) // ?????????
|
||
);
|
||
// ??????????????
|
||
if (!fileNames.isEmpty()) {
|
||
QString message = "选中文件\n";
|
||
this->ui->lineEditRefRangeDEMPath->setText(fileNames);
|
||
}
|
||
else {
|
||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||
}
|
||
}
|
||
|
||
void ImagePlaneAtiInterpDialog::onpushButtonImageLLASelect_clicked()
|
||
{
|
||
QString fileNames = QFileDialog::getOpenFileName(
|
||
this, // ??????
|
||
tr(u8"提示"), // ????
|
||
QString(), // ???·??
|
||
tr(ENVI_FILE_FORMAT_FILTER) // ?????????
|
||
);
|
||
// ??????????????
|
||
if (!fileNames.isEmpty()) {
|
||
QString message = "????????У?\n";
|
||
this->ui->lineEditImageLLAPath->setText(fileNames);
|
||
}
|
||
else {
|
||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||
}
|
||
}
|
||
|
||
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"提示"), tr(u8"没有选中文件"));
|
||
return;
|
||
}
|
||
else {
|
||
|
||
}
|
||
|
||
if (OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
||
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath);
|
||
|
||
QMessageBox::information(nullptr, u8"提示", u8"completed!!");
|
||
return;
|
||
|
||
}
|
||
else {
|
||
QMessageBox::warning(nullptr,u8"警告",u8"DEM影像小于成像粗平面采样要求");
|
||
return;
|
||
}
|
||
}
|
||
|
||
void ImagePlaneAtiInterpDialog::onbuttonBoxRejected()
|
||
{
|
||
this->close();
|
||
}
|
||
|
||
|