#include "StdAfx.h"
|
#include "CHReviewSetting/HeaderInfo.h"
|
#include "CHReviewSetting/SystemInfo.h"
|
|
CMagnificInfo::CMagnificInfo(void)
|
{
|
Reset();
|
}
|
|
CMagnificInfo::~CMagnificInfo(void)
|
{
|
Reset();
|
}
|
|
void CMagnificInfo::Reset()
|
{
|
m_strMagnificName = _T("1.0X");
|
m_dMagnification = 1.0;;
|
m_dMagnificOffsetX = 0.0;
|
m_dMagnificOffsetY = 0.0;
|
m_dTestOffsetX = 0.0;
|
m_dTestOffsetY = 0.0;
|
m_nMsgHomePosition = 0;
|
}
|
|
void CMagnificInfo::SetInfo(const CMagnificInfo& rhs)
|
{
|
*this = rhs;
|
}
|
|
void CMagnificInfo::GetInfo(CMagnificInfo& rhs)
|
{
|
rhs = *this;
|
}
|
|
CHeaderInfo::CHeaderInfo(void)
|
{
|
Reset();
|
}
|
|
CHeaderInfo::~CHeaderInfo(void)
|
{
|
Reset();
|
}
|
|
void CHeaderInfo::Reset()
|
{
|
m_nModuleType = ModuleType_Review + ModuleType_Measure;
|
m_nLensType = LensType_SingleTube;
|
m_bStandardHeader = FALSE;
|
m_strYAxisName = _T("");
|
m_strZAxisName = _T("");
|
|
m_nLightIndex = -1;
|
m_nLightChannel = -1;
|
m_nRevolverIndex = -1;
|
m_nRevolverChannel = -1;
|
m_nAFMIndex = -1;
|
m_nAFMChannel = -1;
|
m_nWSIIndex = -1;
|
m_nWSIChannel = -1;
|
|
m_vecCameraInfo.clear();
|
m_vecLightInfo.clear();
|
m_vecRevolverInfo.clear();
|
m_vecAFMInfo.clear();
|
m_vecWsiInfo.clear();
|
m_vecMagnificInfo.clear();
|
}
|
|
CCameraControlInfo_Plus* CHeaderInfo::GetCameraInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecCameraInfo.size()) return NULL;
|
|
return &(m_vecCameraInfo[nIndex]);
|
}
|
|
const CCameraControlInfo_Plus* CHeaderInfo::GetCameraInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecCameraInfo.size()) return NULL;
|
|
return &(m_vecCameraInfo[nIndex]);
|
}
|
|
CLightControlInfo* CHeaderInfo::GetLightInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecLightInfo.size()) return NULL;
|
|
return &(m_vecLightInfo[nIndex]);
|
}
|
|
const CLightControlInfo* CHeaderInfo::GetLightInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecLightInfo.size()) return NULL;
|
|
return &(m_vecLightInfo[nIndex]);
|
}
|
|
CLensChangeControlInfo* CHeaderInfo::GetRevolverInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecRevolverInfo.size()) return NULL;
|
|
return &(m_vecRevolverInfo[nIndex]);
|
}
|
|
const CLensChangeControlInfo* CHeaderInfo::GetRevolverInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecRevolverInfo.size()) return NULL;
|
|
return &(m_vecRevolverInfo[nIndex]);
|
}
|
|
CAfmControlInfo* CHeaderInfo::GetAFMInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecAFMInfo.size()) return NULL;
|
|
return &(m_vecAFMInfo[nIndex]);
|
}
|
|
const CAfmControlInfo* CHeaderInfo::GetAFMInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecAFMInfo.size()) return NULL;
|
|
return &(m_vecAFMInfo[nIndex]);
|
}
|
|
CWsiControlInfo* CHeaderInfo::GetWsiInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecWsiInfo.size()) return NULL;
|
|
return &(m_vecWsiInfo[nIndex]);
|
}
|
|
const CWsiControlInfo* CHeaderInfo::GetWsiInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=(int)m_vecWsiInfo.size()) return NULL;
|
|
return &(m_vecWsiInfo[nIndex]);
|
}
|
|
void CHeaderInfo::SetInfo(const CHeaderInfo& rhs)
|
{
|
m_strYAxisName = rhs.m_strYAxisName;
|
m_strZAxisName = rhs.m_strZAxisName;
|
|
m_nLightIndex = rhs.m_nLightIndex;
|
m_nLightChannel = rhs.m_nLightChannel;
|
m_nRevolverIndex = rhs.m_nRevolverIndex;
|
m_nRevolverChannel = rhs.m_nRevolverChannel;
|
m_nAFMIndex = rhs.m_nAFMIndex;
|
m_nAFMChannel = rhs.m_nAFMChannel;
|
m_nWSIIndex = rhs.m_nWSIIndex;
|
m_nWSIChannel = rhs.m_nWSIChannel;
|
|
m_vecCameraInfo = rhs.m_vecCameraInfo;
|
m_vecLightInfo = rhs.m_vecLightInfo;
|
m_vecRevolverInfo = rhs.m_vecRevolverInfo;
|
m_vecAFMInfo = rhs.m_vecAFMInfo;
|
m_vecWsiInfo = rhs.m_vecWsiInfo;
|
m_vecMagnificInfo = rhs.m_vecMagnificInfo;
|
m_nModuleType = rhs.m_nModuleType;
|
m_nLensType = rhs.m_nLensType;
|
}
|
|
void CHeaderInfo::GetInfo(CHeaderInfo& rhs)
|
{
|
rhs.m_strYAxisName = m_strYAxisName;
|
rhs.m_strZAxisName = m_strZAxisName;
|
|
rhs.m_nLightIndex = m_nLightIndex;
|
rhs.m_nLightChannel = m_nLightChannel;
|
rhs.m_nRevolverIndex = m_nRevolverIndex;
|
rhs.m_nRevolverChannel = m_nRevolverChannel;
|
rhs.m_nAFMIndex = m_nAFMIndex;
|
rhs.m_nAFMChannel = m_nAFMChannel;
|
rhs.m_nWSIIndex = m_nWSIIndex;
|
rhs.m_nWSIChannel = m_nWSIChannel;
|
|
rhs.m_vecCameraInfo = m_vecCameraInfo;
|
rhs.m_vecLightInfo = m_vecLightInfo;
|
rhs.m_vecRevolverInfo = m_vecRevolverInfo;
|
rhs.m_vecAFMInfo = m_vecAFMInfo;
|
rhs.m_vecWsiInfo = m_vecWsiInfo;
|
rhs.m_vecMagnificInfo = m_vecMagnificInfo;
|
rhs.m_nModuleType = m_nModuleType;
|
rhs.m_nLensType = m_nLensType;
|
}
|
|
CMagnificInfo* CHeaderInfo::GetMagnificInfo(int nIndex)
|
{
|
if (nIndex<0 || nIndex>=GetMagnificInfoCount()) return NULL;
|
|
return &m_vecMagnificInfo[nIndex];
|
}
|
|
const CMagnificInfo* CHeaderInfo::GetMagnificInfo(int nIndex) const
|
{
|
if (nIndex<0 || nIndex>=GetMagnificInfoCount()) return NULL;
|
|
return &m_vecMagnificInfo[nIndex];
|
}
|