#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 __declspec(dllexport) CPosXrayPtr; typedef std::vector __declspec(dllexport) CPosXrayList; }