
#define __TEST_IMAGEPROCESS
//#define __TESTMATHGL
//#define __TEST_FARFIELDFILEREADPROCESS

#ifdef __TESTMATHGL
#include <mgl2/mgl.h>
int main()
{
    mglGraph gr;
    gr.FPlot("sin(pi*x)");
    gr.WriteFrame("D:\\codestorage\\LAMPSARtool\\CPluseCpluse\\WBCLFZProgram\\WBCLFZProgram\\test.png");
}

#endif




#ifdef __TEST_IMAGEPROCESS


#include "LAMPTool.h"
#include <QtWidgets/QApplication>
#include "LampToolTest.h"
#include "FEKOSimulationSARClass.h"
#include <cmath>



int main(int argc, char* argv[])
{

    QApplication a(argc, argv);
    //LAMPTool w;
    //w.show();
    //a.exec();
    //TestImageBP_main(argc, argv);


    //====================================
    // 测试FEKO模型加载结果
    //====================================


    //QString antXmlPath = "D:\\codestorage\\LAMPSARtool\\CPluseCpluse\\WBCLFZProgram\\WBCLFZProgram\\help\\FEKOImageSettingTask.xml";
    //QString echocsvpath = u8"D:\\德清研究院加密\\项目\\项目文档归档\\FEKO知识库\\模型\\远场条带\\ball_001\\ball001_X_strip.csv";
    //QString thetafilepath = "";
    QString phifilepath = u8"D:/codestorage/LAMPSARtool/tmp/antSpace/TESTIMageProject.phi";
    QString tifffilepath = u8"D:/codestorage/LAMPSARtool/tmp/antSpace/TESTIMageProjectImage_phi.dat";
    FEKOBase::FEKOImageSettingParams imageparams{ -2.0,  2.0,     -2.0,   2.0,   0.0,  201,    201 };

    //FEKOBase::NearFieldEchoCSVParser nearfilePraseclass;
    //nearfilePraseclass.parseCSV(echocsvpath);
    //nearfilePraseclass.toPhiPolar(phifilepath);

    FEKOBase::EchoDataClass data;
    data.loadEchoData(phifilepath);
    FEKOBase::FEKOImageProcess(data, imageparams, tifffilepath);
    return 0;
}



#endif


#ifdef __TEST_FARFIELDFILEREADPROCESS
#include "LAMPTool.h"
#include "SARImage/FEKOBaseToolClass.h"
#include "FEKOFarFieldFileClass.h"
#include "FEKOSimulationSARClass.h"
int main() {
    QString ffe_filepath = u8"D:\\德清研究院加密\\项目\\项目文档归档\\FEKO知识库\\模型\\条带脉冲模型\\trihedral\\ant_SAR_new\\ant_SAR_Move\\ant_SAR_new_Horn_conical1_FarField.ffe";
    FEKOBase::FEKOFarFieldFileClass ffefile;
    std::cout << ffe_filepath.toLocal8Bit().constData()<< std::endl;
    ffefile.parseFarFieldFile(ffe_filepath);
    std::cout << "__TEST_FARFIELDFILEREADPROCESS" << std::endl;
}
#endif