强度模拟增加了进度条显示
parent
9fcc57b140
commit
45dd2e1246
|
|
@ -3922,7 +3922,9 @@ void CreateSARIntensityByLookTable(QString IntensityRasterPath,
|
||||||
QString LookTableRasterPath,
|
QString LookTableRasterPath,
|
||||||
QString SARIntensityPath,
|
QString SARIntensityPath,
|
||||||
long min_rid, long max_rid,
|
long min_rid, long max_rid,
|
||||||
long min_cid, long max_cid)
|
long min_cid, long max_cid,
|
||||||
|
std::function<void(long, long)> processBarShow
|
||||||
|
)
|
||||||
{
|
{
|
||||||
GDALAllRegister();
|
GDALAllRegister();
|
||||||
constexpr size_t GB4 = size_t(1) * 1024 * 1024 * 1024; // 4GB in bytes
|
constexpr size_t GB4 = size_t(1) * 1024 * 1024 * 1024; // 4GB in bytes
|
||||||
|
|
@ -3964,7 +3966,7 @@ void CreateSARIntensityByLookTable(QString IntensityRasterPath,
|
||||||
for (int yOff = 0; yOff < height; yOff += blockYSize)
|
for (int yOff = 0; yOff < height; yOff += blockYSize)
|
||||||
{
|
{
|
||||||
const int ySize = std::min(blockYSize, height - yOff);
|
const int ySize = std::min(blockYSize, height - yOff);
|
||||||
|
|
||||||
// 读取行号列号数据
|
// 读取行号列号数据
|
||||||
std::vector<long> rData(width * ySize);
|
std::vector<long> rData(width * ySize);
|
||||||
std::vector<long> cData(width * ySize);
|
std::vector<long> cData(width * ySize);
|
||||||
|
|
@ -3994,6 +3996,10 @@ void CreateSARIntensityByLookTable(QString IntensityRasterPath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (processBarShow) {
|
||||||
|
processBarShow(yOff, height);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入输出
|
// 写入输出
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include "LogInfoCls.h"
|
#include "LogInfoCls.h"
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
enum ProjectStripDelta {
|
enum ProjectStripDelta {
|
||||||
Strip_6, // 6度带
|
Strip_6, // 6度带
|
||||||
|
|
@ -301,7 +302,7 @@ void BASECONSTVARIABLEAPI testOutAmpArr(QString filename, double* amp, long row
|
||||||
void BASECONSTVARIABLEAPI testOutClsArr(QString filename, long* amp, long rowcount, long colcount);
|
void BASECONSTVARIABLEAPI testOutClsArr(QString filename, long* amp, long rowcount, long colcount);
|
||||||
|
|
||||||
|
|
||||||
void BASECONSTVARIABLEAPI CreateSARIntensityByLookTable(QString IntensityRasterPath, QString LookTableRasterPath, QString SARIntensityPath, long min_rid, long max_rid, long min_cid, long max_cid);
|
void BASECONSTVARIABLEAPI CreateSARIntensityByLookTable(QString IntensityRasterPath, QString LookTableRasterPath, QString SARIntensityPath, long min_rid, long max_rid, long min_cid, long max_cid, std::function<void(long, long)> processBarShow = {});
|
||||||
|
|
||||||
|
|
||||||
//--------------------- 图像文件读写 ------------------------------
|
//--------------------- 图像文件读写 ------------------------------
|
||||||
|
|
|
||||||
|
|
@ -90,14 +90,13 @@ void QCreateSARIntensityByLookTableDialog::ondialogBtnaccepted()
|
||||||
long maxRid = ui->spinBoxMaxRid->value();
|
long maxRid = ui->spinBoxMaxRid->value();
|
||||||
long minCid = ui->spinBoxMinCid->value();
|
long minCid = ui->spinBoxMinCid->value();
|
||||||
long maxCid = ui->spinBoxMaxCid->value();
|
long maxCid = ui->spinBoxMaxCid->value();
|
||||||
|
this->ui->progressBar->setValue(0);
|
||||||
|
auto func = [this](long v, long maxv) { this->showPrcess(v, maxv); }; // 调用函数
|
||||||
CreateSARIntensityByLookTable(inRasterPath, RefRasterPath, OutRasterPath,
|
CreateSARIntensityByLookTable(inRasterPath, RefRasterPath, OutRasterPath,
|
||||||
minRid, maxRid, minCid, maxCid);
|
minRid, maxRid, minCid, maxCid, func);
|
||||||
|
|
||||||
//alignRaster(inRasterPath, RefRasterPath, OutRasterPath,GDALResampleAlg::GRA_Bilinear);
|
//alignRaster(inRasterPath, RefRasterPath, OutRasterPath,GDALResampleAlg::GRA_Bilinear);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QMessageBox::information(this, tr(u8"Ìáʾ"), tr(u8"completed!!!"));
|
QMessageBox::information(this, tr(u8"Ìáʾ"), tr(u8"completed!!!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,3 +104,9 @@ void QCreateSARIntensityByLookTableDialog::ondialogBtnrejected()
|
||||||
{
|
{
|
||||||
this->close();
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QCreateSARIntensityByLookTableDialog::showPrcess(long v, long maxv)
|
||||||
|
{
|
||||||
|
this->ui->progressBar->setMaximum(maxv);
|
||||||
|
this->ui->progressBar->setValue(v);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public slots:
|
||||||
void ondialogBtnaccepted();
|
void ondialogBtnaccepted();
|
||||||
void ondialogBtnrejected();
|
void ondialogBtnrejected();
|
||||||
|
|
||||||
|
void showPrcess(long v, long maxv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::QCreateSARIntensityByLookTableDialogClass* ui;
|
Ui::QCreateSARIntensityByLookTableDialogClass* ui;
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>76</height>
|
<height>50</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
|
@ -250,6 +250,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="value">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="dialogBtn">
|
<widget class="QDialogButtonBox" name="dialogBtn">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue