| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- #pragma once
- #include "GBImgPropCal.h"
- #include "ReportProjFile.h"
- #include "PropParam.h"
- #include "SmplMsrResultFileMgr.h"
- #include "GridData.h"
- #include "OTSClassifyEng.h"
- #include "IncAFileMgr.h"
- #include "RptParamFile.h"
- namespace OTSMODEL {
- using namespace OTSDATA;
- const CString UNTITLED_NEW_FILE_NAME = _T("UntitledNew");
- const double Pi = 3.14159;
- class __declspec(dllexport) CReportProjFileMgr
- {
- public:
- CReportProjFileMgr(CReportProjFilePtr a_pReportProjFile); // constructor
- virtual ~CReportProjFileMgr(); // destructor
-
-
- // New
- BOOL NewFile();
- // Load
- BOOL Load(CString a_strPathname = _T(""));
- // Save
- BOOL Save();
- // Save as
- BOOL SaveAs();
- BOOL IsValid();
- // particle STD data
- CPartSTDDataPtr GetPartSTDData();
- BOOL SetPartSTDData(CPartSTDDataPtr a_pPartSTDData);
-
- // file modify flag
- BOOL IsModified() { return m_bModify; }
- void SetModify(BOOL a_bModify = TRUE) { m_bModify = a_bModify; }
- // set path name
- CString GetPathName() { return m_strPathName; }
- void SetPathName(CString a_strPathName) { m_strPathName = a_strPathName; }
- // sample measure result files
- CSmplMsrResultFileMgrList& GetSmplMsrResultMgrs() { return m_listSmplMgrs; }
- void SetSmplMsrResultMgrs(CSmplMsrResultFileMgrList a_listSmplMsrResultFileMgr);
- BOOL AddASmplMsrResultMgr(CString a_strPathName = _T(""));
- CSmplMsrResultFileMgrPtr GetASmplMsrResultMgrById(int a_nIndex);
- CSmplMsrResultFileMgrPtr GetASmplMsrResultMgrByPathName(CString a_strPathName);
- CSmplMsrResultFileMgrPtr GetASmplMsrResultMgrByFileName(CString a_strFileName);
- BOOL DeleteASmplMsrResultMgrById(int a_nIndex);
- BOOL DeleteASmplMsrResultMgrByPathName(CString a_strPathName);
- BOOL EditASmplMsrResultMgrById(int a_nIndex, CSmplMsrResultFileMgrPtr);
- // Get working sample
- CSmplMsrResultFileMgrPtr GetWorkingSmplMsrReslMgr();
- CString GetWorkingSampleName();
- BOOL SetWorkingSmplMsrReslMgr(CSmplMsrResultFileMgrPtr a_pSmplMsrResultMgr);
- // get file name
- CString GetFileName();
- //param set controller
- BOOL GetPartSizeFileList(int& a_nPos, std::vector<CString>& a_listPartSizeName);
- BOOL ChangePartSizeFromList(int a_nPos);
- // load column name string
- void LoadColumnString(std::vector<CString>& a_listStrings, UINT a_nFirstStringID, int nCount);
- void SetSelectedPicture(DISPLAY_PICTURE_TYPE a_nType);
- // set working sample index
- int GetWorkingSampleIndex() { return m_nWorkingSampeIndex; }
- void SetWorkingSampleIndex(int a_nWorkingSampleIndex) { m_nWorkingSampeIndex = a_nWorkingSampleIndex; }
- // part size index
- int GetPartSizeIndex() { return m_nPartSizeIndex; }
- void SetPartSizeIndex(int a_nPartSizeIndex) { m_nPartSizeIndex = a_nPartSizeIndex; }
-
- BOOL IsHaveMultiDataSource();
- // queryController content
- // property parameters
- BOOL ResetPropertyParams(BOOL a_bClear = FALSE);
- CPropParamsList& GetPropertyParams() { return m_listPropParams; }
- CPropParamPtr GetCurrentPropParam() { return m_CurrentPropParam; }
- void SetPropertyParams(CPropParamsList listPropertyParams);
- CPropParamPtr GetPropertyParamImage();
- CPropParamPtr GetPropertyParamGrid();
- CPropParamPtr GetPropertyParamChart();
- // report project file file
- CReportProjFilePtr GetReportProjFile() { return m_pReportProjFile; }
- void SetReportProjFile(CReportProjFilePtr a_pReportProjFile) { m_pReportProjFile = a_pReportProjFile; }
- // grid computing
- // grid computing
- CGridDatasList GridDataTransfer();
- // reclassify measure result
- BOOL ReClassify();
- // get inclusion index
- double GetInclusionIndex();
- COTSParticleList GetAnalysisParticleList(CString a_DataSourceName);
- // Get analysis x ray list
- CPosXraysList GetAnalysisXrayList(CString a_DataSourceName);
- // compute particle size distribution
- CGridDatasList CompParticleSizeDistribution();//原来是保护级别,现在改为公有
- double GetValueAsMethod(COTSParticlePtr a_pParticle, SIZE_CAL_METHOD_TYPE a_nMethod, double a_dPixelSize);
- CRptParamFilePtr GetRptParamFilePtr();
- protected:
- // property parameters list m_listPropParam contains 3 propParm object contrast to the Image、 Table and Chart tab
- CPropParamsList m_listPropParams;
- // the current PropParam object will change to the selected choice when the user click on the tab
- CPropParamPtr m_CurrentPropParam;
- // sample measure result files
- CSmplMsrResultFileMgrList m_listSmplMgrs;
- // file modify flag
- BOOL m_bModify;
- // path name
- CString m_strPathName;
- // working sample index
- int m_nWorkingSampeIndex;
- // part size index
- int m_nPartSizeIndex;
- //param file mgr
- //CRptParamFileMgr m_rptparamfilemgr;
- CRptParamFilePtr m_rptparamfile;
- // classify particle
- BOOL ClassifyParticles(COTSParticleList& a_listAnalysisParticles, CPosXraysList& a_listAnalysisXRay);
- BOOL ClassifyParticle(COTSParticlePtr a_pParticle, CPosXrayPtr a_pXRay);
- // get data source name list
- std::vector<CString> GetDataSourceNamesList();
- // get source name pos list
- std::vector<int> GetDataSourcePosList();
- // compute particle general information
- CGridDatasList CompParticleGenInfo();
- CSTDItemPtr GetParticleSTDItem(int STDItemId);
- bool GetSTDMapedParticleList( const COTSParticleList & a_listParticle, std::map<int, COTSParticleList>* mapSameSTDItemPartList);
- // compute particle general information according to particle list
- BOOL GetGenInfoFromParticleList(COTSParticleList a_listParticle, CPosXraysList a_listXray, double a_dPixelSize, CGridDataPtr a_pGridData);
- // compute particle component
- CGridDatasList CompParticleComponent();
- // compute particle component according to particle list
- BOOL GetComponentFromParticleList(COTSParticleList a_listParticle, SIZE_CAL_METHOD_TYPE a_nMethod, double a_dPixelSize, CGridDataPtr a_pGridData);
- // compute element component
- CGridDatasList CompElementComponent();
- BOOL GetElementComponentFromParticleList(COTSParticleList a_listParticleAll, CPosXraysList a_listXray, CGridDataPtr a_pGridData);
- // compute particle SizeDistribution according to particle list
- BOOL GetSizeDistributionFromParticleList(COTSParticleList a_listParticle, CGridDataPtr a_pGridData, double a_dPixelSize);
- // compute average element component
- CGridDatasList CompAveElemnetComponent();
- // compute average element component from particle list
- BOOL GetAveElementFromParticleList(COTSParticleList a_listParticleAll, CPosXraysList a_listXray, CGridDataPtr a_pGridData);
- // compute sort image class
- CGridDatasList CompSortClass();
- // compute sort class from particle list
- BOOL GetSortClassFromParticleList(COTSParticleList a_listParticleAll, CGridDataPtr a_pGridData);
- // compute sort image kind
- CGridDatasList CompSortKind();
- // compute sort king from particle list
- BOOL GetSortKindFromParticleList(COTSParticleList a_listParticleAll, CGridDataPtr a_pGridData);
- // compute sort image size
- CGridDatasList CompSortSize();
- // compute sort size from particle list
- BOOL GetSortSizeFromParticleList(COTSParticleList a_listParticleAll, double a_dPixelSize, CGridDataPtr a_pGridData);
- // compute sort image size
- CGridDatasList CompDistribution();//CGridInPtr a_pGridIn
- // compute sort size from particle list
- BOOL GetDistributionFromParticleList(CPropParamPtr a_prop, double a_dPixelSize, COTSParticleList a_listParticleAll, CGridDataPtr a_pGridData);
- // compute Ternary Phase from particle list
- // get element area list from particle list
- CElementChemistriesList GetUndefinedElementList(COTSParticleList a_listParticle, CPosXraysList a_listXray);
- CGridDatasList CompChartParticleComp();
- CGridDatasList CompChartElementComp();
- CGridDatasList CompChartParticleSize();
- //20190521 add common five classification
- BOOL GetCommonFiveFromParticleList(COTSParticleList a_listParticle, CGridDataPtr a_pGridData);
- CGridDatasList CompChartCommonFive();
- BOOL GetCommonClass( COTSParticlePtr a_pPart, INC_COMMON_CLASSIFY_TYPE& a_nType);
- BOOL EstimateShowColumn(CString a_strColName);
-
-
- protected:
- // report project file file
- CReportProjFilePtr m_pReportProjFile;
-
- };
- typedef std::shared_ptr<CReportProjFileMgr> __declspec(dllexport) CReportProjFileMgrPtr;
- }
|