| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #pragma once
- #include "GridData.h"
- #include "GBFieldData.h"
- #include "ReportMgr.h"
- namespace OTSGBCalculate
- {
- //define String Resources for GB Grid
- using namespace OTSMODEL;
- class __declspec(dllexport) CGBCalculate
- {
- public:
- CGBCalculate(CReportMgr* rptMgrPtr);
- ~CGBCalculate();
- CGridDatasList GetGBInclusion();
- const int GB_FIELD_WIDTH = 707;
- protected:
- //计算一个数据源中所获得的GBFields转化的统计数据
- CGridDatasList GetGridDataListForOneDataSource(CGBFieldList listCGBField, CALCULATE_TABLE_TYPE tableType);
- //计算一个数据源中所获得的GBFields转化的统计数据德标
- CGridDatasList GetGridDataListForOneDataSourceDIN(COTSParticleList listParticle, CALCULATE_TABLE_TYPE tableType);
- //获得所有计算得到的国标Field及particle的分级信息
- CGridDataPtr GetGBFieldGrid(CGBFieldList listCGBField);
- std::string GetLevelStr(GB_GRADE_TYPE l);
- CGridDataPtr GetGridLevel(CString GridType, int a_nLevel[], int a_nLevel_w[], int a_nLevel_s[]);
- CGridDataPtr GetGridDIN(COTSParticleList cotsparticlelistA, set<COTSParticlePtr> cotsparticlelistB, COTSParticleList cotsparticlelistC, COTSParticleList cotsparticlelistD);
- CGridDataPtr GetGridDSLevel(CGBFieldList DsFrames);
- void SetFrameLevelNo(GB_GRADE_TYPE levela, int nALevel[]);
- // calculate GB fields
- CGBFieldList CalGBFields(CSmplMsrResultFileMgr* pSmplMgr);
- // calculate how many fields needed (horizontal)
- void CalOTSFieldsNo(int& a_nRow, int& a_nColumn, int a_nFieldWidth);
- // convert ots fields to gb fields
- BOOL OTSFieldToGBField(COTSFieldDataList allOTSFields, CGBFieldList* m_listGBFields, int a_nRow, int a_nColumn, CSize sizePixelImage,int a_nFieldWidth);
- //get the GB field within thr rectangle
- CGBFieldDataPtr GetOneGBField(CRect a_rectGBField, COTSFieldDataList& a_listOTSFields, int a_nRow, int a_nColumn, CSize sizePixelImage, int a_nFieldWidth);
- // normalize particles for the GBFields
- CGBFieldDataPtr NormalizeParticles(CRect a_rectGBField, COTSFieldDataList a_listOTSFields, CSize sizePixelImage, int a_nFieldWidth);
-
- BOOL GetGBFieldSegmentsList(int nColum, int nRow, COTSParticleList a_listOTSFieldParticles, int a_nCalNo,COTSSegmentsList &a_listGBFieldSegments, CSize a_sizePixelImage, int a_nFieldWidth);
- // merge the segment
- BOOL MergSegment(COTSSegmentsList &a_listGBFieldSegments, COTSSegmentPtr pGBFieldSegment, int a_nLastSegmentNo);
- // merge the segment,get new particles
- BOOL GetGBParticles(COTSSegmentsList a_listGBFieldSegments, COTSParticleList &a_listNormalizedParticles);
- // get feature list of up-down segment
- //BOOL GetFeatureList(COTSSegmentsList& a_listSegments, COTSFeatureList& a_listFeatures);
- BOOL GetFeatureList1(COTSSegmentsList & a_listSegments, COTSFeatureList & a_listFeatures);
- // change feature into particle
- BOOL ChangeFeaturelist(COTSFeatureList& a_listFeatures, COTSParticleList& a_listParticle);
- // particle list
- DOUBLE& GetPixSize() { return PixSize; }
- void SetPixSize(double p);
- DOUBLE PixSize;
- //pointer to the whole reportprojfilemgr
- CReportMgr* m_rptMgrPtr;
- };
-
- }
|