2022-03-19 20:43:29 +08:00
|
|
|
|
|
2022-03-19 21:04:48 +08:00
|
|
|
|
// MCADoc.h: CMCADoc 类的接口
|
2022-03-19 20:43:29 +08:00
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-05-30 16:36:01 +08:00
|
|
|
|
#include <string>
|
2022-03-19 20:43:29 +08:00
|
|
|
|
|
2022-03-19 21:04:48 +08:00
|
|
|
|
class CMCADoc : public CDocument
|
2022-03-19 20:43:29 +08:00
|
|
|
|
{
|
|
|
|
|
protected: // 仅从序列化创建
|
2022-03-19 21:04:48 +08:00
|
|
|
|
CMCADoc() noexcept;
|
|
|
|
|
DECLARE_DYNCREATE(CMCADoc)
|
2022-03-19 20:43:29 +08:00
|
|
|
|
|
|
|
|
|
// 特性
|
|
|
|
|
public:
|
2022-05-30 16:36:01 +08:00
|
|
|
|
int m_nChannelNum = 1024;
|
2022-03-20 15:14:44 +08:00
|
|
|
|
int *m_nChannelCount;
|
2022-03-19 20:43:29 +08:00
|
|
|
|
|
2022-05-30 16:36:01 +08:00
|
|
|
|
private:
|
|
|
|
|
// reference spectrum
|
|
|
|
|
double es_Co60[1024] = {};
|
|
|
|
|
double es_Cs137[1024] = {};
|
|
|
|
|
double es_Na22[1024] = {};
|
|
|
|
|
|
2022-03-19 20:43:29 +08:00
|
|
|
|
// 操作
|
|
|
|
|
public:
|
2022-05-30 16:36:01 +08:00
|
|
|
|
void random_peaks(std::string name);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
double uniform();
|
2022-03-19 20:43:29 +08:00
|
|
|
|
|
|
|
|
|
// 重写
|
|
|
|
|
public:
|
|
|
|
|
virtual BOOL OnNewDocument();
|
|
|
|
|
virtual void Serialize(CArchive& ar);
|
2022-05-30 16:36:01 +08:00
|
|
|
|
|
2022-03-19 20:43:29 +08:00
|
|
|
|
#ifdef SHARED_HANDLERS
|
|
|
|
|
virtual void InitializeSearchContent();
|
|
|
|
|
virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
|
|
|
|
|
#endif // SHARED_HANDLERS
|
|
|
|
|
|
|
|
|
|
// 实现
|
|
|
|
|
public:
|
2022-03-19 21:04:48 +08:00
|
|
|
|
virtual ~CMCADoc();
|
2022-03-19 20:43:29 +08:00
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
virtual void AssertValid() const;
|
|
|
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 生成的消息映射函数
|
|
|
|
|
protected:
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
#ifdef SHARED_HANDLERS
|
|
|
|
|
// 用于为搜索处理程序设置搜索内容的 Helper 函数
|
|
|
|
|
void SetSearchContent(const CString& value);
|
|
|
|
|
#endif // SHARED_HANDLERS
|
|
|
|
|
};
|