From 6d642675ee0bac951582ab6c77017aa46176fcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A2=9E=E8=BE=89?= <3045316072@qq.com> Date: Tue, 8 Apr 2025 10:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SARImage/ImageNetOperator.cpp | 19 ++- .../SARImage/ImageNetOperator.h | 3 + .../QSARSimulationComplexEchoDataDialog.cpp | 100 ++++++++++++ .../QSARSimulationComplexEchoDataDialog.h | 27 ++++ .../QSARSimulationComplexEchoDataDialog.ui | 149 ++++++++++++++++++ .../SimulationSARTool.vcxproj | 3 + .../SimulationSARTool.vcxproj.filters | 15 +- 7 files changed, 308 insertions(+), 8 deletions(-) create mode 100644 Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.cpp create mode 100644 Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.h create mode 100644 Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.ui diff --git a/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.cpp b/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.cpp index a88bf24..44f98c9 100644 --- a/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.cpp +++ b/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.cpp @@ -480,11 +480,11 @@ void InterploateClipAtiByRefDEM(QString ImageLLPath, QString& ImageDEMPath, QStr gdalImage outimgll = CreategdalImageDouble(outImageLLAPath, RowCount, ColCount, 4, true, true); // 经度、纬度、高程、斜距 - long imgheight = outimgll.height; - long imgwidth = outimgll.width; + imgheight = outimgll.height; + imgwidth = outimgll.width; - Eigen::MatrixXd imglonArr = imgll.getData(minRow, minCol, RowCount, ColCount, 1); - Eigen::MatrixXd imglatArr = imgll.getData(minRow, minCol, RowCount, ColCount, 2); + imglonArr = imgll.getData(minRow, minCol, RowCount, ColCount, 1); + imglatArr = imgll.getData(minRow, minCol, RowCount, ColCount, 2); Eigen::MatrixXd demArr = demimg.getData(0, 0, demimg.height, demimg.width, 1); @@ -784,7 +784,16 @@ int ReflectTable_WGS2Range(QString dem_rc_path,QString outOriSimTiffPath,QStrin - +int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePath, QString L1AEchoDataPath) { + gdalImageComplex echodata(L2echodataPath); + gdalImage looktable(RangeLooktablePath); + + + + + + +} diff --git a/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.h b/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.h index 88ae6a1..b3a0be9 100644 --- a/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.h +++ b/Toolbox/SimulationSARTool/SARImage/ImageNetOperator.h @@ -14,4 +14,7 @@ bool GPSPointsNumberEqualCheck(QString& ImageLLPath, QString& InEchoGPSDataPath) void InterploateClipAtiByRefDEM(QString ImageLLPath, QString& ImageDEMPath, QString& outImageLLAPath, QString& InEchoGPSDataPath); void InterploateAtiByRefDEM(QString& ImageLLPath, QString& ImageDEMPath, QString& outImageLLAPath, QString& InEchoGPSDataPath); int ReflectTable_WGS2Range(QString dem_rc_path, QString outOriSimTiffPath, QString ori_sim_count_tiffPath, long OriHeight, long OriWidth); + +int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePath, QString L1AEchoDataPath); + #endif diff --git a/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.cpp b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.cpp new file mode 100644 index 0000000..b1057d2 --- /dev/null +++ b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.cpp @@ -0,0 +1,100 @@ +#include "QSARSimulationComplexEchoDataDialog.h" +#include "ui_QSARSimulationComplexEchoDataDialog.h" +#include +#include +#include "BaseConstVariable.h" +#include "BaseTool.h" +#include "ImageNetOperator.h" +#include + + +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, // 父窗口 + tr(u8"选择L1A回波数据文件"), // 标题 + QString(), // 默认路径 + tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器 + ); + // 如果用户选择了文件 + if (!fileNames.isEmpty()) { + QString message = "选择的文件有:\n"; + this->ui->lineEditL1AEchoDataPath->setText(fileNames); + } + else { + QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。")); + } +} + +void QSARSimulationComplexEchoDataDialog::onpushButtonLookTableSelect_clicked() +{ + QString fileNames = QFileDialog::getOpenFileName( + this, // 父窗口 + tr(u8"选择L1A回波数据文件"), // 标题 + QString(), // 默认路径 + tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器 + ); + // 如果用户选择了文件 + if (!fileNames.isEmpty()) { + QString message = "选择的文件有:\n"; + this->ui->lineEditL1AEchoDataPath->setText(fileNames); + } + else { + QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。")); + } +} + +void QSARSimulationComplexEchoDataDialog::onpushButtonL1AEchoDataSelect_clicked() +{ + QString fileNames = QFileDialog::getSaveFileName( + this, // 父窗口 + tr(u8"选择L1A回波数据文件"), // 标题 + QString(), // 默认路径 + tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器 + ); + // 如果用户选择了文件 + if (!fileNames.isEmpty()) { + QString message = "选择的文件有:\n"; + this->ui->lineEditL1AEchoDataPath->setText(fileNames); + } + else { + QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。")); + } +} + +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(); + + + + +} + +void QSARSimulationComplexEchoDataDialog::onbuttonBox_rejected() +{ + this->close(); +} diff --git a/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.h b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.h new file mode 100644 index 0000000..b586769 --- /dev/null +++ b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.h @@ -0,0 +1,27 @@ +#pragma once + +#include + +namespace Ui +{ + class QSARSimulationComplexEchoDataDialogClass; +} + +class QSARSimulationComplexEchoDataDialog : public QDialog +{ + Q_OBJECT + +public: + QSARSimulationComplexEchoDataDialog(QWidget *parent = nullptr); + ~QSARSimulationComplexEchoDataDialog(); + + +public slots: + void onpushButtonEchoDataSelect_clicked(); + void onpushButtonLookTableSelect_clicked(); + void onpushButtonL1AEchoDataSelect_clicked(); + void onbuttonBox_accepted(); + void onbuttonBox_rejected(); +private: + Ui::QSARSimulationComplexEchoDataDialogClass* ui; +}; diff --git a/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.ui b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.ui new file mode 100644 index 0000000..ceed9c6 --- /dev/null +++ b/Toolbox/SimulationSARTool/SARImage/QSARSimulationComplexEchoDataDialog.ui @@ -0,0 +1,149 @@ + + + QSARSimulationComplexEchoDataDialogClass + + + + 0 + 0 + 916 + 400 + + + + QSARSimulationComplexEchoDataDialog + + + + + + + 0 + 30 + + + + 鎴愬儚鏂囦欢锛 + + + + + + + + 0 + 30 + + + + + + + + + 0 + 30 + + + + 閫夋嫨 + + + + + + + + 0 + 30 + + + + 鏌ユ壘琛細 + + + + + + + + 0 + 30 + + + + + + + + + + + + 0 + 30 + + + + 閫夋嫨 + + + + + + + + 0 + 30 + + + + L1A鍥炴尝锛 + + + + + + + + 0 + 30 + + + + + + + + + + + + 0 + 30 + + + + 閫夋嫨 + + + + + + + + 0 + 30 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj index 0e39cf3..34f3688 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj +++ b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj @@ -219,6 +219,7 @@ + @@ -250,6 +251,7 @@ + @@ -289,6 +291,7 @@ + diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters index 88f0bab..1516d1b 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters +++ b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters @@ -80,9 +80,6 @@ SARImage - - PowerSimulationIncoherent - @@ -154,6 +151,9 @@ PowerSimulationIncoherent + + SARImage + @@ -198,6 +198,9 @@ PowerSimulationIncoherent + + SARImage + @@ -242,6 +245,12 @@ Header Files + + Header Files + + + SARImage +