123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #pragma once
- #include "afx.h"
- #include "Element.h"
- #include "CSpectrumData.h"
- namespace OTSDATA
- {
- class __declspec(dllexport) CPosXray/* : public CPosXrayInfo*/
- {
-
- public:
- CPosXray(); // constructor
- CPosXray(const CPoint); // constructor
- //CPosXray(CPosXrayInfo*); // constructor
- CPosXray(const CPosXray&); // copy constructor
- CPosXray(CPosXray*); // copy constructor
- CPosXray& operator=(const CPosXray&); // =operator
- virtual ~CPosXray(); // destructor
-
- // channels
- long GetChannelsNum() const { return GENERALXRAYCHANNELS; }
- // x-ray data
- DWORD* GetXrayData() const { return (DWORD*)m_nXrayData; }
- void SetXrayData(DWORD* a_pnXrayData);
- double GetXrayDataVectorNorm();
- DWORD GetTotalCount() const;
- void GetMaxHeightPosition(long& a_nMaxHeight, long& a_nPosition) const;
- // clear the x-ray data
- // if start position is [0, GENERALXRAYCHANNELS - 1], will do the clear
- void ClearXrayData(const long a_nStartPos = -1);
- // set x-ray data at channel
- void SetXrayDataAtChannel(DWORD a_nXray, const long a_nChannel);
- static CElementChemistriesList RemoveFe(CElementChemistriesList a_listElementChemistries);
- static CElementChemistriesList RemoveC(CElementChemistriesList a_listElementChemistries);
- //--------------------cposXrayinfo.h
-
- CPoint GetPosition() const { return m_poiPosition; }
- void SetPosition(const CPoint& a_poiPosition) { m_poiPosition = a_poiPosition; }
- // index for quantify identification
- long GetIndex() const { return m_nIndex; }
- void SetIndex(const long a_nIndex) { m_nIndex = a_nIndex; }
- // field id
- long GetScanFieldId() const { return m_nFieldId; }
- void SetScanFieldId(const long a_nScanfieldId) { m_nFieldId = a_nScanfieldId; }
- // particle tag id
- long GetPartTagId() const { return m_nPartTagId; }
- void SetPartTagId(const long a_nPartTagId) { m_nPartTagId = a_nPartTagId; }
- // feature id
- long GetFeatureId() const { return m_nFeatureId; }
- void SetFeatureId(const long a_nFeatureId) { m_nFeatureId = a_nFeatureId; }
- // element quantify data
- CElementChemistriesList& GetElementQuantifyData() { return m_listElementQuantifyData; }
- CString GetQuantifiedElementsStr();
- void AddQuantifyElement(CElementChemistryPtr che) { m_listElementQuantifyData.push_back(che); }
- void SetElementQuantifyData(CElementChemistriesList& a_listElementQuantifyData);
- void AddElementQuantifyData(CElementChemistryPtr a_ElementQuantifyData);
- void NormalizeXrayQuantifyData();
- // record this only for DB
- long GetElementNum() { return m_nElementNum; }
- void SetElementNum(long a_nElementNum) { m_nElementNum = a_nElementNum; }
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const CPosXray& a_oSource);
- // x-ray data
- DWORD m_nXrayData[GENERALXRAYCHANNELS];
- //--------------------------------------------cposXrayInfo.h
- // position
- CPoint m_poiPosition;
- // index
- long m_nIndex;
- // field id
- long m_nFieldId;
- // particle tag id
- long m_nPartTagId;
- // feature id
- long m_nFeatureId;
- // element quantify data
- CElementChemistriesList m_listElementQuantifyData;
- // record this only for DB
- long m_nElementNum;
- //--------------------------------------------
- CSpectrumData* m_spectrum;
- };
- typedef std::shared_ptr<CPosXray> __declspec(dllexport) CPosXrayPtr;
- typedef std::vector<CPosXrayPtr> __declspec(dllexport) CPosXrayList;
- }
|