diff --git a/.gitignore b/.gitignore
index 046dd6f..233b589 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,6 +101,7 @@ StyleCopReport.xml
**.tlog
*.tlog
*.idb
+*.sqlite
# Chutzpah Test files
_Chutzpah*
diff --git a/BaseCommonLibrary/BaseTool/BaseConstVariable.h b/BaseCommonLibrary/BaseTool/BaseConstVariable.h
index 67114db..a9d8a44 100644
--- a/BaseCommonLibrary/BaseTool/BaseConstVariable.h
+++ b/BaseCommonLibrary/BaseTool/BaseConstVariable.h
@@ -357,5 +357,4 @@ inline void releaseVoidArray(void* a)
};
-
#endif
\ No newline at end of file
diff --git a/BaseCommonLibrary/BaseTool/GeoOperator.cpp b/BaseCommonLibrary/BaseTool/GeoOperator.cpp
index ce49a3e..33f585b 100644
--- a/BaseCommonLibrary/BaseTool/GeoOperator.cpp
+++ b/BaseCommonLibrary/BaseTool/GeoOperator.cpp
@@ -225,6 +225,17 @@ double operator /(Point3 a, Point3 b)
return sqrt(pow(a.x, 2) + pow(a.y, 2)) / sqrt(pow(b.x, 2) + pow(b.y, 2));
}
+double BASECONSTVARIABLEAPI getPixelSpacingInDegree(double pixelSpacingInMeter)
+{
+ return pixelSpacingInMeter / WGS84_A * r2d;
+
+}
+
+double BASECONSTVARIABLEAPI getPixelSpacingInMeter(double pixelSpacingInDegree)
+{
+ return pixelSpacingInDegree * WGS84_A * r2d;
+}
+
Landpoint getSlopeVector(const Landpoint& p0, const Landpoint& p1, const Landpoint& p2, const Landpoint& p3, const Landpoint& p4,bool inLBH) {
Landpoint n0, n1, n2, n3, n4;
diff --git a/BaseCommonLibrary/BaseTool/GeoOperator.h b/BaseCommonLibrary/BaseTool/GeoOperator.h
index 66ce525..bd0125d 100644
--- a/BaseCommonLibrary/BaseTool/GeoOperator.h
+++ b/BaseCommonLibrary/BaseTool/GeoOperator.h
@@ -23,6 +23,9 @@ Landpoint BASECONSTVARIABLEAPI LLA2XYZ(const Landpoint& LLA);
void BASECONSTVARIABLEAPI LLA2XYZ(const Landpoint& LLA,Point3& XYZ);
Eigen::MatrixXd BASECONSTVARIABLEAPI LLA2XYZ(Eigen::MatrixXd landpoint);
+double BASECONSTVARIABLEAPI getPixelSpacingInDegree(double pixelSpacingInMeter);
+
+double BASECONSTVARIABLEAPI getPixelSpacingInMeter(double pixelSpacingInDegree);
///
/// 将地固参心坐标系转换为经纬度
///
diff --git a/BaseCommonLibrary/BaseTool/ImageOperatorBase.h b/BaseCommonLibrary/BaseTool/ImageOperatorBase.h
index b16127d..3af8396 100644
--- a/BaseCommonLibrary/BaseTool/ImageOperatorBase.h
+++ b/BaseCommonLibrary/BaseTool/ImageOperatorBase.h
@@ -357,17 +357,20 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
rows_count = start_row + rows_count <= imgds.height ? rows_count : imgds.height - start_row;
cols_count = start_col + cols_count <= imgds.width ? cols_count : imgds.width - start_col;
+ int64_t pixel_count64 = static_cast(rows_count)* static_cast(cols_count);
+
+
//Eigen::MatrixXd datamatrix(rows_count, cols_count);
if (gdal_datatype == GDT_Byte) {
- char* temp = new char[rows_count * cols_count];
+ char* temp = new char[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -376,14 +379,14 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
else if (gdal_datatype == GDT_UInt16) {
- unsigned short* temp = new unsigned short[rows_count * cols_count];
+ unsigned short* temp = new unsigned short[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -391,14 +394,14 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
else if (gdal_datatype == GDT_Int16) {
- short* temp = new short[rows_count * cols_count];
+ short* temp = new short[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -406,14 +409,14 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
else if (gdal_datatype == GDT_UInt32) {
- unsigned int* temp = new unsigned int[rows_count * cols_count];
+ unsigned int* temp = new unsigned int[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -421,14 +424,14 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
else if (gdal_datatype == GDT_Int32) {
- int* temp = new int[rows_count * cols_count];
+ int* temp = new int[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -436,7 +439,7 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
// else if (gdal_datatype == GDT_UInt64) {
- // unsigned long* temp = new unsigned long[rows_count * cols_count];
+ // unsigned long* temp = new unsigned long[pixel_count64];
// demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count,
//rows_count, gdal_datatype, 0, 0); for (int i = 0; i < rows_count; i++) { for (int j = 0; j <
//cols_count; j++) { datamatrix(i, j) = temp[i * cols_count + j];
@@ -445,7 +448,7 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
// delete[] temp;
// }
// else if (gdal_datatype == GDT_Int64) {
- // long* temp = new long[rows_count * cols_count];
+ // long* temp = new long[pixel_count64];
// demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count,
//rows_count, gdal_datatype, 0, 0); for (int i = 0; i < rows_count; i++) { for (int j = 0; j <
//cols_count; j++) { datamatrix(i, j) = temp[i * cols_count + j];
@@ -454,15 +457,15 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
// delete[] temp;
// }
else if (gdal_datatype == GDT_Float32) {
- float* temp = new float[rows_count * cols_count];
+ float* temp = new float[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -470,15 +473,15 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
delete[] temp;
}
else if (gdal_datatype == GDT_Float64) {
- double* temp = new double[rows_count * cols_count];
+ double* temp = new double[pixel_count64];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i]);
}
@@ -487,15 +490,15 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
}
//else if (gdal_datatype == GDT_CFloat32) {
// if (std::is_same>::value || std::is_same>::value) {
- // float* temp = new float[rows_count * cols_count * 2];
+ // float* temp = new float[pixel_count64 * 2];
// demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- // result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ // result = std::shared_ptr(new T[pixel_count64], delArrPtr);
// if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- // std::memcpy(result.get(), temp, rows_count * cols_count);
+ // std::memcpy(result.get(), temp, pixel_count64);
// }
// else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- // long count = rows_count * cols_count;
+ // long count = pixel_count64;
// for (long i = 0; i < count; i++) {
// result.get()[i] = T(temp[i * 2],
// temp[i * 2 + 1]);
@@ -509,15 +512,15 @@ inline std::shared_ptr readDataArr(gdalImage& imgds, long start_row, long sta
//}
//else if (gdal_datatype == GDT_CFloat64 ) {
// if (std::is_same>::value || std::is_same>::value) {
- // double* temp = new double[rows_count * cols_count * 2];
+ // double* temp = new double[pixel_count64 * 2];
// demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- // result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ // result = std::shared_ptr(new T[pixel_count64], delArrPtr);
// if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- // std::memcpy(result.get(), temp, rows_count * cols_count);
+ // std::memcpy(result.get(), temp, pixel_count64);
// }
// else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- // long count = rows_count * cols_count;
+ // long count = pixel_count64;
// for (long i = 0; i < count; i++) {
// result.get()[i] = T(temp[i * 2],
// temp[i * 2 + 1]);
@@ -556,19 +559,21 @@ inline std::shared_ptr readDataArrComplex(gdalImageComplex& imgds, long start
rows_count = start_row + rows_count <= imgds.height ? rows_count : imgds.height - start_row;
cols_count = start_col + cols_count <= imgds.width ? cols_count : imgds.width - start_col;
+ int64_t pixel_count64 = static_cast(rows_count) * static_cast(cols_count);
+
//Eigen::MatrixXd datamatrix(rows_count, cols_count);
if (gdal_datatype == GDT_CFloat32) {
if (std::is_same>::value || std::is_same>::value) {
- float* temp = new float[rows_count * cols_count * 2];
+ float* temp = new float[pixel_count64 * 2];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i * 2],
temp[i * 2 + 1]);
@@ -582,15 +587,15 @@ inline std::shared_ptr readDataArrComplex(gdalImageComplex& imgds, long start
}
else if (gdal_datatype == GDT_CFloat64) {
if (std::is_same>::value || std::is_same>::value) {
- double* temp = new double[rows_count * cols_count * 2];
+ double* temp = new double[pixel_count64 * 2];
demBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, temp, cols_count, rows_count, gdal_datatype, 0, 0);
- result = std::shared_ptr(new T[rows_count * cols_count], delArrPtr);
+ result = std::shared_ptr(new T[pixel_count64], delArrPtr);
if (method == GDALREADARRCOPYMETHOD::MEMCPYMETHOD) {
- std::memcpy(result.get(), temp, rows_count * cols_count);
+ std::memcpy(result.get(), temp, pixel_count64);
}
else if (method == GDALREADARRCOPYMETHOD::VARIABLEMETHOD) {
- long count = rows_count * cols_count;
+ long count = pixel_count64;
for (long i = 0; i < count; i++) {
result.get()[i] = T(temp[i * 2],
temp[i * 2 + 1]);
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.cpp b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.cpp
new file mode 100644
index 0000000..3377076
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.cpp
@@ -0,0 +1,123 @@
+#include "GF3CalibrationAndOrthLib.h"
+#include "BaseConstVariable.h"
+#include "RasterToolBase.h"
+#include "ImageOperatorBase.h"
+#include
+#include
+#include
+#include "FileOperator.h"
+#include "GPUBaseTool.h"
+#include "GPUTool.cuh"
+
+
+GF3CALIBRATIONANDORTHLIB_EXPORT int GF3_Sigma0_HH2VV(QString in_SigmaHHRasterPath, QString in_IncidencAngleRasterPath, QString out_SigmaVVRasterPath)
+{
+ // step 1 Ϸ
+ {
+ // 1. Ϸ
+ if (in_SigmaHHRasterPath.isEmpty() || in_IncidencAngleRasterPath.isEmpty() || out_SigmaVVRasterPath.isEmpty())
+ {
+ qDebug() << "Input or output file path is empty.";
+ throw std::invalid_argument("Input or output file path is empty.");
+ return 1; // ļ·Ϊ
+ }
+ // 2. ӰǷ
+ if (!QFile::exists(in_SigmaHHRasterPath) || !QFile::exists(in_IncidencAngleRasterPath))
+ {
+ qDebug() << "Input file does not exist.";
+ throw std::runtime_error("Input file does not exist.");
+ return 2; // ļ
+ }
+ gdalImage inSigmaHHRaster(in_SigmaHHRasterPath);
+ gdalImage inIncidencAngleRaster(in_IncidencAngleRasterPath);
+ // 3. ӰСǷһ
+ if (inSigmaHHRaster.width != inIncidencAngleRaster.width || inSigmaHHRaster.height != inIncidencAngleRaster.height)
+ {
+ qDebug() << "Input images have different sizes.";
+ throw std::runtime_error("Input images have different sizes.");
+ return 3; // ӰСһ
+ }
+
+ // ļļ
+ copyFile(in_SigmaHHRasterPath, out_SigmaVVRasterPath);
+ // 4. ļǷ
+ if (!QFile::exists(out_SigmaVVRasterPath))
+ {
+ qDebug() << "Output file does not exist.";
+ throw std::runtime_error("Output file does not exist.");
+ return 4; // ļ
+ }
+ }
+
+ // step 2 ִв
+ {
+ gdalImage inSigmaHHRaster(in_SigmaHHRasterPath);
+ gdalImage inIncidencAngleRaster(in_IncidencAngleRasterPath);
+ gdalImage outSigmaVVRaster(out_SigmaVVRasterPath);
+
+ long width = inSigmaHHRaster.width;
+ long height = inSigmaHHRaster.height;
+
+ int64_t pixel_count64 = static_cast(height) * static_cast(width);
+ // ȡӰ
+ std::shared_ptr sigmaHHRasterData = readDataArr(inSigmaHHRaster, 0, 0, height, width, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
+ std::shared_ptr incidenceAngleData = readDataArr(inIncidencAngleRaster, 0, 0, height, width, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
+ std::shared_ptr outSigmaVVRasterData = readDataArr(outSigmaVVRaster, 0, 0, height, width, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
+
+ // ִֿ
+ int64_t block_count = Memory1MB / 8 * 500; // 500Mڴ ΪݷֿС
+
+ // ڴ
+
+ //double* sigmaHHRasterDataPtr_H = (double*)mallocCUDAHost(sizeof(double) * block_count); // ڴ
+ double* sigmaHHRasterDataPtr_D = (double*)mallocCUDADevice(sizeof(double) * block_count);// 豸ڴ
+
+ //double* incidenceAngleDataPtr_H = (double*)mallocCUDAHost(sizeof(double) * block_count); // ڴ
+ double* incidenceAngleDataPtr_D = (double*)mallocCUDADevice(sizeof(double) * block_count);// 豸ڴ
+
+ //double* outSigmaVVRasterDataPtr_H = (double*)mallocCUDAHost(sizeof(double) * block_count); // ڴ
+ double* outSigmaVVRasterDataPtr_D = (double*)mallocCUDADevice(sizeof(double) * block_count);// 豸ڴ
+
+ for (int64_t i = 0; i < pixel_count64; i += block_count)
+ {
+ int64_t block_size = (i + block_count) > pixel_count64 ? pixel_count64 - i : block_count;
+ //ڴ濽 ڴ浽ֿڴ
+ HostToDevice(sigmaHHRasterDataPtr_D, sigmaHHRasterData.get() + i, sizeof(double) * block_size);
+ HostToDevice(incidenceAngleDataPtr_D, incidenceAngleData.get() + i, sizeof(double) * block_size);
+ // ִGPU
+
+
+
+
+
+ // 豸ڴ浽ڴ
+ DeviceToHost(outSigmaVVRasterDataPtr_D, outSigmaVVRasterData.get() + i, sizeof(double) * block_size);
+
+ }
+
+
+
+
+ // ǿͷڴ
+
+ FreeCUDADevice(sigmaHHRasterDataPtr_D);
+ //FreeCUDAHost(sigmaHHRasterDataPtr_H);
+ FreeCUDADevice(incidenceAngleDataPtr_D);
+ //FreeCUDAHost(incidenceAngleDataPtr_H);
+ FreeCUDADevice(outSigmaVVRasterDataPtr_D);
+ //FreeCUDAHost(outSigmaVVRasterDataPtr_H);
+
+ sigmaHHRasterData.reset();
+ incidenceAngleData.reset();
+ outSigmaVVRasterData.reset();
+
+ }
+
+
+
+
+
+
+
+ return -1;// ִгɹ
+}
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.h b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.h
new file mode 100644
index 0000000..578f899
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.h
@@ -0,0 +1,38 @@
+#pragma once
+/**
+* GF3ӰļУ䴦ݿ
+* @file GF3CalibrationAndOrthLib.h
+* @brief GF3ӰУ䴦ݿ
+* @details
+* GF3ӰļУ䴦ҪHH->VVתӰļУ䴦ȡ
+* ʵֻGF3ӰļУ䴦㷨ʵϸοס
+* @author
+*/
+#ifndef __GF3CALIBRATIONANDORTHLIB__H__
+#define __GF3CALIBRATIONANDORTHLIB__H__
+#include "gf3calibrationandorthlib_global.h"
+#include
+
+
+
+///
+/// HH״ɢϵתΪVV״ɢϵ
+///
+///
+///
+///
+///
+///
+extern "C" GF3CALIBRATIONANDORTHLIB_EXPORT int GF3_Sigma0_HH2VV(QString in_SigmaHHRasterPath,QString in_IncidencAngleRasterPath,QString out_SigmaVVRasterPath);
+
+
+
+
+
+
+#endif
+
+
+
+
+
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj
new file mode 100644
index 0000000..1dd7d0f
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj
@@ -0,0 +1,124 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}
+ QtVS_v304
+ 10.0
+ 10.0
+ $(MSBuildProjectDirectory)\QtMsBuild
+
+
+
+ DynamicLibrary
+ v143
+ true
+ Unicode
+
+
+ DynamicLibrary
+ v143
+ false
+ true
+ Unicode
+
+
+
+
+
+
+ tools_qt5
+ core
+ debug
+
+
+ tools_qt5
+ core
+ release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .;..\GPUBaseLib\GPUTool;..\GPUBaseLib;..\BaseCommonLibrary\ToolAbstract;..\BaseCommonLibrary\BaseTool;..\BaseCommonLibrary;$(IncludePath)
+
+
+
+ true
+ GF3CALIBRATIONANDORTHLIB_LIB;%(PreprocessorDefinitions)
+ Level3
+ true
+ true
+
+
+ Windows
+ true
+
+
+
+
+ true
+ GF3CALIBRATIONANDORTHLIB_LIB;%(PreprocessorDefinitions)
+ Level3
+ true
+ true
+ true
+ true
+
+
+ Windows
+ false
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ {872ecd6f-30e3-4a1b-b17c-15e87d373ff6}
+
+
+ {b8b40c54-f7fe-4809-b6fb-8bc014570d7b}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters
new file mode 100644
index 0000000..73024af
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters
@@ -0,0 +1,43 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
+ ui
+
+
+ {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
+ ts
+
+
+
+
+ Header Files
+
+
+ Source Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationGecodingBaseFuntion.h b/GF3CalibrationAndOrthLib/GF3CalibrationGecodingBaseFuntion.h
new file mode 100644
index 0000000..07db6ac
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationGecodingBaseFuntion.h
@@ -0,0 +1,9 @@
+#pragma once
+#ifndef __GF3CALIBRATIONGECODINGBASEFUNTION__H__
+#define __GF3CALIBRATIONGECODINGBASEFUNTION__H__
+#include "gf3calibrationandorthlib_global.h"
+#include "BaseConstVariable.h"
+
+
+
+#endif // __GF3CALIBRATIONGECODINGBASEFUNTION__H__
\ No newline at end of file
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cu b/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cu
new file mode 100644
index 0000000..06c8b1e
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cu
@@ -0,0 +1,93 @@
+#include "GF3CalibrationGeoCodingFunCUDA.cuh"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "BaseConstVariable.h"
+#include "GPUTool.cuh"
+
+
+__device__ __host__ float Computrer_polartionConver_rpol_f(float inangle, float alpha)
+{
+ float tang = 0.0;
+ if (inangle <= 0.0) {
+ tang = 0.0;
+ }
+ else if (inangle > 90.0) {
+ tang = 90.0;
+ }
+ else {
+ tang = inangle;
+ }
+ tang = tang * PI / 180.0;
+ float tan_val = tanf(tang);
+ float rpol = powf((1.0 + 2.0 * tan_val * tan_val), 2) / powf((1.0 + alpha * tan_val * tan_val), 2);
+ return rpol;
+}
+
+__device__ __host__ double Computrer_polartionConver_rpol_d(double inangle, double alpha)
+{
+ double tang = 0.0;
+ if (inangle <= 0.0) {
+ tang = 0.0;
+ }
+ else if (inangle > 90.0) {
+ tang = 90.0;
+ }
+ else {
+ tang = inangle;
+ }
+ tang = tang * PI / 180.0;
+ double tan_val = tan(tang);
+ double rpol = pow((1.0 + 2.0 * tan_val * tan_val), 2) / pow((1.0 + alpha * tan_val * tan_val), 2);
+ return rpol;
+}
+
+__host__ __device__ float polartionConver_f(float insig, float inangle, float alpha = 1.0, bool isvv = true)
+{
+ float rpol = Computrer_polartionConver_rpol_f(inangle, alpha);
+
+ // dBת
+ float insig_linear = powf(10.0, insig / 10.0);
+ float osig = 0.0;
+ if (isvv) { // C: VV->HH
+ osig = insig_linear * rpol;
+ // ֵ
+ return osig;
+ }
+ else { // L: HH->VV
+ osig = insig_linear / rpol;
+ // dBֵ
+ return 10.0 * log10f(osig);
+ }
+}
+
+
+
+__host__ __device__ double polartionConver_d(double insig, double inangle, double alpha = 1.0, bool isvv = true)
+{
+ double rpol = Computrer_polartionConver_rpol_d(inangle, alpha);
+
+ // dBת
+ double insig_linear = pow(10.0, insig / 10.0);
+ double osig = 0.0;
+ if (isvv) { // C: VV->HH
+ osig = insig_linear * rpol;
+ // ֵ
+ return osig;
+ } else { // L: HH->VV
+ osig = insig_linear / rpol;
+ // dBֵ
+ return 10.0 * log10(osig);
+ }
+}
+
+
+
+
diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cuh b/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cuh
new file mode 100644
index 0000000..b29228d
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunCUDA.cuh
@@ -0,0 +1,54 @@
+#ifndef __GF3CALIBRATIONGEOCODINGFUNCUDA__H__
+#define __GF3CALIBRATIONGEOCODINGFUNCUDA__H__
+#include "gf3calibrationandorthlib_global.h"
+
+
+#include "BaseConstVariable.h"
+#include "GPUTool.cuh"
+#include
+#include
+#include
+#include
+
+///
+/// 㼫תϵfloat
+///
+///
+/// ת
+///
+extern __device__ __host__ float Computrer_polartionConver_rpol_f(float inangle, float alpha = 1);
+
+///
+/// 㼫תϵ (double)
+///
+///
+/// ת
+///
+extern __device__ __host__ double Computrer_polartionConver_rpol_d(double inangle, double alpha = 1);
+
+///
+/// ɢϵ任
+///
+/// sigma0 (dB)
+/// ()
+/// Ĭ1ģͣ0.6Ϊķɭ
+/// trueʾΪVVfalseΪHH
+///
+extern __host__ __device__ double polartionConver_d(double insig, double inangle, double alpha = 1.0, bool isvv = true);
+
+///
+/// ɢϵ任
+///
+/// sigma0 (dB)
+/// ()
+/// Ĭ1ģͣ0.6Ϊķɭ
+/// trueʾΪVVfalseΪHH
+///
+extern __host__ __device__ float polartionConver_f(float insig, float inangle, float alpha = 1.0, bool isvv = true);
+
+
+
+
+
+#endif
+
diff --git a/GF3CalibrationAndOrthLib/gf3calibrationandorthlib_global.h b/GF3CalibrationAndOrthLib/gf3calibrationandorthlib_global.h
new file mode 100644
index 0000000..d28cac9
--- /dev/null
+++ b/GF3CalibrationAndOrthLib/gf3calibrationandorthlib_global.h
@@ -0,0 +1,14 @@
+#pragma once
+#ifndef __GF3CALIBRATIONANDORTHLIB_GLOBAL_H__
+#define __GF3CALIBRATIONANDORTHLIB_GLOBAL_H__
+#include
+
+
+#ifdef GF3CALIBRATIONANDORTHLIB_LIB
+#define GF3CALIBRATIONANDORTHLIB_EXPORT __declspec(dllexport)
+#else
+#define GF3CALIBRATIONANDORTHLIB_EXPORT __declspec(dllimport)
+#endif
+
+
+#endif// __GF3CALIBRATIONANDORTHLIB_GLOBAL_H__
\ No newline at end of file
diff --git a/GF3StripPatchProcess/GF3RDZProcess.cu b/GF3StripPatchProcess/GF3RDZProcess.cu
new file mode 100644
index 0000000..e69de29
diff --git a/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj b/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj
new file mode 100644
index 0000000..678b921
--- /dev/null
+++ b/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj
@@ -0,0 +1,111 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {6386D3E3-B743-419F-8354-DA48D0B08728}
+ QtVS_v304
+ 10.0
+ 10.0
+ $(MSBuildProjectDirectory)\QtMsBuild
+
+
+
+ Application
+ v143
+ true
+ Unicode
+
+
+ Application
+ v143
+ false
+ true
+ Unicode
+
+
+
+
+
+
+ tools_qt5
+ core
+ debug
+
+
+ tools_qt5
+ core
+ release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cufft.lib;cudart.lib;cudadevrt.lib;%(AdditionalDependencies)
+
+
+
+
+ true
+ Level3
+ true
+ true
+
+
+ Console
+ true
+
+
+
+
+ true
+ Level3
+ true
+ true
+ true
+ true
+
+
+ Console
+ false
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj.filters b/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj.filters
new file mode 100644
index 0000000..a6c33a5
--- /dev/null
+++ b/GF3StripPatchProcess/GF3StripPatchProcess.vcxproj.filters
@@ -0,0 +1,38 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
+ ui
+
+
+ {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
+ ts
+
+
+ {da979fa3-1a37-4b67-aaf3-148de4a4c027}
+
+
+
+
+ Source Files
+
+
+
+
+ GPULib
+
+
+
\ No newline at end of file
diff --git a/GF3StripPatchProcess/main.cpp b/GF3StripPatchProcess/main.cpp
new file mode 100644
index 0000000..3b390a8
--- /dev/null
+++ b/GF3StripPatchProcess/main.cpp
@@ -0,0 +1,24 @@
+/**
+* @file GF3StripPatchProcess/main.cpp
+* @brief Main entry point for the GF3 Strip Patch Process application.
+* @details GF3Ӱ
+* @author (3045316072@qq.com)
+* @date 2025-05-12
+* @version 1.0
+*/
+#include
+
+
+
+
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+
+
+
+
+ return a.exec();
+}
diff --git a/LAMPDataProcess.sln b/LAMPDataProcess.sln
index 0559e59..b829429 100644
--- a/LAMPDataProcess.sln
+++ b/LAMPDataProcess.sln
@@ -42,6 +42,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pluginToolboxLibrary", "plu
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPG4Tool", "SPG4Tool\SPG4Tool.vcxproj", "{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KJ135WBJYAlgInterfaceToolbox", "Toolbox\KJ135WBJYAlgInterfaceToolbox\KJ135WBJYAlgInterfaceToolbox.vcxproj", "{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GF3StripPatchProcess", "GF3StripPatchProcess\GF3StripPatchProcess.vcxproj", "{6386D3E3-B743-419F-8354-DA48D0B08728}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GF3CalibrationAndOrthLib", "GF3CalibrationAndOrthLib\GF3CalibrationAndOrthLib.vcxproj", "{886F7829-AF74-4F23-B3BE-29B7B3C9843C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@@ -196,6 +202,42 @@ 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
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|ARM.ActiveCfg = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|ARM.Build.0 = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x64.ActiveCfg = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x64.Build.0 = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x86.ActiveCfg = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x86.Build.0 = Debug|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|ARM.ActiveCfg = Release|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|ARM.Build.0 = Release|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x64.ActiveCfg = Release|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x64.Build.0 = Release|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x86.ActiveCfg = Release|x64
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x86.Build.0 = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|ARM.ActiveCfg = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|ARM.Build.0 = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|x64.ActiveCfg = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|x64.Build.0 = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|x86.ActiveCfg = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Debug|x86.Build.0 = Debug|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|ARM.ActiveCfg = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|ARM.Build.0 = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|x64.ActiveCfg = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|x64.Build.0 = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|x86.ActiveCfg = Release|x64
+ {6386D3E3-B743-419F-8354-DA48D0B08728}.Release|x86.Build.0 = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|ARM.ActiveCfg = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|ARM.Build.0 = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|x64.ActiveCfg = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|x64.Build.0 = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|x86.ActiveCfg = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Debug|x86.Build.0 = Debug|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|ARM.ActiveCfg = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|ARM.Build.0 = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|x64.ActiveCfg = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|x64.Build.0 = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|x86.ActiveCfg = Release|x64
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +252,8 @@ Global
{E56B3878-A3DC-41A4-ABF3-B628816D0D64} = {6505E2BA-06A2-447B-BC85-8CF1A81359BC}
{8C8CA066-A93A-4098-9A46-B855EFEAADF2} = {2768F9D6-D410-4E88-A479-8336DAF97072}
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E} = {2768F9D6-D410-4E88-A479-8336DAF97072}
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8} = {41B1F23D-9119-47A7-B102-34022AF83CDA}
+ {886F7829-AF74-4F23-B3BE-29B7B3C9843C} = {2768F9D6-D410-4E88-A479-8336DAF97072}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {179F0A62-C631-4667-AD03-3780ADE09F41}
diff --git a/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj b/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj
index b979ef0..44e520b 100644
--- a/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj
+++ b/LAMPDataProcessEXE/LAMPDataProcessEXE.vcxproj
@@ -196,9 +196,6 @@
{b8b40c54-f7fe-4809-b6fb-8bc014570d7b}
-
- {667625a5-8de2-4373-99f0-8bad2cced011}
-
{e56b3878-a3dc-41a4-abf3-b628816d0d64}
diff --git a/LAMPDataProcessEXE/LAMPMainWidget.sqlite b/LAMPDataProcessEXE/LAMPMainWidget.sqlite
deleted file mode 100644
index 863f286..0000000
Binary files a/LAMPDataProcessEXE/LAMPMainWidget.sqlite and /dev/null differ
diff --git a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp
index 28210ff..55a4491 100644
--- a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp
+++ b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp
@@ -90,6 +90,9 @@ namespace LAMPMainWidget {
}
void RasterMainWidget::setupWindow() {
+ //mMapglWidget = new QOpenGLWidget(mMapConvas); // 使用OpenGL渲染
+ //mMapConvas->setViewport(mMapglWidget);
+ //mMapConvas->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
mUi->mapCanvasLayout->addWidget(mMapConvas);
//setFixedSize(size());
//setWindowFlags(windowFlags() | Qt::WindowMinMaxButtonsHint | Qt::WindowSystemMenuHint);
diff --git a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h
index 48b7e49..b496804 100644
--- a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h
+++ b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -76,6 +77,9 @@ namespace LAMPMainWidget {
private:
Ui::RasterMainWidget* mUi;
MapCanvas* mMapConvas;//地图容器
+ QOpenGLWidget* mMapglWidget;// OpenGL窗口
+
+
QLineEdit* mScaleText;
QLabel* mScaleLabel;
QLineEdit* mCenterText;
diff --git a/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp b/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp
index d045371..184de1f 100644
--- a/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp
+++ b/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp
@@ -32,7 +32,7 @@ namespace RasterMessageShow {
this->textBrowserMessage->append(Message);
this->textBrowserMessage->moveCursor(QTextCursor::MoveOperation::End);
this->textBrowserMessage->repaint();
- std::cout << Message.toLocal8Bit().constData() << std::endl;
+ //std::cout << Message.toLocal8Bit().constData() << std::endl;
}
else {}
}
diff --git a/Toolbox/BaseToolbox/BaseToolbox.cpp b/Toolbox/BaseToolbox/BaseToolbox.cpp
index 22ed9c8..81c91b0 100644
--- a/Toolbox/BaseToolbox/BaseToolbox.cpp
+++ b/Toolbox/BaseToolbox/BaseToolbox.cpp
@@ -123,7 +123,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
//
#ifdef __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
- initBaseToolSARSateSimulationWorkflow(toolbox);
+ // initBaseToolSARSateSimulationWorkflow(toolbox);
#endif // __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.cpp b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.cpp
new file mode 100644
index 0000000..8dbd2a0
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.cpp
@@ -0,0 +1,53 @@
+#include "KJ135WBJYAlgInterfaceToolbox.h"
+#include "ToolBoxWidget.h"
+#include "QWBFZAlgComponetXmlParamsDialog.h"
+#include "QWBFZExcuteAlgProgramDialog.h"
+
+void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
+{
+ emit toolbox->addBoxToolItemSIGNAL(new WBFZAlgComponetLoadXmlParamsDialogToolButton(toolbox));
+ emit toolbox->addBoxToolItemSIGNAL(new QWBFZExcuteAlgProgramDialogToolButton(toolbox));
+}
+
+
+WBFZAlgComponetLoadXmlParamsDialogToolButton::WBFZAlgComponetLoadXmlParamsDialogToolButton(QWidget* parent) : QToolAbstract(parent)
+{
+ this->toolPath = QVector(0);
+ this->toolPath.push_back(u8"㷨");
+ this->toolname = QString(u8"㷨xml");
+}
+
+
+WBFZAlgComponetLoadXmlParamsDialogToolButton::~WBFZAlgComponetLoadXmlParamsDialogToolButton()
+{
+
+
+}
+
+void WBFZAlgComponetLoadXmlParamsDialogToolButton::run()
+{
+ WBFZAlgComponetLoadXmlParamsProcess();
+}
+
+
+
+QWBFZExcuteAlgProgramDialogToolButton::QWBFZExcuteAlgProgramDialogToolButton(QWidget* parent) : QToolAbstract(parent)
+{
+ this->toolPath = QVector(0);
+ this->toolPath.push_back(u8"㷨");
+ this->toolname = QString(u8"ִ㷨");
+}
+
+QWBFZExcuteAlgProgramDialogToolButton::~QWBFZExcuteAlgProgramDialogToolButton()
+{
+
+}
+
+void QWBFZExcuteAlgProgramDialogToolButton::run()
+{
+ QWBFZExcuteAlgProgramDialog* dialog = new QWBFZExcuteAlgProgramDialog();
+ dialog->setWindowTitle(u8"ִ㷨");
+ dialog->show();
+ //dialog->exec();
+ //dialog->deleteLater();
+}
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.h
new file mode 100644
index 0000000..1c01d00
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.h
@@ -0,0 +1,57 @@
+#pragma once
+/**
+* ӽջĿ
+* @file KJ2AlgInterfaceToolbox.h
+* @brief KJ2AlgInterfaceToolbox.h
+* @details
+* ջĿĿļеIJļʾӦ㷨ִе
+*
+*/
+#ifndef __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
+#define __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
+#include "KJ135WBJYAlgInterfacetoolbox_global.h"
+#include "QToolAbstract.h"
+
+namespace LAMPMainWidget {
+ class RasterMainWidget;
+}
+
+class ToolBoxWidget;
+
+
+extern "C" KJ2ALGINTERFACETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
+
+
+
+///
+/// ؿջʮ㷨xml
+///
+class KJ2ALGINTERFACETOOLBOX_EXPORT WBFZAlgComponetLoadXmlParamsDialogToolButton : public QToolAbstract {
+ Q_OBJECT
+public:
+ WBFZAlgComponetLoadXmlParamsDialogToolButton(QWidget* parent = nullptr);
+ ~WBFZAlgComponetLoadXmlParamsDialogToolButton();
+public:
+ virtual void run() override;
+
+};
+
+
+
+///
+/// ؿջʮ㷨ִн
+///
+class KJ2ALGINTERFACETOOLBOX_EXPORT QWBFZExcuteAlgProgramDialogToolButton : public QToolAbstract {
+ Q_OBJECT
+public:
+ QWBFZExcuteAlgProgramDialogToolButton(QWidget* parent = nullptr);
+ ~QWBFZExcuteAlgProgramDialogToolButton();
+public:
+ virtual void run() override;
+
+};
+
+
+
+
+#endif // __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
\ No newline at end of file
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj
new file mode 100644
index 0000000..f99433d
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj
@@ -0,0 +1,136 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {D3E9A2CA-7F05-425A-A4B6-416EC20972E8}
+ QtVS_v304
+ 10.0
+ 10.0
+ $(MSBuildProjectDirectory)\QtMsBuild
+ KJ135WBJYAlgInterfaceToolbox
+
+
+
+ DynamicLibrary
+ v143
+ true
+ Unicode
+
+
+ DynamicLibrary
+ v143
+ false
+ true
+ Unicode
+
+
+
+
+
+
+ tools_qt5
+ core;gui;widgets
+ debug
+
+
+ tools_qt5
+ core;xml;sql;opengl;gui;xmlpatterns;widgets;location;qml;positioning;printsupport;concurrent;3dcore;3danimation;3dextras;3dinput;3dlogic;3drender;dbus;gamepad;openglextensions;charts;datavisualization;purchasing
+ release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)$(Platform)\$(Configuration)\Toolbox\
+ PluginTool_$(ProjectName)
+ ..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;.;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterMainWidgetGUI;..\..\RasterProcessToolWidget;$(VC_IncludePath);$(WindowsSDK_IncludePath)
+
+
+
+ true
+ KJ2ALGINTERFACETOOLBOX_LIB;%(PreprocessorDefinitions)
+ Level3
+ true
+ true
+
+
+ Windows
+ true
+
+
+
+
+ true
+ KJ2ALGINTERFACETOOLBOX_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ Level3
+ true
+ true
+ true
+ true
+
+
+ Windows
+ DebugFull
+ true
+ true
+
+
+
+
+ {872ecd6f-30e3-4a1b-b17c-15e87d373ff6}
+
+
+ {e56b3878-a3dc-41a4-abf3-b628816d0d64}
+
+
+ {7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj.filters b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj.filters
new file mode 100644
index 0000000..fb69b29
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfaceToolbox.vcxproj.filters
@@ -0,0 +1,72 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
+ ui
+
+
+ {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
+ ts
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Header Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Form Files
+
+
+ Form Files
+
+
+
\ No newline at end of file
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfacetoolbox_global.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfacetoolbox_global.h
new file mode 100644
index 0000000..50ea4ad
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgInterfacetoolbox_global.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include
+
+#ifndef BUILD_STATIC
+# if defined(KJ2ALGINTERFACETOOLBOX_LIB)
+# define KJ2ALGINTERFACETOOLBOX_EXPORT Q_DECL_EXPORT
+# else
+# define KJ2ALGINTERFACETOOLBOX_EXPORT Q_DECL_IMPORT
+# endif
+#else
+# define KJ2ALGINTERFACETOOLBOX_EXPORT
+#endif
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.cpp b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.cpp
new file mode 100644
index 0000000..0215d97
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.cpp
@@ -0,0 +1,923 @@
+#include "KJ135WBJYAlgWidgetComponet.h"
+#include
+#include
+#include
+
+AbstractComponentWidget::AbstractComponentWidget(QWidget* parent) :QWidget(parent)
+{
+ this->componentType = ComponentType::UNKNOW; // 默认未知类型
+ this->ParaName = QString(); // 参数名称
+ this->ParaChsName = QString(); // 参数中文名称
+ this->Description = QString(); // 参数描述
+ this->Datatype = QString(); // 数据类型
+ this->ParaType = QString(); // 参数类型
+}
+
+AbstractComponentWidget::~AbstractComponentWidget()
+{
+
+}
+
+QString AbstractComponentWidget::getParaName() const
+{
+ return this->ParaName;
+}
+
+void AbstractComponentWidget::setParaName(const QString& name)
+{
+ this->ParaName = name;
+}
+
+QString AbstractComponentWidget::getParaChsName() const
+{
+ return this->ParaChsName;
+}
+
+void AbstractComponentWidget::setParaChsName(const QString& name)
+{
+ this->ParaChsName = name;
+}
+
+QString AbstractComponentWidget::getDescription() const
+{
+
+ return this->Description;
+}
+
+void AbstractComponentWidget::setDescription(const QString& description)
+{
+ this->setToolTip(description);// 绑定提示
+ this->Description = description;
+}
+
+QString AbstractComponentWidget::getDatatype() const
+{
+ return this->Datatype;
+}
+
+void AbstractComponentWidget::setDatatype(const QString& datatype)
+{
+ this->Datatype = datatype;
+}
+
+QString AbstractComponentWidget::getParaType() const
+{
+ return this->ParaType;
+}
+
+void AbstractComponentWidget::setParaType(const QString& type)
+{
+ this->ParaType = type;
+}
+
+void AbstractComponentWidget::setComponentType(ComponentType type)
+{
+ this->componentType = type;
+}
+
+ComponentType AbstractComponentWidget::getComponentType() const
+{
+ return this->componentType;
+}
+
+QString AbstractComponentWidget::getValue() const
+{
+ return QString();
+}
+
+void AbstractComponentWidget::initUI()
+{
+}
+
+// File 文件选择
+
+FileSelectWidget::FileSelectWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+}
+
+FileSelectWidget::~FileSelectWidget()
+{
+}
+
+void FileSelectWidget::initUI()
+{
+ // 初始化控件
+ // fileNameLabel
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+
+ //filePathEdit
+ filePathEdit = new QLineEdit(this);
+
+ // fileSelectButton
+ fileSelectButton = new QToolButton(this);
+ fileSelectButton->setText(u8"选择文件");
+
+
+
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ filePathEdit->setMinimumHeight(40);
+ fileSelectButton->setMinimumHeight(40);
+
+ // 绑定信号-槽
+ QObject::connect(fileSelectButton, SIGNAL(clicked()), this, SLOT(onFileSelectButtonClicked()));
+
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(filePathEdit);
+ layout->addWidget(fileSelectButton);
+ this->setLayout(layout);
+}
+
+QString FileSelectWidget::getValue() const
+{
+ if (nullptr != filePathEdit)
+ {
+ if (this->componentType == ComponentType::FolderSelect) {
+ //检测最后一个字符是否为分隔符
+ QString filePath = filePathEdit->text();
+ if (filePath.endsWith(QDir::separator())) {
+ return filePath;
+ }
+ else {
+ return QString(u8"%1%2").arg(filePath).arg(QDir::separator());
+ }
+ }
+ else{
+ return filePathEdit->text();
+ }
+
+ }
+ else {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先选择文件");
+ return QString();
+ }
+}
+
+void FileSelectWidget::onFileSelectButtonClicked()
+{
+ if (this->componentType == ComponentType::FileSelect)
+ {
+ QString fileName = QFileDialog::getOpenFileName(this,
+ QString(u8"选择%1").arg(this->getParaChsName()),
+ "",
+ QString(u8"所有文件(*.*);;%1文件(*.%2);;").arg(this->getDatatype()).arg(this->getDatatype()));
+ if (!fileName.isEmpty())
+ {
+ filePathEdit->setText(fileName);
+ }
+ else {
+ QMessageBox::warning(this, u8"警告", u8"请选择文件");
+ }
+ }
+ else if (this->componentType == ComponentType::MulitFileSelect)
+ {
+ QStringList fileName = QFileDialog::getOpenFileNames(this,
+ QString(u8"选择文件夹:%1").arg(this->getParaChsName()),
+ "");
+ if (fileName.count() != 0)
+ {
+ QString filePathlist = fileName.at(0);
+ for (long i = 1; i < fileName.count(); i++)
+ {
+ filePathlist = QString(u8"%1;%2").arg(filePathlist).arg(fileName.at(i));
+ }
+ filePathlist = QString(u8"%1;").arg(filePathlist);
+ filePathEdit->setText(filePathlist);
+ }
+ else {
+ QMessageBox::warning(this, u8"警告", u8"请选择文件夹");
+ }
+ }
+ else if (this->componentType == ComponentType::FolderSelect) {
+ QString fileName = QFileDialog::getExistingDirectory(this,
+ QString(u8"选择文件夹:%1").arg(this->getParaChsName()),
+ "");
+ if (!fileName.isEmpty())
+ {
+ fileName = QString(u8"%1%2").arg(fileName).arg(QDir::separator());
+ filePathEdit->setText(fileName);
+ }
+ else {
+ QMessageBox::warning(this, u8"警告", u8"请选择文件夹");
+ }
+ }
+ else {
+ QMessageBox::warning(this, u8"警告", u8"参数控件格式错误");
+ }
+}
+
+
+
+// 整数输入组件
+IntInputWidget::IntInputWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+
+}
+IntInputWidget::~IntInputWidget()
+{
+}
+
+void IntInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+
+
+ intInput = new QSpinBox(this);
+ intInput->setRange(-920240809, 920240809);
+ intInput->setSingleStep(1);
+
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ intInput->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(intInput);
+ this->setLayout(layout);
+}
+
+QString IntInputWidget::getValue() const
+{
+ if (nullptr == this->intInput)
+ {
+ return QString();
+ }
+ else {
+ return QString::number(this->intInput->value());
+ }
+}
+
+// 浮点数输入组件
+
+DoubleInputWidget::DoubleInputWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+}
+
+DoubleInputWidget::~DoubleInputWidget()
+{
+}
+
+void DoubleInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+
+
+ doubleInput = new QLineEdit(this);
+
+
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ doubleInput->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(doubleInput);
+ this->setLayout(layout);
+}
+
+QString DoubleInputWidget::getValue() const
+{
+ if (nullptr != this->doubleInput)
+ {
+ return this->doubleInput->text();
+ }
+ else {
+ return QString();
+ }
+}
+
+
+
+// 整数输入组件
+ScopeIntInputWidget::ScopeIntInputWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+
+}
+
+ScopeIntInputWidget::~ScopeIntInputWidget()
+{
+}
+
+void ScopeIntInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ intInputMin = new QSpinBox(this);
+ intInputMin->setRange(-1000000, 1000000);
+ intInputMin->setSingleStep(1);
+
+ scopeConnectStr = new QLabel(this);
+ scopeConnectStr->setText(u8" - ");
+
+ intInputMax = new QSpinBox(this);
+ intInputMax->setRange(-1000000, 1000000);
+ intInputMax->setSingleStep(1);
+
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ intInputMin->setMinimumHeight(40);
+ intInputMax->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(intInputMin);
+ layout->addWidget(scopeConnectStr);
+ layout->addWidget(intInputMax);
+ this->setLayout(layout);
+}
+
+
+QString ScopeIntInputWidget::getValue() const
+{
+ if (nullptr != intInputMin && nullptr != intInputMax)
+ {
+ return QString("%1;%2")
+ .arg(QString::number(intInputMin->value()))
+ .arg(QString::number(intInputMax->value()));
+ }
+ else {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先输入");
+ }
+ return QString();
+}
+
+
+
+// 浮点数输入组件
+ScopeDoubleInputWidget::ScopeDoubleInputWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+}
+
+ScopeDoubleInputWidget::~ScopeDoubleInputWidget()
+{
+}
+
+void ScopeDoubleInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ doubleInputMin = new QLineEdit(this);
+
+
+ scopeConnectStr = new QLabel(this);
+ scopeConnectStr->setText(u8" - ");
+
+ doubleInputMax = new QLineEdit(this);
+
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ doubleInputMin->setMinimumHeight(40);
+ doubleInputMax->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(doubleInputMin);
+ layout->addWidget(scopeConnectStr);
+ layout->addWidget(doubleInputMax);
+ this->setLayout(layout);
+}
+
+QString ScopeDoubleInputWidget::getValue() const
+{
+ if (nullptr != doubleInputMin && nullptr != doubleInputMax)
+ {
+ return QString("%1;%2")
+ .arg(doubleInputMin->text())
+ .arg(doubleInputMax->text());
+ }
+ else {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先输入");
+ }
+ return QString();
+}
+
+AbstractComponentWidget* createComponentWidgetFactory(QString ParaName, QString ParaChsName, QString Datatype, QString ParaType, QString Description, QWidget* parent)
+{
+ qDebug() << "createComponentWidgetFactory: " << ParaName << ParaChsName << Datatype << ParaType << Description;
+ if (QString::compare(ParaName, u8"WorkSpace", Qt::CaseInsensitive) == 0) { // 判断是否相等
+ AbstractComponentWidget* workspacePathWidget = new FileSelectWidget(parent);
+ workspacePathWidget->setParaName(ParaName);
+ workspacePathWidget->setParaChsName(ParaChsName);
+ workspacePathWidget->setDescription(Description);
+ workspacePathWidget->setDatatype(Datatype);
+ workspacePathWidget->setComponentType(ComponentType::FolderSelect);
+ workspacePathWidget->initUI();
+ return workspacePathWidget;
+ }
+ else if(QString::compare(ParaName, u8"box", Qt::CaseInsensitive) == 0 ){ // 包围盒
+ AbstractComponentWidget* boxInpputWidget = new BoxDoubleInputWidget(parent);
+ boxInpputWidget->setParaName(ParaName);
+ boxInpputWidget->setParaChsName(ParaChsName);
+ boxInpputWidget->setDescription(Description);
+ boxInpputWidget->setDatatype(Datatype);
+ boxInpputWidget->setComponentType(ComponentType::BoxDoubleInput);
+ boxInpputWidget->initUI();
+ return boxInpputWidget;
+ }
+ else if (QString::compare(ParaName, u8"CoveringIDs", Qt::CaseInsensitive) == 0 ) { // 地表覆盖类型
+ AbstractComponentWidget* intInpputWidget = new MultiIntInputWidget(parent);
+ intInpputWidget->setParaName(ParaName);
+ intInpputWidget->setParaChsName(ParaChsName);
+ intInpputWidget->setDescription(Description);
+ intInpputWidget->setDatatype(Datatype);
+ intInpputWidget->setComponentType(ComponentType::MultiIntInput);
+ intInpputWidget->initUI();
+ return intInpputWidget;
+ }
+ else if (QString::compare(ParaName, u8"NDVIScope", Qt::CaseInsensitive) == 0) { //NDVI 范围
+ AbstractComponentWidget* scopeDoubleInputWidget = new ScopeDoubleInputWidget(parent);
+ scopeDoubleInputWidget->setParaName(ParaName);
+ scopeDoubleInputWidget->setParaChsName(ParaChsName);
+ scopeDoubleInputWidget->setDescription(Description);
+ scopeDoubleInputWidget->setDatatype(Datatype);
+ scopeDoubleInputWidget->setComponentType(ComponentType::ScopeDoubleInput);
+ scopeDoubleInputWidget->initUI();
+ return scopeDoubleInputWidget;
+ }
+ else if (QString::compare(ParaName, u8"MainImg", Qt::CaseInsensitive) == 0 ) { // 浮点数输入
+ AbstractComponentWidget* InputWidget = new IntInputWidget(parent);
+ InputWidget->setParaName(ParaName);
+ InputWidget->setParaChsName(ParaChsName);
+ InputWidget->setDescription(Description);
+ InputWidget->setDatatype(Datatype);
+ InputWidget->setComponentType(ComponentType::IntInput);
+ InputWidget->initUI();
+ return InputWidget;
+ }
+ else if (QString::compare(ParaName, u8"SARS", Qt::CaseInsensitive) == 0 ) { // 浮点数输入
+ AbstractComponentWidget* InputWidget = new FileSelectWidget(parent);
+ InputWidget->setParaName(ParaName);
+ InputWidget->setParaChsName(ParaChsName);
+ InputWidget->setDescription(Description);
+ InputWidget->setDatatype(Datatype);
+ InputWidget->setComponentType(ComponentType::MulitFileSelect);
+ InputWidget->initUI();
+ return InputWidget;
+ }
+ else if (QString::compare(ParaName, u8"CorrectMethod", Qt::CaseInsensitive) == 0 ) { // 浮点数输入
+ AbstractComponentWidget* scopeDoubleInputWidget = new CorrectMethodcomboxSelectWidget(parent);
+ scopeDoubleInputWidget->setParaName(ParaName);
+ scopeDoubleInputWidget->setParaChsName(ParaChsName);
+ scopeDoubleInputWidget->setDescription(Description);
+ scopeDoubleInputWidget->setDatatype(Datatype);
+ scopeDoubleInputWidget->setComponentType(ComponentType::IntInput);
+ scopeDoubleInputWidget->initUI();
+ return scopeDoubleInputWidget;
+ }
+ else if (QString::compare(ParaName, u8"FeatureCombination", Qt::CaseInsensitive) == 0) { // 浮点数输入
+ AbstractComponentWidget* InputWidget = new FeatureCombinationMultiIntInputWidget(parent);
+ InputWidget->setParaName(ParaName);
+ InputWidget->setParaChsName(ParaChsName);
+ InputWidget->setDescription(Description);
+ InputWidget->setDatatype(Datatype);
+ InputWidget->setComponentType(ComponentType::IntInput);
+ InputWidget->initUI();
+ return InputWidget;
+ }
+ else if (QString::compare(ParaType, u8"Value", Qt::CaseInsensitive) == 0 && QString::compare(Datatype, u8"string", Qt::CaseInsensitive) == 0) {
+ AbstractComponentWidget* InputWidget = new StringInputWidget(parent);
+ InputWidget->setParaName(ParaName);
+ InputWidget->setParaChsName(ParaChsName);
+ InputWidget->setDescription(Description);
+ InputWidget->setDatatype(Datatype);
+ InputWidget->setComponentType(ComponentType::IntInput);
+ InputWidget->initUI();
+ return InputWidget;
+ }
+ else if (QString::compare(ParaType, u8"Value", Qt::CaseInsensitive) == 0 && QString::compare(Datatype, u8"float", Qt::CaseInsensitive) == 0) { // 浮点数输入
+ AbstractComponentWidget* InputWidget = new DoubleInputWidget(parent);
+ InputWidget->setParaName(ParaName);
+ InputWidget->setParaChsName(ParaChsName);
+ InputWidget->setDescription(Description);
+ InputWidget->setDatatype(Datatype);
+ InputWidget->setComponentType(ComponentType::DoubleInput);
+ InputWidget->initUI();
+ return InputWidget;
+ }
+ else if (QString::compare(ParaType, u8"File", Qt::CaseInsensitive) == 0 && QString::compare(Datatype, u8"File", Qt::CaseInsensitive) == 0) { // 强制选择文件夹
+ AbstractComponentWidget* fileSelectWidget = new FileSelectWidget(parent);
+ fileSelectWidget->setParaName(ParaName);
+ fileSelectWidget->setParaChsName(ParaChsName);
+ fileSelectWidget->setDescription(Description);
+ fileSelectWidget->setDatatype(Datatype);
+ fileSelectWidget->setComponentType(ComponentType::FolderSelect);
+ fileSelectWidget->initUI();
+ return fileSelectWidget;
+ }
+ else if (QString::compare(ParaType, u8"File", Qt::CaseInsensitive) == 0 && QString::compare(Datatype, u8"tar.gz", Qt::CaseInsensitive) == 0) {// 选择文件
+ AbstractComponentWidget* fileSelectWidget = new FileSelectWidget(parent);
+ fileSelectWidget->setParaName(ParaName);
+ fileSelectWidget->setParaChsName(ParaChsName);
+ fileSelectWidget->setDescription(Description);
+ fileSelectWidget->setDatatype(Datatype);
+ fileSelectWidget->setComponentType(ComponentType::FileSelect);
+ fileSelectWidget->initUI();
+ return fileSelectWidget;
+ }
+ else if (QString::compare(ParaType, u8"File", Qt::CaseInsensitive) == 0) {// 选择文件
+ AbstractComponentWidget* fileSelectWidget = new FileSelectWidget(parent);
+ fileSelectWidget->setParaName(ParaName);
+ fileSelectWidget->setParaChsName(ParaChsName);
+ fileSelectWidget->setDescription(Description);
+ fileSelectWidget->setDatatype(Datatype);
+ fileSelectWidget->setComponentType(ComponentType::MulitFileSelect);
+ fileSelectWidget->initUI();
+ return fileSelectWidget;
+ }
+ return nullptr;
+}
+
+BoxDoubleInputWidget::BoxDoubleInputWidget(QWidget* parent) :AbstractComponentWidget(parent)
+{
+}
+
+BoxDoubleInputWidget::~BoxDoubleInputWidget()
+{
+}
+
+void BoxDoubleInputWidget::initUI()
+{
+ // 修改提示
+ this->Description = QString(u8"%1;不填参数请填写empty作为不填写指令").arg(this->Description);
+ this->setToolTip(this->Description);
+
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ doubleInputMin = new QLineEdit(this);
+ doubleInputMin->setPlaceholderText(u8"请输入包围盒参数");
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ doubleInputMin->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(doubleInputMin);
+ this->setLayout(layout);
+}
+
+QString BoxDoubleInputWidget::getValue() const
+{
+ QString valuestr = this->doubleInputMin->text();
+ // 非法性检查
+ if (valuestr.isEmpty())
+ {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先输入");
+ return QString();
+ }
+ else if (valuestr.compare("empty", Qt::CaseSensitive) == 0)
+ {
+ return QString("empty");
+ }
+ else {
+ // 经纬度包围盒SNWE。例子:30.0;30.2;117.3;117.5 37;38.2;108.87;109.1 , 请根据例子给出规则检查代码
+
+ QStringList list = valuestr.split(";");
+ if (list.size() != 4)
+ {
+ QMessageBox::warning(nullptr, u8"警告", QString(u8"包围盒参数格式错误\n%1").arg(this->Description));
+ return QString("empty");
+ }
+ for (int i = 0; i < list.size(); i++)
+ {
+ bool ok;
+ double value = list.at(i).toDouble(&ok);
+ if (!ok)
+ {
+ QMessageBox::warning(nullptr, u8"警告", QString(u8"包围盒参数格式错误\n%1").arg(this->Description));
+ return QString("empty");
+ }
+ }
+ return valuestr;
+ }
+ return QString("empty");
+}
+
+
+MultiIntInputWidget::MultiIntInputWidget(QWidget* parent)
+{
+}
+
+MultiIntInputWidget::~MultiIntInputWidget()
+{
+}
+
+void MultiIntInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ IntInputMin = new QLineEdit(this);
+ IntInputMin->setPlaceholderText(u8"请输入整数");
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ IntInputMin->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(IntInputMin);
+ this->setLayout(layout);
+}
+
+QString MultiIntInputWidget::getValue() const
+{
+ QString valuestr = this->IntInputMin->text();
+ // 非法性检查
+ if (valuestr.isEmpty())
+ {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先输入");
+ return QString();
+ }
+ else if (valuestr.compare("empty", Qt::CaseSensitive) == 0)
+ {
+ return QString("empty");
+ }
+ else {
+ QStringList list = valuestr.split(";");
+ for (int i = 0; i < list.size(); i++)
+ {
+ bool ok;
+ int value = list.at(i).toInt(&ok);
+ if (!ok)
+ {
+ QMessageBox::warning(nullptr, u8"警告", QString(u8"整数参数格式错误\n%1").arg(this->Description));
+ return QString("empty");
+ }
+ }
+ return valuestr;
+ }
+ return QString("empty");
+}
+
+MultiDoubleInputWidget::MultiDoubleInputWidget(QWidget* parent)
+{
+}
+
+MultiDoubleInputWidget::~MultiDoubleInputWidget()
+{
+}
+
+void MultiDoubleInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ doubleInputMin = new QLineEdit(this);
+ doubleInputMin->setPlaceholderText(u8"请输入浮点数");
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ doubleInputMin->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(doubleInputMin);
+ this->setLayout(layout);
+}
+
+QString MultiDoubleInputWidget::getValue() const
+{
+ QString valuestr = this->doubleInputMin->text();
+ // 非法性检查
+ if (valuestr.isEmpty())
+ {
+ QMessageBox::warning(nullptr, u8"警告", u8"请先输入");
+ return QString();
+ }
+ else if (valuestr.compare("empty", Qt::CaseSensitive) == 0)
+ {
+ return QString("empty");
+ }
+ else {
+ QStringList list = valuestr.split(";");
+ for (int i = 0; i < list.size(); i++)
+ {
+ bool ok;
+ double value = list.at(i).toDouble(&ok);
+ if (!ok)
+ {
+ QMessageBox::warning(nullptr, u8"警告", QString(u8"浮点数参数格式错误\n%1").arg(this->Description));
+ return QString("empty");
+ }
+ }
+ return valuestr;
+ }
+ return QString("empty");
+}
+
+
+CorrectMethodcomboxSelectWidget::CorrectMethodcomboxSelectWidget(QWidget* parent)
+{
+}
+
+CorrectMethodcomboxSelectWidget::~CorrectMethodcomboxSelectWidget()
+{
+}
+
+void CorrectMethodcomboxSelectWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ comboxSelect = new QComboBox(this);
+ comboxSelect->addItem(u8"2:RD");
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ comboxSelect->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(comboxSelect);
+ this->setLayout(layout);
+ comboxSelect->setEnabled(false);
+}
+
+QString CorrectMethodcomboxSelectWidget::getValue() const
+{
+ return u8"2";
+}
+
+FeatureCombinationMultiIntInputWidget::FeatureCombinationMultiIntInputWidget(QWidget* parent)
+{
+}
+
+FeatureCombinationMultiIntInputWidget::~FeatureCombinationMultiIntInputWidget()
+{
+}
+
+void FeatureCombinationMultiIntInputWidget::initUI()
+{
+ /*
+ 根据下面的参数,设置一个 checkbox 阵列
+ Freeman:表面散射p_s(0)、偶次散射p_d(1)、体散射p_v(2);
+ Touzi:散射角α_s(3)、散射相位ϕ_α(4)、目标散射对称度τ(5)、相对能量λ_i(6);
+ Yamaguchi:表面散射f_s(7)、二次散射f_d(8)、体散射f_v(9)、螺旋体散射f_h(10);
+ Cloude-Pottier:分解散射熵H(11)、反熵A(12)、平均散射角α(13)*/
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+
+
+ // 不同控件checkbox 初始化
+ checkbox0 = new QCheckBox(u8"表面散射p_s(0)", this);
+ checkbox1 = new QCheckBox(u8"偶次散射p_d(1)", this);
+ checkbox2 = new QCheckBox(u8"体散射p_v(2)", this);
+ checkbox3 = new QCheckBox(u8"散射角α_s(3)", this);
+ checkbox4 = new QCheckBox(u8"散射相位ϕ_α(4)", this);
+ checkbox5 = new QCheckBox(u8"目标散射对称度τ(5)", this);
+ checkbox6 = new QCheckBox(u8"相对能量λ_i(6)", this);
+ checkbox7 = new QCheckBox(u8"表面散射f_s(7)", this);
+ checkbox8 = new QCheckBox(u8"二次散射f_d(8)", this);
+ checkbox9 = new QCheckBox(u8"体散射f_v(9)", this);
+ checkbox10 = new QCheckBox(u8"螺旋体散射f_h(10)", this);
+ checkbox11 = new QCheckBox(u8"分解散射熵H(11)", this);
+ checkbox12 = new QCheckBox(u8"反熵A(12)", this);
+ checkbox13 = new QCheckBox(u8"平均散射角α(13)", this);
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ checkbox0->setMinimumHeight(40);
+ checkbox1->setMinimumHeight(40);
+ checkbox2->setMinimumHeight(40);
+ checkbox3->setMinimumHeight(40);
+ checkbox4->setMinimumHeight(40);
+ checkbox5->setMinimumHeight(40);
+ checkbox6->setMinimumHeight(40);
+ checkbox7->setMinimumHeight(40);
+ checkbox8->setMinimumHeight(40);
+ checkbox9->setMinimumHeight(40);
+ checkbox10->setMinimumHeight(40);
+ checkbox11->setMinimumHeight(40);
+ checkbox12->setMinimumHeight(40);
+ checkbox13->setMinimumHeight(40);
+ // 垂直布局,并按照Freeman、Touzi、Yamaguchi、Cloude-Pottier的分组,每一个分组使用一个QGroupBox,水平
+ QVBoxLayout* layout = new QVBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ QGroupBox* FreemanGroup = new QGroupBox(u8"Freeman", this);
+ QHBoxLayout* FreemanLayout = new QHBoxLayout(FreemanGroup);
+ FreemanLayout->addWidget(checkbox0);
+ FreemanLayout->addWidget(checkbox1);
+ FreemanLayout->addWidget(checkbox2);
+ QGroupBox* TouziGroup = new QGroupBox(u8"Touzi", this);
+ QHBoxLayout* TouziLayout = new QHBoxLayout(TouziGroup);
+ TouziLayout->addWidget(checkbox3);
+ TouziLayout->addWidget(checkbox4);
+ TouziLayout->addWidget(checkbox5);
+ TouziLayout->addWidget(checkbox6);
+ QGroupBox* YamaguchiGroup = new QGroupBox(u8"Yamaguchi", this);
+ QHBoxLayout* YamaguchiLayout = new QHBoxLayout(YamaguchiGroup);
+ YamaguchiLayout->addWidget(checkbox7);
+ YamaguchiLayout->addWidget(checkbox8);
+ YamaguchiLayout->addWidget(checkbox9);
+ YamaguchiLayout->addWidget(checkbox10);
+ QGroupBox* CloudePottierGroup = new QGroupBox(u8"Cloude-Pottier", this);
+ QHBoxLayout* CloudePottierLayout = new QHBoxLayout(CloudePottierGroup);
+ CloudePottierLayout->addWidget(checkbox11);
+ CloudePottierLayout->addWidget(checkbox12);
+ CloudePottierLayout->addWidget(checkbox13);
+ layout->addWidget(FreemanGroup);
+ layout->addWidget(TouziGroup);
+ layout->addWidget(YamaguchiGroup);
+ layout->addWidget(CloudePottierGroup);
+ this->setLayout(layout);
+}
+
+QString FeatureCombinationMultiIntInputWidget::getValue() const
+{
+
+ // 检查所有的checkbox是否被选中,然后给出形如0,1,2,7,8,9,10的字符串
+ QString valuestr = QString();
+ if (checkbox0->isChecked())
+ {
+ valuestr += "0,";
+ }
+ if (checkbox1->isChecked())
+ {
+ valuestr += "1,";
+ }
+ if (checkbox2->isChecked())
+ {
+ valuestr += "2,";
+ }
+ if (checkbox3->isChecked())
+ {
+ valuestr += "3,";
+ }
+ if (checkbox4->isChecked())
+ {
+ valuestr += "4,";
+ }
+ if (checkbox5->isChecked())
+ {
+ valuestr += "5,";
+ }
+ if (checkbox6->isChecked())
+ {
+ valuestr += "6,";
+ }
+ if (checkbox7->isChecked())
+ {
+ valuestr += "7,";
+ }
+ if (checkbox8->isChecked())
+ {
+ valuestr += "8,";
+ }
+ if (checkbox9->isChecked())
+ {
+ valuestr += "9,";
+ }
+ if (checkbox10->isChecked())
+ {
+ valuestr += "10,";
+ }
+ if (checkbox11->isChecked())
+ {
+ valuestr += "11,";
+ }
+ if (checkbox12->isChecked())
+ {
+ valuestr += "12,";
+ }
+ if (checkbox13->isChecked())
+ {
+ valuestr += "13,";
+ }
+ // 去掉最后一个逗号
+ if (valuestr.length() > 0)
+ {
+ valuestr = valuestr.left(valuestr.length() - 1);
+ }
+ else {
+ QMessageBox::warning(nullptr, u8"警告", u8"请至少选择一个参数");
+ return QString();
+ }
+ return valuestr;
+}
+
+StringInputWidget::StringInputWidget(QWidget* parent)
+{
+}
+
+StringInputWidget::~StringInputWidget()
+{
+}
+
+void StringInputWidget::initUI()
+{
+ fileNameLabel = new QLabel(this);
+ fileNameLabel->setText(this->getParaName());
+ IntInputMin = new QLineEdit(this);
+ IntInputMin->setPlaceholderText(u8"请输入");
+ // 设置文件最小控件高度
+ fileNameLabel->setMinimumHeight(40);
+ IntInputMin->setMinimumHeight(40);
+ // 水平布局
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(fileNameLabel);
+ layout->addWidget(IntInputMin);
+ this->setLayout(layout);
+}
+
+QString StringInputWidget::getValue() const
+{
+ return IntInputMin->text();
+}
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.h
new file mode 100644
index 0000000..67305da
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/KJ135WBJYAlgWidgetComponet.h
@@ -0,0 +1,341 @@
+#pragma once
+
+/**
+* 空基十三五微波算法组件界面组件类集
+* @file KJ135WBJYAlgWidgetComponet.h
+* @brief KJ135WBJYAlgWidgetComponet.h
+* @details
+* 空基十三五微波算法组件界面组件类集
+*/
+
+#ifndef __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
+#define __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
+
+#include "KJ135WBJYAlgInterfaceToolbox_global.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+
+
+///
+/// 参数类型枚举
+///
+enum ComponentType{
+ UNKNOW = 0, // 未知类型
+ WorkSpace, // 工作空间路径
+ FileSelect , // 文件选择
+ MulitFileSelect , // 文件选择
+ FolderSelect, // 文件夹选择
+ ComboxSelect,// 枚举多选
+ IntInput,// 整数输入
+ stringInput,
+ BoxDoubleInput,// 复选框浮点数输入
+ DoubleInput,// 浮点数输入
+ MultipleSelect,// 多选
+ MultiIntInput,// 整数多选输入
+ MultiDoubleInput,// 浮点数多选输入
+ ScopeIntInput,// 整数范围输入
+ ScopeDoubleInput,// 浮点数范围输入
+
+};
+
+
+
+
+
+/**
+
+CoveringIDs
+地表覆盖类型数据的类别id
+地表覆盖类型数据中植被区域、裸土区域的类别id,多个id使用“;”分割。示例:GlobeLand30数据的cover_roi_ids = 10;20;30;40;50;70;71;72;83;74;90
+Value
+string
+Man
+1;4;5;6;7;11;10;20;30;50;60;70;71;72;73;74;80;90;255
+True
+False
+UploadInput
+Aux
+0
+Aux
+DEFAULT
+DEFAULT
+DEFAULT
+DEFAULT
+DEFAULT
+
+
+**/
+
+class AbstractComponentWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ AbstractComponentWidget(QWidget* parent = nullptr);
+ ~AbstractComponentWidget();
+
+protected:
+ QString ParaName; // 参数名称
+ QString ParaChsName;// 参数中文名称
+ QString Description;// 参数描述
+
+ QString Datatype;// 数据类型 Value // 决定参数的输入类型
+ QString ParaType;// 参数类型 string
+
+ ComponentType componentType = ComponentType::UNKNOW; // 组件类型
+public://属性操作
+ QString getParaName() const;
+ void setParaName(const QString& name);
+ // 设置参数中文名称
+ QString getParaChsName() const;
+ void setParaChsName(const QString& name);
+ // 设置参数描述
+ QString getDescription() const;
+ void setDescription(const QString& description);
+ // 设置数据类型
+ QString getDatatype() const;
+ void setDatatype(const QString& datatype);
+ // 设置参数类型
+ QString getParaType() const;
+ void setParaType(const QString& type);
+
+ void setComponentType(ComponentType type);
+ ComponentType getComponentType() const;
+
+ virtual QString getValue() const;
+ virtual void initUI();
+};
+
+///
+/// File 文件选择组件
+///
+class FileSelectWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ FileSelectWidget(QWidget* parent = nullptr);
+ ~FileSelectWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel=nullptr; // 文件名称
+ QLineEdit* filePathEdit = nullptr;
+ QToolButton* fileSelectButton = nullptr;
+ public slots:
+ void onFileSelectButtonClicked();
+public:
+ virtual QString getValue() const override;
+ };
+
+///
+/// int输入组件
+///
+class IntInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ IntInputWidget(QWidget* parent = nullptr);
+ ~IntInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QSpinBox* intInput = nullptr;
+
+public:
+ virtual QString getValue() const override;
+
+};
+
+///
+/// double 输入组件
+///
+class DoubleInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ DoubleInputWidget(QWidget* parent = nullptr);
+ ~DoubleInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLineEdit* doubleInput = nullptr;
+ public:
+ virtual QString getValue() const override;
+ };
+
+///
+/// 整数值 数据范围输入组件
+///
+class ScopeIntInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ ScopeIntInputWidget(QWidget* parent = nullptr);
+ ~ScopeIntInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLabel* scopeConnectStr = nullptr; // 文件名称
+ QSpinBox* intInputMin = nullptr;
+ QSpinBox* intInputMax = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+
+///
+/// 浮点数值 数据范围输入组件
+///
+class ScopeDoubleInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ ScopeDoubleInputWidget(QWidget* parent = nullptr);
+ ~ScopeDoubleInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLabel* scopeConnectStr = nullptr; // 文件名称
+ QLineEdit* doubleInputMin = nullptr;
+ QLineEdit* doubleInputMax = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+
+
+class BoxDoubleInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ BoxDoubleInputWidget(QWidget* parent = nullptr);
+ ~BoxDoubleInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLineEdit* doubleInputMin = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+class MultiIntInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ MultiIntInputWidget(QWidget* parent = nullptr);
+ ~MultiIntInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLineEdit* IntInputMin = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+class MultiDoubleInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ MultiDoubleInputWidget(QWidget* parent = nullptr);
+ ~MultiDoubleInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLineEdit* doubleInputMin = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+
+class CorrectMethodcomboxSelectWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ CorrectMethodcomboxSelectWidget(QWidget* parent = nullptr);
+ ~CorrectMethodcomboxSelectWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QComboBox* comboxSelect = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+
+class FeatureCombinationMultiIntInputWidget : public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ FeatureCombinationMultiIntInputWidget(QWidget* parent = nullptr);
+ ~FeatureCombinationMultiIntInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ /*
+根据下面的参数,设置一个 checkbox 阵列
+ Freeman:表面散射p_s(0)、偶次散射p_d(1)、体散射p_v(2);
+ Touzi:散射角α_s(3)、散射相位ϕ_α(4)、目标散射对称度τ(5)、相对能量λ_i(6);
+ Yamaguchi:表面散射f_s(7)、二次散射f_d(8)、体散射f_v(9)、螺旋体散射f_h(10);
+ Cloude-Pottier:分解散射熵H(11)、反熵A(12)、平均散射角α(13)*/
+ QCheckBox* checkbox0 = nullptr; // 表面散射
+ QCheckBox* checkbox1 = nullptr; // 偶次散射p_d
+ QCheckBox* checkbox2 = nullptr; // 体散射p_v
+ QCheckBox* checkbox3 = nullptr; // 散射角α_s
+ QCheckBox* checkbox4 = nullptr; // 散射相位ϕ_α
+ QCheckBox* checkbox5 = nullptr; // 目标散射对称度τ
+ QCheckBox* checkbox6 = nullptr; // 相对能量λ_i
+ QCheckBox* checkbox7 = nullptr; // 表面散射f_s
+ QCheckBox* checkbox8 = nullptr; // 二次散射f_d
+ QCheckBox* checkbox9 = nullptr; // 体散射f_v
+ QCheckBox* checkbox10 = nullptr; // 螺旋体散射f_h
+ QCheckBox* checkbox11 = nullptr; // 分解散射熵H
+ QCheckBox* checkbox12 = nullptr; // 反熵A
+ QCheckBox* checkbox13 = nullptr; // 平均散射角α
+
+public:
+ virtual QString getValue() const override;
+};
+
+
+class StringInputWidget :public AbstractComponentWidget
+{
+ Q_OBJECT
+public:
+ StringInputWidget(QWidget* parent = nullptr);
+ ~StringInputWidget();
+ virtual void initUI() override;
+private:
+ QLabel* fileNameLabel = nullptr; // 文件名称
+ QLineEdit* IntInputMin = nullptr;
+public:
+ virtual QString getValue() const override;
+};
+
+
+///
+/// 参数文件工厂
+///
+/// 参数名称
+/// 参数中文别名
+/// 数据类型
+/// 参数类型
+/// 描述
+/// 父控件
+///
+AbstractComponentWidget* createComponentWidgetFactory(QString ParaName, QString ParaChsName, QString Datatype, QString ParaType, QString Description,QWidget* parent = nullptr);
+
+
+
+
+#endif// __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
+
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.cpp b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.cpp
new file mode 100644
index 0000000..8f77424
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.cpp
@@ -0,0 +1,132 @@
+#include "QWBFZAlgComponetXmlParamsDialog.h"
+#include "ui_QWBFZAlgComponetXmlParamsDialog.h"
+#include
+#include
+#include "WBFZAlgComponetXmlParaseOperator.h"
+#include "FileOperator.h"
+QWBFZAlgComponetXmlParamsDialog::QWBFZAlgComponetXmlParamsDialog(QWidget *parent)
+ : QDialog(parent),
+ ui(new Ui::QWBFZAlgComponetXmlParamsDialogClass)
+{
+ ui->setupUi(this);
+
+ // ź-
+ QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(OnacceptButton_Clicked()));
+ QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(OncancelButton_Clicked()));
+
+
+
+
+}
+
+QWBFZAlgComponetXmlParamsDialog::~QWBFZAlgComponetXmlParamsDialog()
+{
+ delete ui;
+ delete xmlParseOperator;
+}
+
+void QWBFZAlgComponetXmlParamsDialog::OnacceptButton_Clicked()
+{
+ // ȡֵ
+ QString workspacePath = workspacePathWidget->getValue();
+ qDebug() << "workspacePath:" << workspacePath;
+ QMap parameterMap;
+ for (long i = 0; i < parameterWidgetList.size(); i++)
+ {
+ AbstractComponentWidget* parameterWidget = parameterWidgetList.at(i);
+ QString parameterValue = parameterWidget->getValue();
+ qDebug() << "parameterValue:" << parameterValue;
+ parameterMap.insert(parameterWidget->getParaName(), parameterValue);
+ }
+
+ // 1. ȡxmlļģ·
+ QString formatxmlpath = this->formatxmlString;
+ // 2. ȡxmlļ·
+ QString filepath = QFileDialog::getSaveFileName(this, u8"xmlļ", "", u8"xmlļ(*.xml)");
+ if (filepath.isEmpty())
+ {
+ QMessageBox::warning(this, u8"", u8"ѡxmlļ");
+ return;
+ }
+ else {
+ qDebug() << "filepath:" << filepath;
+ }
+ xmlParseOperator = new WBFZAlgComponetXmlParaseOperator(this);
+ xmlParseOperator->writeXmlFile(formatxmlString, filepath, workspacePath,parameterMap);
+ // 3. رմ
+ QMessageBox::information(nullptr, u8"ʾ", u8"д");
+}
+
+void QWBFZAlgComponetXmlParamsDialog::OncancelButton_Clicked()
+{
+ this->close();
+}
+
+void QWBFZAlgComponetXmlParamsDialog::loadXmlFile(const QString& fileName)
+{
+ if (nullptr != xmlParseOperator)
+ {
+ delete xmlParseOperator;
+ xmlParseOperator = nullptr;
+ }
+ else {}
+ this->formatxmlString = fileName;
+ // xml
+ xmlParseOperator = new WBFZAlgComponetXmlParaseOperator(this);
+ xmlParseOperator->loadXmlFile(fileName);
+
+ // ݽui
+ // 1. workspace·
+ workspacePathWidget = new FileSelectWidget(this);
+ workspacePathWidget->setParaName("WorkSpace");
+ workspacePathWidget->setParaChsName(u8"ռ·");
+ workspacePathWidget->setDescription(u8"ռ·");
+ workspacePathWidget->setDatatype(u8"string");
+ workspacePathWidget->setComponentType(ComponentType::FolderSelect);
+ workspacePathWidget->initUI();
+
+ ui->verticalLayout_param->addWidget(workspacePathWidget);
+ // 2. б
+ QList < WBFZAlgComponetXmlParamenterItem*> parameterList = xmlParseOperator->getParameterList();
+ for (long i = 0; i < parameterList.size(); i++)
+ {
+ WBFZAlgComponetXmlParamenterItem* item = parameterList.at(i);
+ qDebug() << "item->getParaName():" << item->getParaName();
+ //
+ AbstractComponentWidget* parameterWidget = createComponentWidgetFactory(
+ item->getParaName(),
+ item->getParaChsName(),
+ item->getDatatype(),
+ item->getParaType(),
+ item->getDescription(),
+ this);
+ //parameterWidget->initUI();
+
+ ui->verticalLayout_param->addWidget(parameterWidget);
+
+ this->parameterWidgetList.append(parameterWidget);
+
+ }
+
+}
+
+void WBFZAlgComponetLoadXmlParamsProcess()
+{
+ QString xmlFileName = QFileDialog::getOpenFileName(nullptr, u8"ѡ㷨xmlļ", "", u8"xmlļ(*.xml)");
+ if (xmlFileName.isEmpty())
+ {
+ QMessageBox::warning(nullptr, u8"", u8"ѡ㷨xmlļ");
+ return;
+ }
+ else {
+ // TODO: xmlļز
+ qDebug() << "xmlFileName:" << xmlFileName;
+
+ QWBFZAlgComponetXmlParamsDialog* dialog = new QWBFZAlgComponetXmlParamsDialog();
+ dialog->setWindowTitle(QString(u8"㷨xmlļ-%1").arg(getFileNameFromPath(xmlFileName)));
+ dialog->loadXmlFile(xmlFileName);
+ dialog->show();
+ return;
+ }
+ return;
+}
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.h
new file mode 100644
index 0000000..15e1485
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.h
@@ -0,0 +1,52 @@
+#pragma once
+
+#include
+
+
+namespace Ui
+{
+ class QWBFZAlgComponetXmlParamsDialogClass;
+}
+
+class WBFZAlgComponetXmlParaseOperator;
+class AbstractComponentWidget; // 㷨
+
+class QWBFZAlgComponetXmlParamsDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ QWBFZAlgComponetXmlParamsDialog(QWidget *parent = nullptr);
+ ~QWBFZAlgComponetXmlParamsDialog();
+
+private:
+ Ui::QWBFZAlgComponetXmlParamsDialogClass* ui;
+ QString formatxmlString; // ʽַ
+public slots:
+ void OnacceptButton_Clicked(); // ȷť¼
+ void OncancelButton_Clicked(); // ȡť¼
+
+
+private:
+ WBFZAlgComponetXmlParaseOperator* xmlParseOperator = nullptr; // 㷨xml
+public:
+ void loadXmlFile(const QString& fileName); // xmlļ
+
+private: // ؼ
+ AbstractComponentWidget* workspacePathWidget = nullptr; // ռ·
+ QList parameterWidgetList; // б
+
+
+};
+
+
+
+
+
+// 㷨xmlȾ
+void WBFZAlgComponetLoadXmlParamsProcess();
+
+
+
+
+
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.ui b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.ui
new file mode 100644
index 0000000..8ae3d0d
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZAlgComponetXmlParamsDialog.ui
@@ -0,0 +1,54 @@
+
+
+ QWBFZAlgComponetXmlParamsDialogClass
+
+
+
+ 0
+ 0
+ 600
+ 400
+
+
+
+ QWBFZAlgComponetXmlParamsDialog
+
+
+ -
+
+
+
+
+
+ true
+
+
+
+
+ 0
+ 0
+ 580
+ 351
+
+
+
+
-
+
+
+
+
+
+
+ -
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.cpp b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.cpp
new file mode 100644
index 0000000..99c3c13
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.cpp
@@ -0,0 +1,94 @@
+#include "QWBFZExcuteAlgProgramDialog.h"
+#include "ui_QWBFZExcuteAlgProgramDialog.h"
+#include "KJ135WBJYAlgWidgetComponet.h"
+#include
+#include
+
+QWBFZExcuteAlgProgramDialog::QWBFZExcuteAlgProgramDialog(QWidget *parent)
+ : QDialog(parent),
+ ui(new Ui::QWBFZExcuteAlgProgramDialogClass),
+ xmlfileSelectWidget(new FileSelectWidget(this)),
+ exefileSelectWidget(new FileSelectWidget(this))
+{
+ ui->setupUi(this);
+
+ // Ӳѡ
+ exefileSelectWidget->setParaName(u8"㷨ִexe");
+ exefileSelectWidget->setParaChsName(u8"㷨ִexe");
+ exefileSelectWidget->setDescription(u8"㷨ִexe");
+ exefileSelectWidget->setDatatype(u8"string");
+ exefileSelectWidget->setParaType(u8"Value");
+ exefileSelectWidget->setComponentType(ComponentType::FileSelect);
+ exefileSelectWidget->initUI();
+
+ xmlfileSelectWidget->setParaName(u8"㷨xmlļ");
+ xmlfileSelectWidget->setParaChsName(u8"㷨xmlļ");
+ xmlfileSelectWidget->setDescription(u8"㷨xmlļ");
+ xmlfileSelectWidget->setDatatype(u8"string");
+ xmlfileSelectWidget->setParaType(u8"Value");
+ xmlfileSelectWidget->setComponentType(ComponentType::FileSelect);
+ xmlfileSelectWidget->initUI();
+
+
+ ui->verticalLayout_InParamsRegion->addWidget(exefileSelectWidget);
+ ui->verticalLayout_InParamsRegion->addWidget(xmlfileSelectWidget);
+
+ // źŲ
+ QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onacceptButton_Clicked()));
+ QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(oncancelButton_Clicked()));
+ this->show();
+}
+
+QWBFZExcuteAlgProgramDialog::~QWBFZExcuteAlgProgramDialog()
+{
+ delete ui;
+}
+
+void QWBFZExcuteAlgProgramDialog::onacceptButton_Clicked()
+{
+ QString xmlfilepath = xmlfileSelectWidget->getValue();
+ QString exefilepath = exefileSelectWidget->getValue();
+
+ qDebug() <<"xmlpath :\t" << xmlfilepath;
+ qDebug() << "exepath :\t" << exefilepath;
+
+ // ȡexeļļ·
+ QString exeDirPath = QFileInfo(exefilepath).absolutePath();
+ qDebug() << "exedirpath :\t" << exeDirPath;
+
+ // cmdȽexeļĿ¼ȻִexeļΪxmlļ·
+ QString cmdstr = QString("cd /d %1 && %2 %3").arg(exeDirPath).arg(exefilepath).arg(xmlfilepath);
+ qDebug() << "cmdstr :\t" << cmdstr;
+ // ִcmd
+ QProcess* process = new QProcess(this);
+ process->setProcessChannelMode(QProcess::MergedChannels);
+
+
+ // Windows APIǿƵ
+ process->setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments* args) {
+ args->flags |= CREATE_NEW_CONSOLE; // ¿̨
+ args->startupInfo->wShowWindow = SW_SHOWNORMAL; // ʾ
+ args->startupInfo->dwFlags &= ~STARTF_USESTDHANDLES; // ñض[3,7](@ref)
+ });
+
+
+ // ʵʱȡ
+ connect(process, &QProcess::readyRead, [=]() {
+ QString output = QString::fromLocal8Bit(process->readAll());
+ qDebug() << "CMD Output:" << output;
+ });
+
+ // ó·Ͳ
+ process->start("cmd.exe", QStringList() << "/k" << cmdstr);
+
+ //
+ connect(process, &QProcess::errorOccurred, [](QProcess::ProcessError error) {
+ qDebug() << "Error:" << error;
+ });
+
+}
+
+void QWBFZExcuteAlgProgramDialog::oncancelButton_Clicked()
+{
+ this->close();
+}
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.h
new file mode 100644
index 0000000..335a8c3
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.h
@@ -0,0 +1,38 @@
+#pragma once
+#ifndef __QWBFZEXCUTEALGPROGRAMDIALOG_H__
+#define __QWBFZEXCUTEALGPROGRAMDIALOG_H__
+
+#include
+
+namespace Ui {
+ class QWBFZExcuteAlgProgramDialogClass;
+};
+
+
+class FileSelectWidget;
+
+
+class QWBFZExcuteAlgProgramDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ QWBFZExcuteAlgProgramDialog(QWidget *parent = nullptr);
+ ~QWBFZExcuteAlgProgramDialog();
+
+
+public slots:
+ void onacceptButton_Clicked(); // ȷť¼
+ void oncancelButton_Clicked(); // ȡť¼
+
+private:
+ Ui::QWBFZExcuteAlgProgramDialogClass* ui;
+ FileSelectWidget* xmlfileSelectWidget = nullptr; // xmlļѡ
+ FileSelectWidget* exefileSelectWidget = nullptr; // ļѡ
+};
+
+
+
+
+
+#endif
\ No newline at end of file
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.ui b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.ui
new file mode 100644
index 0000000..4944838
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/QWBFZExcuteAlgProgramDialog.ui
@@ -0,0 +1,32 @@
+
+
+ QWBFZExcuteAlgProgramDialogClass
+
+
+
+ 0
+ 0
+ 600
+ 400
+
+
+
+ QWBFZExcuteAlgProgramDialog
+
+
+ -
+
+
+ -
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.cpp b/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.cpp
new file mode 100644
index 0000000..ebb28e4
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.cpp
@@ -0,0 +1,240 @@
+#include "WBFZAlgComponetXmlParaseOperator.h"
+
+WBFZAlgComponetXmlParamenterItem::WBFZAlgComponetXmlParamenterItem(QDomElement* itemparameter, QObject* parent) :QObject(parent)
+{
+ if (nullptr == itemparameter) {
+ qDebug() << "itemparameter is nullptr.";
+ return;
+ }
+
+ this->ParaName = itemparameter->firstChildElement("ParaName").isNull() ? QString() : itemparameter->firstChildElement("ParaName").text();
+ this->ParaChsName = itemparameter->firstChildElement("ParaChsName").isNull() ? QString() : itemparameter->firstChildElement("ParaChsName").text();
+ this->Description = itemparameter->firstChildElement("Description").isNull() ? QString() : itemparameter->firstChildElement("Description").text();
+ this->Datatype = itemparameter->firstChildElement("DataType").isNull() ? QString() : itemparameter->firstChildElement("DataType").text();
+ this->ParaType = itemparameter->firstChildElement("ParaType").isNull() ? QString() : itemparameter->firstChildElement("ParaType").text();
+ this->ValueStr = itemparameter->firstChildElement("ParaValue").isNull() ? QString() : itemparameter->firstChildElement("ParaValue").text();
+}
+
+WBFZAlgComponetXmlParamenterItem::~WBFZAlgComponetXmlParamenterItem()
+{
+}
+
+WBFZAlgComponetXmlParaseOperator::WBFZAlgComponetXmlParaseOperator(QObject* parent) :QObject(parent)
+{
+}
+
+WBFZAlgComponetXmlParaseOperator::~WBFZAlgComponetXmlParaseOperator()
+{
+}
+
+void WBFZAlgComponetXmlParaseOperator::loadXmlFile(const QString& fileName)
+{
+ this->xmlFilePath = fileName;
+ this->parseXmlFile();
+}
+
+void WBFZAlgComponetXmlParaseOperator::writeXmlFile(const QString& formatfilepath, QString outfilepath, QString workspace, QMap inputParamslist)
+{
+ // ģxmlļ
+ QFile inputFile(formatfilepath);
+ if (!inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ qDebug() << "Failed to open input XML file.";
+ return;
+ }
+ // QDomDocument
+ QDomDocument doc;
+ if (!doc.setContent(&inputFile)) {
+ qDebug() << "Failed to parse input XML file.";
+ inputFile.close();
+ return;
+ }
+ // رļ
+ inputFile.close();
+
+ // Ĺռ·
+ QDomElement root = doc.documentElement();
+ QDomNodeList workspacePathNodes = root.elementsByTagName("WorkSpace");
+ if (workspacePathNodes.count() > 0) {
+ QDomElement workspacePathElement = workspacePathNodes.at(0).toElement();
+ workspacePathElement.firstChild().setNodeValue(workspace);
+ }
+ else {
+ qDebug() << "WorkspacePath not found.";
+ return;
+ }
+
+ // InputǩµParamǩµParaValueǩ
+ QDomNodeList InputsNodes = root.elementsByTagName("Inputs");
+ if (InputsNodes.count() > 0) {
+ QDomElement InputsElement = InputsNodes.at(0).toElement();
+ QDomNodeList parameterNodes = InputsElement.elementsByTagName("Parameter");
+ for (int i = 0; i < parameterNodes.count(); ++i) {
+ QDomElement parameterElement = parameterNodes.at(i).toElement();
+ QString paraName = parameterElement.firstChildElement("ParaName").text();
+ if (inputParamslist.contains(paraName)) {
+ QDomNodeList valueNodes = parameterElement.elementsByTagName("ParaValue");
+ if (valueNodes.count() > 0) {
+ valueNodes.at(0).firstChild().setNodeValue(inputParamslist.value(paraName));
+ }
+ }
+ }
+ }
+ else {
+ qDebug() << "Inputs not found.";
+ return;
+ }
+ // 7. ĺXMLļ
+ QFile outputFile(outfilepath);
+ if (!outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ qDebug() << "Failed to open output XML file.";
+ return;
+ }
+ // ĺдļ
+ QTextStream out(&outputFile);
+ out.setCodec("UTF-8");
+ doc.save(out, 4); // 4ʾ
+ outputFile.close();
+ qDebug() << "XML file written successfully.";
+
+
+
+
+}
+
+
+void WBFZAlgComponetXmlParaseOperator::parseXmlFile()
+{
+ // 1. Load the XML file
+ QFile file(xmlFilePath);
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ qDebug() << "Failed to open XML file.";
+ return;
+ }
+ // 2. Create a QDomDocument object
+ QDomDocument doc;
+ if (!doc.setContent(&file)) {
+ qDebug() << "Failed to parse XML file.";
+ file.close();
+ return;
+ }
+ // 3. Close the file
+ file.close();
+ // 4. Get the root element
+ QDomElement root = doc.documentElement();
+ // 5. Get the child elements of the root
+ QDomNodeList childNodes = root.childNodes();
+ // 6. get the workspace path node
+ QDomNodeList workspacePathNodes = root.elementsByTagName("WorkSpace");
+ if (workspacePathNodes.count() > 0) {
+ QDomElement workspacePathElement = workspacePathNodes.at(0).toElement();
+ this->workSpacePath = workspacePathElement.text();
+ }
+ else {
+ qDebug() << "WorkspacePath not found.";
+ return;
+ }
+ // 7. get Root/AlgCompt/Inputs µParameterӽڵ
+ QDomNodeList InputsNodes = root.elementsByTagName("Inputs");
+ QDomNodeList parameterNodes = InputsNodes.at(0).toElement().elementsByTagName("Parameter");
+ if (parameterNodes.count() > 0) {
+ for (int i = 0; i < parameterNodes.count(); ++i) {
+ QDomElement parameterElement = parameterNodes.at(i).toElement();
+ WBFZAlgComponetXmlParamenterItem* item = new WBFZAlgComponetXmlParamenterItem(¶meterElement,this);
+ this->ParameterList.append(item);
+ qDebug() << "read Parameter Name:" << item->getParaName();
+ if (item->getParaName().isEmpty()) {
+ QMessageBox::warning(nullptr, u8"", u8"Ϊ,xmlļʽ");
+ qDebug() << "read Parameter Name Error:" << item->getParaName();
+ return;
+ }
+ }
+ }
+ else {
+ qDebug() << "Parameter not found.";
+ return;
+ }
+}
+
+void WBFZAlgComponetXmlParaseOperator::displayParsedData()
+{
+}
+
+QString WBFZAlgComponetXmlParaseOperator::getWorkSpacePath() const
+{
+ return this->workSpacePath;
+}
+
+void WBFZAlgComponetXmlParaseOperator::setWorkSpacePath(const QString& path)
+{
+ this->workSpacePath = path;
+}
+
+QList WBFZAlgComponetXmlParaseOperator::getParameterList() const
+{
+ return ParameterList;
+}
+
+void WBFZAlgComponetXmlParaseOperator::setParameterList(const QList& list)
+{
+ this->ParameterList = list;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getParaName() const
+{
+ return this->ParaName;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setParaName(const QString& name)
+{
+ this->ParaName = name;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getParaChsName() const
+{
+ return this->ParaChsName;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setParaChsName(const QString& name)
+{
+ this->ParaChsName = name;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getDescription() const
+{
+ return this->Description;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setDescription(const QString& description)
+{
+ this->Description = description;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getDatatype() const
+{
+ return this->Datatype;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setDatatype(const QString& datatype)
+{
+ this->Datatype = datatype;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getParaType() const
+{
+ return this->ParaType;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setParaType(const QString& type)
+{
+ this->ParaType = type;
+}
+
+QString WBFZAlgComponetXmlParamenterItem::getValueStr() const
+{
+ return this->ValueStr;
+}
+
+void WBFZAlgComponetXmlParamenterItem::setValueStr(const QString& value)
+{
+ this->ValueStr = value;
+}
diff --git a/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.h b/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.h
new file mode 100644
index 0000000..52fc953
--- /dev/null
+++ b/Toolbox/KJ135WBJYAlgInterfaceToolbox/WBFZAlgComponetXmlParaseOperator.h
@@ -0,0 +1,96 @@
+#pragma once
+#ifndef __WBFZAlgComponetXmlParaseOperator_H__
+#define __WBFZAlgComponetXmlParaseOperator_H__
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "KJ135WBJYAlgWidgetComponet.h" // 㷨
+
+
+// 㷨xml
+class WBFZAlgComponetXmlParamenterItem :QObject
+{
+ Q_OBJECT
+public:
+ WBFZAlgComponetXmlParamenterItem(QDomElement* itemparameter,QObject* parent=nullptr);
+ ~WBFZAlgComponetXmlParamenterItem();
+private:
+ QString ParaName; //
+ QString ParaChsName;//
+ QString Description;//
+
+ QString Datatype;// Value //
+ QString ParaType;// string
+
+ QString ValueStr;
+
+public:
+ // getset
+ QString getParaName() const;
+ void setParaName(const QString& name);
+ QString getParaChsName() const;
+ void setParaChsName(const QString& name);
+ QString getDescription() const;
+ void setDescription(const QString& description);
+ QString getDatatype() const;
+ void setDatatype(const QString& datatype);
+ QString getParaType() const;
+ void setParaType(const QString& type);
+ QString getValueStr() const;
+ void setValueStr(const QString& value);
+
+};
+
+// 㷨xml
+class WBFZAlgComponetXmlParaseOperator :QObject
+{
+ Q_OBJECT
+public:
+ WBFZAlgComponetXmlParaseOperator(QObject* parent = nullptr);
+ ~WBFZAlgComponetXmlParaseOperator();
+ void loadXmlFile(const QString& fileName);
+
+ void writeXmlFile(const QString& formatfilepath, QString outfilepath,QString workspace, QMap inputParamslist);
+
+
+
+private:
+ void parseXmlFile();
+ void displayParsedData();
+
+private:
+ QString workSpacePath;
+ QString xmlFilePath;
+private:// ļṹ
+ QDomDocument doc; // xmlĵ
+ QDomElement rootElement; // ڵ
+ QDomElement workSpaceElement; // ռڵ
+ QList ParameterList; // б
+
+public:
+ QString getWorkSpacePath() const;// { return this->workSpacePath; } // ȡռ·
+ void setWorkSpacePath(const QString& path);// { this->workSpacePath = path; } // ùռ·
+ QList getParameterList() const; // { return this->ParameterList; } // ȡб
+ void setParameterList(const QList& list); //{ this->ParameterList = list; } // òб
+
+
+};
+
+
+
+#endif// __WBFZAlgComponetXmlParaseOperator_H__
+
diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.cpp b/Toolbox/SimulationSARTool/SimulationSARTool.cpp
index 0065394..d937bd1 100644
--- a/Toolbox/SimulationSARTool/SimulationSARTool.cpp
+++ b/Toolbox/SimulationSARTool/SimulationSARTool.cpp
@@ -39,7 +39,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
#ifdef __SIMULATIONSARTOOL__SARSATALLITESIMULATIONWORKFLOW__H__
- initSimulationSARToolSARSateSimulationWorkflow(toolbox);
+ // initSimulationSARToolSARSateSimulationWorkflow(toolbox);
#endif
diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj
index 6c19a14..562d754 100644
--- a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj
+++ b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj
@@ -134,7 +134,7 @@
compute_86,sm_86
- cufft.lib;%(AdditionalDependencies);cudart.lib;cudadevrt.lib
+ cufft.lib;cudart.lib;cudadevrt.lib;%(AdditionalDependencies)