2025-04-08 02:18:00 +00:00
|
|
|
|
#include "QSARSimulationComplexEchoDataDialog.h"
|
|
|
|
|
#include "ui_QSARSimulationComplexEchoDataDialog.h"
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
#include "BaseConstVariable.h"
|
|
|
|
|
#include "BaseTool.h"
|
|
|
|
|
#include "ImageNetOperator.h"
|
|
|
|
|
#include <QDebug>
|
2025-04-11 09:39:55 +00:00
|
|
|
|
#include "FileOperator.h"
|
|
|
|
|
#include "ImageOperatorBase.h"
|
2025-04-08 02:18:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QSARSimulationComplexEchoDataDialog::QSARSimulationComplexEchoDataDialog(QWidget *parent)
|
|
|
|
|
: QDialog(parent)
|
|
|
|
|
, ui(new Ui::QSARSimulationComplexEchoDataDialogClass)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui->pushButtonEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoDataSelect_clicked()));
|
|
|
|
|
connect(ui->pushButtonLookTableSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLookTableSelect_clicked()));
|
|
|
|
|
connect(ui->pushButtonL1AEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1AEchoDataSelect_clicked()));
|
|
|
|
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
|
|
|
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSARSimulationComplexEchoDataDialog::~QSARSimulationComplexEchoDataDialog()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonEchoDataSelect_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
|
|
|
this, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-04-11 09:39:55 +00:00
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), // <20><><EFBFBD><EFBFBD>
|
2025-04-08 02:18:00 +00:00
|
|
|
|
QString(), // Ĭ<><C4AC>·<EFBFBD><C2B7>
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER) // <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";
|
2025-04-08 04:06:27 +00:00
|
|
|
|
this->ui->lineEditEchoDataPath->setText(fileNames);
|
2025-04-08 02:18:00 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonLookTableSelect_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
|
|
|
this, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-04-09 07:06:06 +00:00
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), // <20><><EFBFBD><EFBFBD>
|
2025-04-08 02:18:00 +00:00
|
|
|
|
QString(), // Ĭ<><C4AC>·<EFBFBD><C2B7>
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER) // <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";
|
2025-04-08 04:06:27 +00:00
|
|
|
|
this->ui->lineEditLookTablePath->setText(fileNames);
|
2025-04-08 02:18:00 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonL1AEchoDataSelect_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getSaveFileName(
|
|
|
|
|
this, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-04-11 09:39:55 +00:00
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"), // <20><><EFBFBD><EFBFBD>
|
2025-04-08 02:18:00 +00:00
|
|
|
|
QString(), // Ĭ<><C4AC>·<EFBFBD><C2B7>
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER) // <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->lineEditL1AEchoDataPath->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>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onbuttonBox_accepted()
|
|
|
|
|
{
|
|
|
|
|
QString echoDataPath = this->ui->lineEditEchoDataPath->text().trimmed();
|
|
|
|
|
QString RangelookTablePath = this->ui->lineEditLookTablePath->text().trimmed();
|
|
|
|
|
QString l1AEchoDataPath = this->ui->lineEditL1AEchoDataPath->text().trimmed();
|
|
|
|
|
|
2025-04-11 09:39:55 +00:00
|
|
|
|
if (isExists(echoDataPath) && isExists(RangelookTablePath)) {
|
|
|
|
|
gdalImage echoData(echoDataPath);
|
|
|
|
|
gdalImage RangelookTable(RangelookTablePath);
|
|
|
|
|
if (echoData.getDataType() == GDT_CFloat32
|
|
|
|
|
||echoData.getDataType()==GDT_CFloat64
|
|
|
|
|
|| echoData.getDataType() == GDT_CInt16
|
|
|
|
|
|| echoData.getDataType()==GDT_CInt32
|
|
|
|
|
) {
|
2025-04-08 02:18:00 +00:00
|
|
|
|
|
2025-04-11 09:39:55 +00:00
|
|
|
|
CreategdalImageComplex(l1AEchoDataPath, RangelookTable.height, RangelookTable.width,1, RangelookTable.gt, RangelookTable.projection, true, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ResampleEChoDataFromGeoEcho(echoDataPath, RangelookTablePath, l1AEchoDataPath);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
CreategdalImage(l1AEchoDataPath, RangelookTable.height, RangelookTable.width, 1, RangelookTable.gt, RangelookTable.projection, true, true);
|
|
|
|
|
ResampleRangeDataFromGeoImage(echoDataPath, RangelookTablePath, l1AEchoDataPath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-08 02:18:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onbuttonBox_rejected()
|
|
|
|
|
{
|
|
|
|
|
this->close();
|
|
|
|
|
}
|