RasterProcessTool/LAMPSARProcessProgram/ToolBox/LAMPScatterTool/LAMPScatterS1B.h

90 lines
2.0 KiB
C
Raw Normal View History

#pragma once
#ifndef _LAMPSCATTERS1B_H_
#define _LAMPSCATTERS1B_H_
#include <stdlib.h>
#include <QString>
#include <netcdf.h>
#include <complex>
#include <memory>
#include <Qset>
#include <QMap>
#include <flann/flann.hpp>
#include <memory>
#include <vector>
inline void LAMPScatterS1BdelArrPtr(void* p)
{
delete[] p;
p = nullptr;
}
class LAMPScatterS1BRCSDataNode {
public:
LAMPScatterS1BRCSDataNode(QString PolarName, double AzAngle, double IncAngle,std::shared_ptr<double> freqs, std::shared_ptr<double> RCSPoints,long freqnumber);
~LAMPScatterS1BRCSDataNode();
public:
long getFreqPointNumber();
std::shared_ptr<double> getFreqPoints();
std::shared_ptr<double> getRCSPoints();
QString getPolarName();
double getAzAngle();
double getIncAngle();
private:
double AzAngle;
double IncAngle;
long FreqPointNumber;
std::shared_ptr<double> FreqPoints;
std::shared_ptr<double> RCSPoints;
QString PolarName;
};
class LAMPScatterS1BPolarKdTree {// <20><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9> kdTree<65><65>Ϊ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD>
public:
LAMPScatterS1BPolarKdTree(std::vector<std::shared_ptr< LAMPScatterS1BRCSDataNode >> inDatalist);
~LAMPScatterS1BPolarKdTree();
public:
QVector<std::shared_ptr< LAMPScatterS1BRCSDataNode >> search(double sAzAngle, double sIncAngle,long sPointNumber);
private: //kdtree
std::vector<std::vector<double>> dataset;
std::shared_ptr < flann::Matrix<double>> KdtreeFlannDatasetPtr;
std::shared_ptr < flann::Index<flann::L2<double>>> kdtreeIndexPtr;
private:
std::vector<std::shared_ptr< LAMPScatterS1BRCSDataNode >> datalist; //<2F><><EFBFBD>нڵ<D0BD>
};
class LAMPScatterS1BDataset
{
public:
int OpenFile(QString s1bfilepath);
public:
std::complex<double> getRCSData(QString polarName, double AzAngle, double IncAngle, double FreqId);
private:
long FreqPointNumber;
long polNumber;
long AzNumber;
long IncNumber;
QMap<QString,std::shared_ptr<LAMPScatterS1BPolarKdTree>> polarRCSTree;
private:
QMap<QString,QString> ReadPolAttribution(int ncid, int polvarid);
};
#endif