增加模拟强度工具
parent
32be3d8f48
commit
9fcc57b140
|
@ -3796,3 +3796,222 @@ void ResampleByReferenceRasterB(QString pszSrcFile, QString RefrasterBPath, QStr
|
|||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ResampleByReferenceRasterB(QString InrasterAPath, QString RefrasterBPath, QString OutrasterCPath) {
|
||||
// 注册所有GDAL驱动
|
||||
GDALAllRegister();
|
||||
|
||||
// 打开参考栅格B
|
||||
GDALDataset* refDS = (GDALDataset*)GDALOpen(RefrasterBPath.toUtf8().constData(), GA_ReadOnly);
|
||||
if (!refDS) {
|
||||
qDebug() << "无法打开参考栅格B:" << RefrasterBPath;
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取参考栅格的地理变换、投影和尺寸
|
||||
double geotransform[6];
|
||||
if (refDS->GetGeoTransform(geotransform) != CE_None) {
|
||||
qDebug() << "获取参考栅格的地理变换失败。";
|
||||
GDALClose(refDS);
|
||||
return;
|
||||
}
|
||||
|
||||
const char* proj = refDS->GetProjectionRef();
|
||||
int cols = refDS->GetRasterXSize();
|
||||
int rows = refDS->GetRasterYSize();
|
||||
GDALClose(refDS); // 获取信息后关闭参考栅格
|
||||
|
||||
// 打开输入栅格A
|
||||
GDALDataset* srcDS = (GDALDataset*)GDALOpen(InrasterAPath.toUtf8().constData(), GA_ReadOnly);
|
||||
if (!srcDS) {
|
||||
qDebug() << "无法打开输入栅格A:" << InrasterAPath;
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取输入栅格的波段数和数据类型
|
||||
int nBands = srcDS->GetRasterCount();
|
||||
if (nBands == 0) {
|
||||
qDebug() << "输入栅格没有波段数据。";
|
||||
GDALClose(srcDS);
|
||||
return;
|
||||
}
|
||||
GDALDataType dataType = srcDS->GetRasterBand(1)->GetRasterDataType();
|
||||
|
||||
// 创建输出栅格C
|
||||
GDALDriver* driver = GetGDALDriverManager()->GetDriverByName("GTiff");
|
||||
if (!driver) {
|
||||
qDebug() << "无法获取GeoTIFF驱动。";
|
||||
GDALClose(srcDS);
|
||||
return;
|
||||
}
|
||||
|
||||
GDALDataset* dstDS = driver->Create(
|
||||
OutrasterCPath.toUtf8().constData(),
|
||||
cols,
|
||||
rows,
|
||||
nBands,
|
||||
dataType,
|
||||
nullptr
|
||||
);
|
||||
if (!dstDS) {
|
||||
qDebug() << "无法创建输出栅格:" << OutrasterCPath;
|
||||
GDALClose(srcDS);
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置输出栅格的地理变换和投影
|
||||
dstDS->SetGeoTransform(geotransform);
|
||||
dstDS->SetProjection(proj);
|
||||
|
||||
// 配置GDAL Warp选项
|
||||
GDALWarpOptions* psWO = GDALCreateWarpOptions();
|
||||
psWO->hSrcDS = srcDS;
|
||||
psWO->hDstDS = dstDS;
|
||||
psWO->nBandCount = nBands;
|
||||
psWO->panSrcBands = (int*)CPLMalloc(nBands * sizeof(int));
|
||||
psWO->panDstBands = (int*)CPLMalloc(nBands * sizeof(int));
|
||||
for (int i = 0; i < nBands; ++i) {
|
||||
psWO->panSrcBands[i] = i + 1;
|
||||
psWO->panDstBands[i] = i + 1;
|
||||
}
|
||||
psWO->eResampleAlg = GRA_NearestNeighbour; // 使用最近邻重采样
|
||||
|
||||
// 初始化坐标转换器
|
||||
psWO->pfnTransformer = GDALGenImgProjTransform;
|
||||
psWO->pTransformerArg = GDALCreateGenImgProjTransformer(
|
||||
srcDS, GDALGetProjectionRef(srcDS),
|
||||
dstDS, GDALGetProjectionRef(dstDS),
|
||||
FALSE, 0.0, 1
|
||||
);
|
||||
if (!psWO->pTransformerArg) {
|
||||
qDebug() << "创建坐标转换器失败。";
|
||||
GDALDestroyWarpOptions(psWO);
|
||||
GDALClose(srcDS);
|
||||
GDALClose(dstDS);
|
||||
return;
|
||||
}
|
||||
|
||||
// 执行Warp操作
|
||||
GDALWarpOperation oWarp;
|
||||
if (oWarp.Initialize(psWO) != CE_None) {
|
||||
qDebug() << "初始化Warp操作失败。";
|
||||
GDALDestroyGenImgProjTransformer(psWO->pTransformerArg);
|
||||
GDALDestroyWarpOptions(psWO);
|
||||
GDALClose(srcDS);
|
||||
GDALClose(dstDS);
|
||||
return;
|
||||
}
|
||||
|
||||
CPLErr eErr = oWarp.ChunkAndWarpImage(0, 0, cols, rows);
|
||||
if (eErr != CE_None) {
|
||||
qDebug() << "执行Warp操作失败。";
|
||||
}
|
||||
|
||||
// 清理资源
|
||||
GDALDestroyGenImgProjTransformer(psWO->pTransformerArg);
|
||||
GDALDestroyWarpOptions(psWO);
|
||||
GDALClose(srcDS);
|
||||
GDALClose(dstDS);
|
||||
|
||||
qDebug() << "重采样完成,结果已保存至:" << OutrasterCPath;
|
||||
}
|
||||
|
||||
|
||||
void CreateSARIntensityByLookTable(QString IntensityRasterPath,
|
||||
QString LookTableRasterPath,
|
||||
QString SARIntensityPath,
|
||||
long min_rid, long max_rid,
|
||||
long min_cid, long max_cid)
|
||||
{
|
||||
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<int>(maxPixelsPerBlock / width);
|
||||
blockYSize = std::max(1, std::min(blockYSize, height));
|
||||
|
||||
// 输出矩阵初始化
|
||||
std::vector<double> sarData(rows_sar * cols_sar, 0.0);
|
||||
|
||||
// 分块处理
|
||||
for (int yOff = 0; yOff < height; yOff += blockYSize)
|
||||
{
|
||||
const int ySize = std::min(blockYSize, height - yOff);
|
||||
|
||||
// 读取行号列号数据
|
||||
std::vector<long> rData(width * ySize);
|
||||
std::vector<long> 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);
|
||||
|
||||
// 读取强度数据
|
||||
std::vector<float> intensity(width * ySize);
|
||||
intensityDS->GetRasterBand(1)->RasterIO(GF_Read, 0, yOff, width, ySize,
|
||||
intensity.data(), width, ySize, GDT_Float32, 0, 0);
|
||||
|
||||
// 处理当前块
|
||||
#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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 写入输出
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ void BASECONSTVARIABLEAPI testOutAmpArr(QString filename, double* amp, long row
|
|||
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);
|
||||
|
||||
|
||||
//--------------------- 图像文件读写 ------------------------------
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
#include "QCreateSARIntensityByLookTableDialog.h"
|
||||
#include "ui_QCreateSARIntensityByLookTableDialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
QCreateSARIntensityByLookTableDialog::QCreateSARIntensityByLookTableDialog(QWidget *parent)
|
||||
: QDialog(parent),ui(new Ui::QCreateSARIntensityByLookTableDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
connect(ui->dialogBtn, SIGNAL(accepted()), this, SLOT(ondialogBtnaccepted()));
|
||||
connect(ui->dialogBtn, SIGNAL(rejected()), this, SLOT(ondialogBtnrejected()));
|
||||
connect(ui->BtnInRaster, SIGNAL(clicked(bool)), this, SLOT(onBtnInRasterClicked(bool)));
|
||||
connect(ui->BtnOutRaster, SIGNAL(clicked(bool)), this, SLOT(onBtnOutRasterClicked(bool)));
|
||||
connect(ui->BtnRefRaster, SIGNAL(clicked(bool)), this, SLOT(onBtnRefRasterClicked(bool)));
|
||||
|
||||
}
|
||||
|
||||
QCreateSARIntensityByLookTableDialog::~QCreateSARIntensityByLookTableDialog()
|
||||
{}
|
||||
|
||||
|
||||
void QCreateSARIntensityByLookTableDialog::onBtnInRasterClicked(bool)
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->lineEditInRaster->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateSARIntensityByLookTableDialog::onBtnOutRasterClicked(bool)
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"保存影像"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->lineEditOutRaster->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateSARIntensityByLookTableDialog::onBtnRefRasterClicked(bool)
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择参考影像"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->lineEditRefRaster->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateSARIntensityByLookTableDialog::ondialogBtnaccepted()
|
||||
{
|
||||
QString inRasterPath = this->ui->lineEditInRaster->text();
|
||||
QString RefRasterPath = this->ui->lineEditRefRaster->text();
|
||||
QString OutRasterPath = this->ui->lineEditOutRaster->text();
|
||||
|
||||
long minRid = ui->spinBoxMinRid->value();
|
||||
long maxRid = ui->spinBoxMaxRid->value();
|
||||
long minCid = ui->spinBoxMinCid->value();
|
||||
long maxCid = ui->spinBoxMaxCid->value();
|
||||
|
||||
CreateSARIntensityByLookTable(inRasterPath, RefRasterPath, OutRasterPath,
|
||||
minRid, maxRid, minCid, maxCid);
|
||||
|
||||
//alignRaster(inRasterPath, RefRasterPath, OutRasterPath,GDALResampleAlg::GRA_Bilinear);
|
||||
|
||||
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"completed!!!"));
|
||||
}
|
||||
|
||||
void QCreateSARIntensityByLookTableDialog::ondialogBtnrejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class QCreateSARIntensityByLookTableDialogClass;
|
||||
};
|
||||
|
||||
class QCreateSARIntensityByLookTableDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCreateSARIntensityByLookTableDialog(QWidget *parent = nullptr);
|
||||
~QCreateSARIntensityByLookTableDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onBtnInRasterClicked(bool);
|
||||
void onBtnOutRasterClicked(bool);
|
||||
void onBtnRefRasterClicked(bool);
|
||||
void ondialogBtnaccepted();
|
||||
void ondialogBtnrejected();
|
||||
|
||||
|
||||
private:
|
||||
Ui::QCreateSARIntensityByLookTableDialogClass* ui;
|
||||
};
|
|
@ -0,0 +1,265 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QCreateSARIntensityByLookTableDialogClass</class>
|
||||
<widget class="QDialog" name="QCreateSARIntensityByLookTableDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QCreateSARIntensityByLookTableDialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="BtnInRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="SloperLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出影像:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输入影像:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditInRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查找表影像:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditRefRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditOutRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="BtnOutRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最小行号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最小列号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="BtnRefRaster">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最大行号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最大列号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxMinRid">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxMaxRid">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxMinCid">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxMaxCid">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>76</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogBtn">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -4,6 +4,7 @@
|
|||
#include "ToolBoxWidget.h"
|
||||
#include "QSimulationSARPolynomialOrbitModel.h"
|
||||
#include "QSimulationLookTableDialog.h"
|
||||
#include "QCreateSARIntensityByLookTableDialog.h"
|
||||
|
||||
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
||||
{
|
||||
|
@ -71,6 +72,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
|
|||
emit toolbox->addBoxToolItemSIGNAL(new SARSimulationTBPImageToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QSimulationSAROrbitModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new LookTableComputerClassToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateSARIntensityByLookTableToolButton(toolbox));
|
||||
|
||||
|
||||
|
||||
|
@ -91,4 +93,21 @@ void LookTableComputerClassToolButton::excute()
|
|||
{
|
||||
QSimulationLookTableDialog* dialog = new QSimulationLookTableDialog;
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
QCreateSARIntensityByLookTableToolButton::QCreateSARIntensityByLookTableToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"仿真工具库");
|
||||
this->toolname = QString(u8"生成模拟强度图");
|
||||
}
|
||||
|
||||
QCreateSARIntensityByLookTableToolButton::~QCreateSARIntensityByLookTableToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QCreateSARIntensityByLookTableToolButton::excute()
|
||||
{
|
||||
QCreateSARIntensityByLookTableDialog* dialog = new QCreateSARIntensityByLookTableDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -60,7 +60,16 @@ public slots:
|
|||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QCreateSARIntensityByLookTableToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QCreateSARIntensityByLookTableToolButton(QWidget* parent = nullptr);
|
||||
~QCreateSARIntensityByLookTableToolButton();
|
||||
public slots:
|
||||
|
||||
virtual void excute() override;
|
||||
|
||||
};
|
||||
|
||||
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="PowerSimulationIncoherent\OribtModelOperator.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QSimulationLookTableDialog.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp" />
|
||||
|
@ -130,6 +131,7 @@
|
|||
<CudaCompile Include="PowerSimulationIncoherent\LookTableSimulationComputer.cuh" />
|
||||
<ClInclude Include="PowerSimulationIncoherent\OribtModelOperator.h" />
|
||||
<QtMoc Include="PowerSimulationIncoherent\QSimulationLookTableDialog.h" />
|
||||
<QtMoc Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.h" />
|
||||
<ClInclude Include="SimulationSARToolAPI.h" />
|
||||
<ClInclude Include="simulationsartool_global.h" />
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
|
||||
|
@ -157,6 +159,7 @@
|
|||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cuh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QSimulationLookTableDialog.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.ui" />
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui" />
|
||||
|
|
|
@ -100,6 +100,9 @@
|
|||
<ClCompile Include="PowerSimulationIncoherent\QSimulationLookTableDialog.cpp">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.cpp">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
|
||||
|
@ -120,6 +123,9 @@
|
|||
<QtUic Include="PowerSimulationIncoherent\QSimulationLookTableDialog.ui">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.ui">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
|
||||
|
@ -143,6 +149,9 @@
|
|||
<QtMoc Include="PowerSimulationIncoherent\QSimulationLookTableDialog.h">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.h">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
||||
|
|
Loading…
Reference in New Issue