增加多级产品生产工具-待测试
parent
d12a2b7d89
commit
95f7bef2b5
|
@ -801,7 +801,7 @@ int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePa
|
|||
|
||||
|
||||
for (long i = 0; i < imgheight; i++) {
|
||||
//printf("\rprocess:%f precent\t\t\t",i*100.0/imgheight);
|
||||
printf("\rGEC: process:%f precent\t\t\t",i*100.0/imgheight);
|
||||
for (long j = 0; j < imgwidth; j++) {
|
||||
double lon = imglonArr(i, j);
|
||||
double lat = imglatArr(i, j);
|
||||
|
|
|
@ -6,22 +6,21 @@
|
|||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
#include "ui_QSimulationBPImageMultiProduction.h"
|
||||
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
QSimulationBPImageMultiProduction::QSimulationBPImageMultiProduction(QWidget *parent)
|
||||
: QDialog(parent),ui(new Ui::QSimulationBPImageMultiProductionClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->checkBox->setEnabled(false);
|
||||
ui->checkBox->setCheckable(true);
|
||||
ui->checkBox->setChecked(true);
|
||||
|
||||
QObject::connect(ui->pushButtonEchoSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoSelectClicked()));
|
||||
QObject::connect(ui->pushButtonImageSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageSelectClicked()));
|
||||
QObject::connect(ui->GridNetBtn, SIGNAL(clicked()), this, SLOT(onpushButtonGridNetSelectClicked()));
|
||||
QObject::connect(ui->LookTableBtn, SIGNAL(clicked()), this, SLOT(onpushButtonLookTableBtnClicked()));
|
||||
QObject::connect(ui->GridNetBtn, SIGNAL(clicked()), this, SLOT(onpushButtonGridNetBtnSelectClicked()));
|
||||
QObject::connect(ui->L1ASelectBtn, SIGNAL(clicked()), this, SLOT(onpushButtonL1ASelectBtnClicked()));
|
||||
QObject::connect(ui->L2SelectSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL2SelectSelectClicked()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||
QObject::connect(ui->checkBox, SIGNAL(stateChanged(int)), this, SLOT(oncheckboxTrigged(int)));
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -50,7 +49,44 @@ void QSimulationBPImageMultiProduction::onpushButtonEchoSelectClicked()
|
|||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonImageSelectClicked()
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonLookTableBtnClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择查找表文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditLookTablePath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonGridNetBtnSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择成像网格文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditImageNetPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonL1ASelectBtnClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
|
@ -61,7 +97,25 @@ void QSimulationBPImageMultiProduction::onpushButtonImageSelectClicked()
|
|||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditImagePath->setText(fileNames);
|
||||
this->ui->lineEditL1AProductionPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonL2SelectSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditL2ProductionPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
|
@ -70,10 +124,22 @@ void QSimulationBPImageMultiProduction::onpushButtonImageSelectClicked()
|
|||
|
||||
void QSimulationBPImageMultiProduction::onbtnaccepted()
|
||||
{
|
||||
QString L1ADataPath = this->ui->lineEditL1AProductionPath->text().trimmed();
|
||||
QString L2DataPath = this->ui->lineEditL2ProductionPath->text().trimmed();
|
||||
QString looktablePath = this->ui->lineEditLookTablePath->text().trimmed();
|
||||
QString imgNetPath = this->ui->lineEditImageNetPath->text().trimmed();
|
||||
QString echoDataPath = this->ui->lineEditEchoPath->text().trimmed();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this->hide();
|
||||
QString echofile = this->ui->lineEditEchoPath->text().trimmed();
|
||||
QString outImageFolder = getParantFromPath(this->ui->lineEditImagePath->text().trimmed());
|
||||
QString imagename = getFileNameFromPath(this->ui->lineEditImagePath->text().trimmed());
|
||||
QString echofile = echoDataPath;
|
||||
QString outImageFolder = getParantFromPath(L2DataPath);
|
||||
QString imagename = getFileNameFromPath(L2DataPath);
|
||||
std::shared_ptr<EchoL0Dataset> echoL0ds(new EchoL0Dataset);
|
||||
echoL0ds->Open(echofile);
|
||||
|
||||
|
@ -86,53 +152,31 @@ void QSimulationBPImageMultiProduction::onbtnaccepted()
|
|||
imagL1->setFs(echoL0ds->getFs());
|
||||
imagL1->setLookSide(echoL0ds->getLookSide());
|
||||
|
||||
if (ui->checkBox->isChecked()) {
|
||||
gdalImage imgxyzimg(ui->lineEdit->text().trimmed());
|
||||
imagL1->OpenOrNew(outImageFolder, imagename, imgxyzimg.height, imgxyzimg.width);
|
||||
}
|
||||
else {
|
||||
imagL1->OpenOrNew(outImageFolder, imagename, echoL0ds->getPluseCount(), echoL0ds->getPlusePoints());
|
||||
}
|
||||
|
||||
gdalImage imgxyzimg(imgNetPath);
|
||||
imagL1->OpenOrNew(outImageFolder, imagename, imgxyzimg.height, imgxyzimg.width);
|
||||
|
||||
qDebug() << u8"成像中";
|
||||
TBPImageAlgCls TBPimag;
|
||||
TBPimag.setEchoL0(echoL0ds);
|
||||
TBPimag.setImageL1(imagL1);
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
TBPimag.setGPU(true);
|
||||
TBPimag.ProcessWithGridNet(cpucore_num,ui->lineEdit->text().trimmed());
|
||||
|
||||
TBPimag.ProcessWithGridNet(cpucore_num, imgNetPath);
|
||||
qDebug() << u8"系统几何校正中";
|
||||
|
||||
|
||||
ResampleEChoDataFromGeoEcho(imagL1->getImageRasterPath(), looktablePath, L1ADataPath);
|
||||
|
||||
this->show();
|
||||
|
||||
QMessageBox::information(this,u8"成像",u8"成像结束");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onbtnrejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::oncheckboxTrigged(int)
|
||||
{
|
||||
this->ui->lineEdit->setEnabled(this->ui->checkBox->isChecked());
|
||||
this->ui->GridNetBtn->setEnabled(this->ui->checkBox->isChecked());
|
||||
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonGridNetSelectClicked( )
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*);;dat(*.dat);;tif(*.tif);;tiff(*.tiff)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEdit->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
|
@ -19,12 +19,13 @@ public:
|
|||
|
||||
public slots:
|
||||
void onpushButtonEchoSelectClicked();
|
||||
void onpushButtonImageSelectClicked();
|
||||
void onpushButtonLookTableBtnClicked();
|
||||
void onpushButtonGridNetBtnSelectClicked();
|
||||
void onpushButtonL1ASelectBtnClicked();
|
||||
void onpushButtonL2SelectSelectClicked();
|
||||
void onbtnaccepted();
|
||||
void onbtnrejected();
|
||||
|
||||
void oncheckboxTrigged(int);
|
||||
void onpushButtonGridNetSelectClicked( );
|
||||
|
||||
|
||||
private:
|
||||
Ui::QSimulationBPImageMultiProductionClass* ui;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>回波地址:</string>
|
||||
<string>回波地址: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -75,23 +75,14 @@
|
|||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>图像网格</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<string>成像区域网格:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<widget class="QLineEdit" name="lineEditImageNetPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -125,6 +116,108 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>查找表: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditLookTablePath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\Programme\vs2022\RasterMergeTest\simulationData\demdataset\demxyz.bin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="LookTableBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>1级产品: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditL1AProductionPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\Programme\vs2022\RasterMergeTest\simulationData\demdataset\demxyz.bin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="L1ASelectBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
|
@ -143,12 +236,12 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仿真图像:</string>
|
||||
<string>2级产品: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditImagePath">
|
||||
<widget class="QLineEdit" name="lineEditL2ProductionPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -161,7 +254,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonImageSelect">
|
||||
<widget class="QPushButton" name="L2SelectSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "QCreateInSARImagePlaneXYZRDialog.h"
|
||||
#include "QLookTableResampleFromWGS84ToRange.h"
|
||||
#include "QSARSimulationComplexEchoDataDialog.h"
|
||||
|
||||
#include "QSimulationBPImageMultiProduction.h"
|
||||
|
||||
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
||||
{
|
||||
|
@ -240,9 +240,6 @@ void QLookTableResampleFromWGS84ToRangeToolButton::run()
|
|||
dialog->show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//QSARSimulationComplexEchoDataDialog
|
||||
|
||||
QSARSimulationComplexEchoDataDialogToolButton::QSARSimulationComplexEchoDataDialogToolButton(QWidget* parent)
|
||||
|
@ -261,3 +258,20 @@ void QSARSimulationComplexEchoDataDialogToolButton::run()
|
|||
QSARSimulationComplexEchoDataDialog* dialog = new QSARSimulationComplexEchoDataDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionToolButton::QSimulationBPImageMultiProductionToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"³ÉÏñ¹¤¾ß¿â");
|
||||
this->toolname = QString(u8"1-2¼¶²úÆ·Éú²ú");
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionToolButton::~QSimulationBPImageMultiProductionToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProductionToolButton::run()
|
||||
{
|
||||
QSimulationBPImageMultiProduction* dialog = new QSimulationBPImageMultiProduction;
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -165,4 +165,13 @@ public:
|
|||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImageMultiProductionToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSimulationBPImageMultiProductionToolButton(QWidget* parent = nullptr);
|
||||
~QSimulationBPImageMultiProductionToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue