From f0b0156af30366af777d828b281e3c76cba672fb Mon Sep 17 00:00:00 2001 From: chenzenghui <3045316072@qq.com> Date: Wed, 12 Mar 2025 10:23:09 +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 --- .../BaseTool/ImageOperatorBase.cpp | 132 ++++++-------- .../BaseTool/ImageOperatorBase.h | 8 +- LAMPDataProcess.sln | 14 ++ LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj | 3 + SPG4Tool/SPG4Function.h | 4 +- SPG4Tool/SPG4Tool.vcxproj | 3 +- SPG4Tool/SPG4Tool_global.h | 17 ++ .../BaseToolbox/QComplex2AmpPhase.cpp | 10 +- .../BaseToolbox/QComplex2AmpPhase.h | 4 +- .../BaseToolbox/QDEMResampleDialog.cpp | 3 + .../BaseToolbox/QImportGF3StripL1ADataset.cpp | 9 +- .../BaseToolbox/QImportGF3StripL1ADataset.h | 4 +- .../BaseToolbox/QOrthSlrRaster.cpp | 7 +- .../BaseToolbox/BaseToolbox/QOrthSlrRaster.h | 4 +- .../BaseToolbox/QRDOrthProcessClass.cpp | 7 +- .../BaseToolbox/QRDOrthProcessClass.h | 4 +- .../QtLinearToIntenisityDialog.cpp | 2 +- .../pluginToolboxLibrary.vcxproj | 161 ++++++++++++++++++ .../pluginToolboxLibrary.vcxproj.filters | 17 ++ 19 files changed, 305 insertions(+), 108 deletions(-) create mode 100644 SPG4Tool/SPG4Tool_global.h create mode 100644 pluginToolboxLibrary/pluginToolboxLibrary.vcxproj create mode 100644 pluginToolboxLibrary/pluginToolboxLibrary.vcxproj.filters diff --git a/BaseCommonLibrary/BaseTool/ImageOperatorBase.cpp b/BaseCommonLibrary/BaseTool/ImageOperatorBase.cpp index 4ffc877..ae25053 100644 --- a/BaseCommonLibrary/BaseTool/ImageOperatorBase.cpp +++ b/BaseCommonLibrary/BaseTool/ImageOperatorBase.cpp @@ -1675,6 +1675,38 @@ gdalImage BASECONSTVARIABLEAPI CreategdalImageDouble(QString& img_path, int heig } +gdalImage BASECONSTVARIABLEAPI CreategdalImageFloat(QString& img_path, int height, int width, int band_num, bool overwrite, bool isEnvi) +{ + + if (exists_test(img_path.toUtf8().constData())) { + if (overwrite) { + gdalImage result_img(img_path); + return result_img; + } + else { + throw "file has exist!!!"; + exit(1); + } + } + GDALAllRegister(); + CPLSetConfigOption("GDAL_FILENAME_IS_UTF8", "YES"); // 注锟斤拷锟绞斤拷锟斤拷锟斤拷锟?1锟?7 + GDALDriver* poDriver = nullptr; + if (isEnvi) { + poDriver = GetGDALDriverManager()->GetDriverByName("ENVI"); + } + else { + poDriver = GetGDALDriverManager()->GetDriverByName("GTiff"); + } + + + GDALDataset* poDstDS = poDriver->Create(img_path.toUtf8().constData(), width, height, band_num, GDT_Float32, NULL); // 锟斤拷锟斤拷锟斤拷 + GDALFlushCache((GDALDatasetH)poDstDS); + GDALClose((GDALDatasetH)poDstDS); + GDALDestroy(); // or, DllMain at DLL_PROCESS_DETACH + gdalImage result_img(img_path); + return result_img; +} + gdalImage CreategdalImageDouble(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection, bool need_gt, bool overwrite, bool isEnvi) { if (exists_test(img_path.toUtf8().constData())) { @@ -4149,93 +4181,37 @@ void CreateSARIntensityByLookTable(QString IntensityRasterPath, std::function processBarShow ) { - GDALAllRegister(); - constexpr size_t GB4 = size_t(1) * 1024 * 1024 * 1024; // 4GB in bytes - - // 打开输入数据集 - GDALDataset* lookDS = (GDALDataset*)GDALOpen(LookTableRasterPath.toStdString().c_str(), GA_ReadOnly); - GDALDataset* intensityDS = (GDALDataset*)GDALOpen(IntensityRasterPath.toStdString().c_str(), GA_ReadOnly); - - // 验证数据集有效性 - if (!lookDS || !intensityDS || - lookDS->GetRasterXSize() != intensityDS->GetRasterXSize() || - lookDS->GetRasterYSize() != intensityDS->GetRasterYSize()) - { - if (lookDS) GDALClose(lookDS); - if (intensityDS) GDALClose(intensityDS); - return; - } - - // 获取栅格参数 - const int width = lookDS->GetRasterXSize(); - const int height = lookDS->GetRasterYSize(); - const int rows_sar = max_rid - min_rid + 1; - const int cols_sar = max_cid - min_cid + 1; - - // 计算分块策略 - const size_t pixelBytes = - GDALGetDataTypeSizeBytes(lookDS->GetRasterBand(1)->GetRasterDataType()) * 2 + // 两个波段 - GDALGetDataTypeSizeBytes(intensityDS->GetRasterBand(1)->GetRasterDataType()); - - const size_t maxPixelsPerBlock = GB4 / pixelBytes; - int blockXSize = width; - int blockYSize = static_cast(maxPixelsPerBlock / width); - blockYSize = std::max(1, std::min(blockYSize, height)); - - // 输出矩阵初始化 - std::vector sarData(rows_sar * cols_sar, 0.0); + gdalImage looktableds(LookTableRasterPath); + gdalImage geoIntensity(IntensityRasterPath); + gdalImage SARIntensity= CreategdalImageDouble(SARIntensityPath,max_rid-min_rid,max_cid-min_cid,1); + long blockYSize = Memory1GB / looktableds.width / 8 * 2; + + Eigen::MatrixXd SARData = SARIntensity.getData(0, 0, SARIntensity.height, SARIntensity.width, 1); // 分块处理 - for (int yOff = 0; yOff < height; yOff += blockYSize) + for (int yOff = 0; yOff < looktableds.height; yOff += blockYSize) { - const int ySize = std::min(blockYSize, height - yOff); - - // 读取行号列号数据 - std::vector rData(width * ySize); - std::vector cData(width * ySize); - lookDS->GetRasterBand(1)->RasterIO(GF_Read, 0, yOff, width, ySize, - rData.data(), width, ySize, GDT_Int32, 0, 0); - lookDS->GetRasterBand(2)->RasterIO(GF_Read, 0, yOff, width, ySize, - cData.data(), width, ySize, GDT_Int32, 0, 0); + processBarShow(yOff, looktableds.height); + qDebug() << "Process : [" << yOff * 100.0 / looktableds.height << " % ]"; + Eigen::MatrixXd rowData = looktableds.getData(yOff, 0, blockYSize, looktableds.width, 1); + Eigen::MatrixXd colData = looktableds.getData(yOff, 0, blockYSize, looktableds.width, 2); + Eigen::MatrixXd geoData = geoIntensity.getData(yOff, 0, blockYSize, looktableds.width, 1); - // 读取强度数据 - std::vector intensity(width * ySize); - intensityDS->GetRasterBand(1)->RasterIO(GF_Read, 0, yOff, width, ySize, - intensity.data(), width, ySize, GDT_Float32, 0, 0); + for (long i = 0; i < rowData.rows(); i++) { + for (long j = 0; j < rowData.cols(); j++) { + const long r =round( rowData(i,j))-min_rid; + const long c = round(colData(i, j))-min_cid; - // 处理当前块 -#pragma omp parallel for collapse(2) - for (int y = 0; y < ySize; ++y) { - for (int x = 0; x < width; ++x) { - const int idx = y * width + x; - const long r = rData[idx]; - const long c = cData[idx]; - - if (r >= min_rid && r <= max_rid && c >= min_cid && c <= max_cid) { - const int row = r - min_rid; - const int col = c - min_cid; -#pragma omp atomic - sarData[row * cols_sar + col] += intensity[idx]; + if (r >= 0 && r < SARIntensity.height && c >= 0 && c <= SARIntensity.width) { + SARData(r, c) = SARData(r, c) + geoData(i, j); + } } } - if (processBarShow) { - processBarShow(yOff, height); - } - } - - // 写入输出 - GDALDriver* driver = GetGDALDriverManager()->GetDriverByName("GTiff"); - GDALDataset* outDS = driver->Create(SARIntensityPath.toStdString().c_str(), - cols_sar, rows_sar, 1, GDT_Float64, nullptr); - outDS->GetRasterBand(1)->RasterIO(GF_Write, 0, 0, cols_sar, rows_sar, - sarData.data(), cols_sar, rows_sar, GDT_Float64, 0, 0); - - // 资源清理 - GDALClose(lookDS); - GDALClose(intensityDS); - GDALClose(outDS); + SARIntensity.saveImage(SARData, 0, 0, 1); + qDebug() << "Process : [ 100 % ]"; + processBarShow(1000,1000); } diff --git a/BaseCommonLibrary/BaseTool/ImageOperatorBase.h b/BaseCommonLibrary/BaseTool/ImageOperatorBase.h index b0f33ab..54c488e 100644 --- a/BaseCommonLibrary/BaseTool/ImageOperatorBase.h +++ b/BaseCommonLibrary/BaseTool/ImageOperatorBase.h @@ -242,10 +242,10 @@ public: // 创建影像 gdalImage BASECONSTVARIABLEAPI CreategdalImageDouble(QString& img_path, int height, int width, int band_num, bool overwrite = false, bool isEnvi = false); -gdalImage BASECONSTVARIABLEAPI CreategdalImageDouble(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection, bool need_gt = true, bool overwrite = false, bool isEnvi = false); -gdalImage BASECONSTVARIABLEAPI CreategdalImage(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection,bool need_gt = true, bool overwrite = false, bool isEnvi = false, GDALDataType datetype = GDT_Float32); - -gdalImage BASECONSTVARIABLEAPI CreategdalImage(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, long espgcode, GDALDataType eType = GDT_Float32, bool need_gt = true, bool overwrite = false, bool isENVI = false); +gdalImage BASECONSTVARIABLEAPI CreategdalImageFloat(QString& img_path, int height, int width, int band_num, bool overwrite = false, bool isEnvi = false); +gdalImage BASECONSTVARIABLEAPI CreategdalImageDouble(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection, bool need_gt = true, bool overwrite = false, bool isEnvi = false); +gdalImage BASECONSTVARIABLEAPI CreategdalImage(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection,bool need_gt = true, bool overwrite = false, bool isEnvi = false, GDALDataType datetype = GDT_Float32); +gdalImage BASECONSTVARIABLEAPI CreategdalImage(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, long espgcode, GDALDataType eType = GDT_Float32, bool need_gt = true, bool overwrite = false, bool isENVI = false); gdalImageComplex BASECONSTVARIABLEAPI CreategdalImageComplex(const QString& img_path, int height, int width, int band_num, Eigen::MatrixXd gt, QString projection, bool need_gt = true, bool overwrite = false); gdalImageComplex BASECONSTVARIABLEAPI CreategdalImageComplexNoProj(const QString& img_path, int height, int width, int band_num, bool overwrite = true); diff --git a/LAMPDataProcess.sln b/LAMPDataProcess.sln index 8d9901f..1f54f80 100644 --- a/LAMPDataProcess.sln +++ b/LAMPDataProcess.sln @@ -40,6 +40,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageshowTool", "ImageshowT EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPG4Tool", "SPG4Tool\SPG4Tool.vcxproj", "{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pluginToolboxLibrary", "pluginToolboxLibrary\pluginToolboxLibrary.vcxproj", "{667625A5-8DE2-4373-99F0-8BAD2CCED011}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -182,6 +184,18 @@ Global {80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.Build.0 = Release|x64 {80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.ActiveCfg = Release|x64 {80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.Build.0 = Release|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|ARM.ActiveCfg = Debug|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|ARM.Build.0 = Debug|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|x64.ActiveCfg = Debug|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|x64.Build.0 = Debug|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|x86.ActiveCfg = Debug|Win32 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|x86.Build.0 = Debug|Win32 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|ARM.ActiveCfg = Release|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|ARM.Build.0 = Release|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x64.ActiveCfg = Release|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x64.Build.0 = Release|x64 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x86.ActiveCfg = Release|Win32 + {667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj b/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj index 96d1cdf..cc60302 100644 --- a/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj +++ b/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj @@ -199,6 +199,9 @@ {8c8ca066-a93a-4098-9a46-b855efeaadf2} + + {667625a5-8de2-4373-99f0-8bad2cced011} + {e56b3878-a3dc-41a4-abf3-b628816d0d64} diff --git a/SPG4Tool/SPG4Function.h b/SPG4Tool/SPG4Function.h index a9cbd4a..70c8ebd 100644 --- a/SPG4Tool/SPG4Function.h +++ b/SPG4Tool/SPG4Function.h @@ -1,7 +1,7 @@ #pragma once #ifndef __SPG4FUNCTION__H__ #define __SPG4FUNCTION__H__ - +#include "SPG4Tool_global.h" #include "Tle.h" #include "SGP4.h" #include "Observer.h" @@ -11,7 +11,7 @@ //void RunTle(libsgp4::Tle tle, double start, double end, double inc); -std::vector RunTle(libsgp4::Tle tle, double start, double end, double inc,bool printfinfoflag=false); +SPG4TOOL_EXPORT std::vector RunTle(libsgp4::Tle tle, double start, double end, double inc,bool printfinfoflag=false); #endif diff --git a/SPG4Tool/SPG4Tool.vcxproj b/SPG4Tool/SPG4Tool.vcxproj index 9a056ef..6b55812 100644 --- a/SPG4Tool/SPG4Tool.vcxproj +++ b/SPG4Tool/SPG4Tool.vcxproj @@ -66,7 +66,7 @@ - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;SPG4TOOL_LIB;%(PreprocessorDefinitions) @@ -135,6 +135,7 @@ + diff --git a/SPG4Tool/SPG4Tool_global.h b/SPG4Tool/SPG4Tool_global.h new file mode 100644 index 0000000..7e912f2 --- /dev/null +++ b/SPG4Tool/SPG4Tool_global.h @@ -0,0 +1,17 @@ +#pragma once +#ifndef __SPG4TOOL_GLOBAL__H__ +#define __SPG4TOOL_GLOBAL__H__ + +#include + +#ifdef SPG4TOOL_LIB +#define SPG4TOOL_EXPORT Q_DECL_EXPORT +#else +#define SPG4TOOL_EXPORT Q_DECL_IMPORT +#endif + + + +#endif + + diff --git a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp index 19bb96a..90b6580 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp @@ -10,11 +10,13 @@ QComplex2AmpPhase::QComplex2AmpPhase(QWidget *parent) : QDialog(parent) { ui.setupUi(this); + QObject::connect(ui.pushButtonAdd,SIGNAL(clicked(bool)),this,SLOT(onpushButtonAddClicked(bool))); + QObject::connect(ui.pushButtonRemove,SIGNAL(clicked(bool)),this,SLOT(onpushButtonRemoveClicked(bool))); QObject::connect(ui.radioButtonAmp,SIGNAL(toggled(bool)),this,SLOT(radioButtonAmptoggled(bool))); QObject::connect(ui.radioButtonPhase, SIGNAL(toggled(bool)), this, SLOT(radioButtonPhasetoggled(bool))); QObject::connect(ui.radioButtonSigma0, SIGNAL(toggled(bool)), this, SLOT(radioButtonSigma0toggled(bool))); - QObject::connect(ui.buttonBox, SIGNAL(accept()), this, SLOT(accept())); - QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + QObject::connect(ui.buttonBox, SIGNAL(accept()), this, SLOT(onaccept())); + QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject())); //toggled(bool ) } @@ -24,7 +26,7 @@ QComplex2AmpPhase::~QComplex2AmpPhase() } -void QComplex2AmpPhase::accept() +void QComplex2AmpPhase::onaccept() { QProgressDialog progressDialog(u8"ת", u8"ֹ", 0, ui.listWidgetImg->count()); progressDialog.setWindowTitle(u8"ת"); @@ -63,7 +65,7 @@ void QComplex2AmpPhase::accept() progressDialog.close(); } -void QComplex2AmpPhase::reject() +void QComplex2AmpPhase::onreject() { this->close(); } diff --git a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.h b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.h index b1201c2..21a974d 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.h +++ b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.h @@ -13,8 +13,8 @@ public: public slots: - void accept(); - void reject(); + void onaccept(); + void onreject(); void onpushButtonAddClicked(bool); void onpushButtonRemoveClicked(bool); void onpushButtonWorkSpaceClicked(bool); diff --git a/Toolbox/BaseToolbox/BaseToolbox/QDEMResampleDialog.cpp b/Toolbox/BaseToolbox/BaseToolbox/QDEMResampleDialog.cpp index 5c42a13..f09c558 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QDEMResampleDialog.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QDEMResampleDialog.cpp @@ -55,6 +55,7 @@ void QDEMResampleDialog::onoutDEMSelectBtnClicked(bool flag) void QDEMResampleDialog::onAccepted() { + this->hide(); double gridx = ui->doubleSpinBoxGridX->value(); double gridy = ui->doubleSpinBoxGridY->value(); @@ -103,6 +104,8 @@ void QDEMResampleDialog::onAccepted() outDEMPath.toLocal8Bit().constData(), gt.get(), new_width, new_height, GDALResampleAlg::GRA_Bilinear); qDebug() << "DEM ReSample finished!!!"; + this->show(); + QMessageBox::information(this, tr(u8"ʾ"), tr(u8"completed!!!")); } void QDEMResampleDialog::onRejected() diff --git a/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.cpp b/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.cpp index cdce92d..12793e3 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.cpp @@ -8,10 +8,11 @@ QImportGF3StripL1ADataset::QImportGF3StripL1ADataset(QWidget *parent) ui.setupUi(this); QListWidget* listWidgetMetaxml; - QObject::connect( ui.pushButtonAdd,SIGNAL(clicked(clicked)),this,SLOT(onpushButtonAddClicked(bool))); + QObject::connect(ui.pushButtonAdd,SIGNAL(clicked(clicked)),this,SLOT(onpushButtonAddClicked(bool))); QObject::connect(ui.pushButtonRemove, SIGNAL(clicked(clicked)), this, SLOT(onpushButtonRemoveClicked(bool))); QObject::connect(ui.pushButtonWorkSpace, SIGNAL(clicked(clicked)), this, SLOT(onpushButtonWorkSpaceClicked(bool))); - QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject())); + QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept())); } @@ -20,7 +21,7 @@ QImportGF3StripL1ADataset::~QImportGF3StripL1ADataset() } -void QImportGF3StripL1ADataset::accept() +void QImportGF3StripL1ADataset::onaccept() { QProgressDialog progressDialog(u8"GF3L1AӰ", u8"ֹ", 0, ui.listWidgetMetaxml->count()); progressDialog.setWindowTitle(u8"GF3L1AӰ"); @@ -40,7 +41,7 @@ void QImportGF3StripL1ADataset::accept() progressDialog.close(); } -void QImportGF3StripL1ADataset::reject() +void QImportGF3StripL1ADataset::onreject() { this->close(); } diff --git a/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.h b/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.h index 79759c4..7b2bc56 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.h +++ b/Toolbox/BaseToolbox/BaseToolbox/QImportGF3StripL1ADataset.h @@ -14,8 +14,8 @@ public: ~QImportGF3StripL1ADataset(); public slots: - void accept(); - void reject(); + void onaccept(); + void onreject(); void onpushButtonAddClicked(bool); void onpushButtonRemoveClicked(bool); void onpushButtonWorkSpaceClicked(bool); diff --git a/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.cpp b/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.cpp index b8e3add..6e4ad79 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.cpp @@ -16,13 +16,14 @@ QOrthSlrRaster::QOrthSlrRaster(QWidget *parent) connect(ui.pushButtonRemove, SIGNAL(clicked(bool)), this, SLOT(onpushButtonRemoveClicked(bool))); connect(ui.pushButtonDEMSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonWorkSpaceClicked(bool))); connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool))); - QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject())); + QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onreject())); } QOrthSlrRaster::~QOrthSlrRaster() {} -void QOrthSlrRaster::accept() +void QOrthSlrRaster::onaccept() { QToolProcessBarDialog* processdialog = new QToolProcessBarDialog(this); processdialog->show(); @@ -49,7 +50,7 @@ void QOrthSlrRaster::accept() processdialog->close(); } -void QOrthSlrRaster::reject() +void QOrthSlrRaster::onreject() { this->close(); } diff --git a/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.h b/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.h index bdfa19f..abb7623 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.h +++ b/Toolbox/BaseToolbox/BaseToolbox/QOrthSlrRaster.h @@ -16,8 +16,8 @@ private: public slots: - void accept(); - void reject(); + void onaccept(); + void onreject(); void onpushButtonAddClicked(bool); void onpushButtonRemoveClicked(bool); void onpushButtonWorkSpaceClicked(bool); diff --git a/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.cpp b/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.cpp index 7a3fd52..2ad3480 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.cpp @@ -12,7 +12,8 @@ QRDOrthProcessClass::QRDOrthProcessClass(QWidget *parent) connect(ui.pushButtonRemove,SIGNAL(clicked(bool)),this,SLOT(onpushButtonRemoveClicked(bool))); connect(ui.pushButtonDEMSelect,SIGNAL(clicked(bool)),this,SLOT(onpushButtonWorkSpaceClicked(bool))); connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool))); - QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject())); + QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept())); // QDialogButtonBox* buttonBox; //QLineEdit* lineEditDEM; //QLineEdit* lineEditWorkDir; @@ -22,7 +23,7 @@ QRDOrthProcessClass::QRDOrthProcessClass(QWidget *parent) QRDOrthProcessClass::~QRDOrthProcessClass() {} -void QRDOrthProcessClass::accept() +void QRDOrthProcessClass::onaccept() { QToolProcessBarDialog* processdialog = new QToolProcessBarDialog(this); processdialog->show(); @@ -52,7 +53,7 @@ void QRDOrthProcessClass::accept() processdialog->close(); } -void QRDOrthProcessClass::reject() +void QRDOrthProcessClass::onreject() { this->close(); } diff --git a/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.h b/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.h index 4b0c0b7..6b6a544 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.h +++ b/Toolbox/BaseToolbox/BaseToolbox/QRDOrthProcessClass.h @@ -14,8 +14,8 @@ public: public slots: - void accept(); - void reject(); + void onaccept(); + void onreject(); void onpushButtonAddClicked(bool); void onpushButtonRemoveClicked(bool); void onpushButtonWorkSpaceClicked(bool); diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QtLinearToIntenisityDialog.cpp b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QtLinearToIntenisityDialog.cpp index 5a6fcb8..53f55f2 100644 --- a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QtLinearToIntenisityDialog.cpp +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QtLinearToIntenisityDialog.cpp @@ -85,7 +85,7 @@ void QtLinearToIntenisityDialog::onbtnaccepted() ui->progressBar->setValue(0); for (long rid = 0; rid < img.height; rid = rid + rowblock) { - for (long bid = 0; bid < img.band_num; bid++) + for (long bid = 1; bid <= img.band_num; bid++) { Eigen::MatrixXd data = img.getData(rid, 0, rowblock, img.width, bid); diff --git a/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj b/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj new file mode 100644 index 0000000..d3a2e08 --- /dev/null +++ b/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj @@ -0,0 +1,161 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {667625a5-8de2-4373-99f0-8bad2cced011} + pluginToolboxLibrary + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Makefile + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + {872ecd6f-30e3-4a1b-b17c-15e87d373ff6} + + + {b8b40c54-f7fe-4809-b6fb-8bc014570d7b} + + + {8c8ca066-a93a-4098-9a46-b855efeaadf2} + + + {e56b3878-a3dc-41a4-abf3-b628816d0d64} + + + {7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2} + + + {80a5854f-6f80-4ec2-9f73-84e0f4db8d7e} + + + {070c157e-3c30-4e2b-a80c-cbc7b74df03f} + + + {d603a623-132d-4304-ab03-638fc438f084} + + + {ed06dfcd-4b9f-41f7-8f25-1823c2398142} + + + + + + \ No newline at end of file diff --git a/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj.filters b/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj.filters new file mode 100644 index 0000000..afef69e --- /dev/null +++ b/pluginToolboxLibrary/pluginToolboxLibrary.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file