// Roi.h: interface for the CRoiA class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ROI_H__95D6F283_575E_11D2_9A26_00403354E42C__INCLUDED_) #define AFX_ROI_H__95D6F283_575E_11D2_9A26_00403354E42C__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 typedef enum { ROI_DATA_INVALID, ROI_DATA_BAD, ROI_DATA_MARGINAL, ROI_DATA_GOOD } RoiDataKind; class CRoiEntry { public: //int m_gain; int m_start; // channel int m_end; double m_total; double m_net; double m_centroid; double m_uncertainty; double m_fwhm; double m_max; double m_leftWidth; double m_rightWidth; int m_status; //void ThreePointROISmooth(double *buffer); //void FivePointROISmooth(double *buffer); //double VarianceFWHM(double VMu, double VNet, double Vdnoise, double Vnoise1, double *Vdata, int Vlen); // void CalculatePeakData(double *buffer); CRoiEntry(){m_status = ROI_DATA_INVALID;} CRoiEntry(int st, int en) { m_start = st; m_end = en; m_status = ROI_DATA_INVALID; } }; class CRoi : public CArray { public: int m_count; int m_selectIndex; //int m_gain; CRoi(){m_count = 0; m_selectIndex = -1;} void Insert(int i, int st, int en); int InsertSorted(int st, int en); void AddRoi(int st, int en){Insert(m_count, st, en);} void Remove(int i); void Clear(void); void CopyRoi(CRoi &src){Copy(src); m_count = src.m_count; m_selectIndex = src.m_selectIndex;} int AtChannel(int chan); void CalculateRoiInfo(double *buffer); }; ///////////////////////////////////////////////////////////////////////////// // CRoiDlg dialog typedef enum { ROI_DLG_FOCUS_NONE, ROI_DLG_FOCUS_START, ROI_DLG_FOCUS_END } RoiFocus; class CSpectrum; #endif // !defined(AFX_ROI_H__95D6F283_575E_11D2_9A26_00403354E42C__INCLUDED_)