#pragma once
|
|
#include <vector>
|
|
#include "CHEdgeTriangle/RecipeFormula.h"
|
#include "CHImageControls/CHImageData.h"
|
#include "CHReviewResult/DefectResult.h"
|
typedef std::vector<CCHImageData*> VectorImageData;
|
typedef std::vector<CCHImageData*>::iterator VectorImageDataIt;
|
|
namespace CHReviewResult
|
{
|
enum ReviewType { ReviewType_Review = 0, ReviewType_User, ReviewType_Wsi, ReviewType_Measure, ReviewType_Reflow, ReviewType_WsiReflow,ReviewType_WsiUser, ReviewType_Wsi_MultiShot
|
};
|
enum ReviewResultCode { ReviewResult_None = 0, ReviewResult_TriggerMissing=1, ReviewResult_Snap_Complete=3, ReviewResult_Processing=7, ReviewResult_Process_Fail=15, ReviewResult_Process_Complete=31 };
|
enum WsiResultCode { WsiResult_None = 0, WsiResult_Fail=1, WsiResultSuccess=2 };
|
enum MeasureResultCode { MeasureResult_None = 0, MeasureResult_Fail=1, MeasureResult_Success=2 };
|
// enum WSIResultInfo { Wsi_X_Height=0,
|
// Wsi_X_Width,
|
// Wsi_X_Area,
|
// Wsi_X_A_Ratio,
|
// Wsi_X_LEFT_1_A_Ratio,
|
// Wsi_X_LEFT_2_A_Ratio,
|
// Wsi_X_LEFT_3_A_Ratio,
|
// Wsi_X_LEFT_4_A_Ratio,
|
// Wsi_X_Right_1_A_Ratio,
|
// Wsi_X_Right_2_A_Ratio,
|
// Wsi_X_Right_3_A_Ratio,
|
// Wsi_X_Right_4_A_Ratio,
|
// Wsi_Result_Info_Count };
|
|
// [2016:11:20]-[WEZASW] : WSI ��� Data �� ����
|
enum WSIResultInfo { Wsi_X_Height=0,
|
Wsi_X_Width,
|
Wsi_X_Area,
|
Wsi_X_A_Ratio,
|
Wsi_Result_Info_Count };
|
|
// [2016:11:20]-[WEZASW] : WSI ��� Data �� ����
|
enum WSIReflowResultInfomation { WsiReflowInfo_AZoneJudge=0,
|
WsiReflowInfo_BZoneJudge,
|
WsiReflowInfo_CZoneJudge,
|
WsiReflowInfo_DZoneJudge,
|
WsiReflowInfo_PointIndex,
|
WsiReflowInfo_Result_Info_Count };
|
|
|
#define MAX_MEASURERESULT 10
|
#define MAX_IMAGEDATA 5 //Fix CD Measure 2016-03-23
|
|
// reflow
|
#define REFLOW_LINE_DATA 6
|
enum ReflowErrorInfo { ReflowError_WrongSide=-5,
|
ReflowError_RoiLengthError=-3,
|
ReflowError_RoiSettingError=-2,
|
ReflowError_ImageLoadFail=-1 };
|
}
|
|
using namespace CHReviewResult;
|
|
class AFX_EXT_CLASS SReviewResult : public CDefectResult
|
{
|
public:
|
SReviewResult();
|
virtual ~SReviewResult();
|
void Reset();
|
|
public:
|
CString ProcessID;
|
int nSequenceNo; // B7 Review Image Naming Rule
|
int nResultCode; // result code
|
int nReviewType; // Review, Measure, User, Wsi
|
int nModuleIdx; // module idx
|
int nResultIdx; // result idx
|
int nRangeIdx; // range idx
|
int nZoomIdx; // zoom idx
|
double dMagnification; // magnification
|
double dMeasureResolution; // resolution
|
int nLightLevel; // light level
|
int nExposureTime; // exposure time
|
BOOL bDigitalZoom; // digital zoom ?
|
double dRulerInterval; // ruler Interval
|
double dTargetMotorX; // ���� ��ǥ
|
double dTargetMotorY; // ���� ��ǥ
|
int nUMGrabPosX; // Snap Pos
|
int nUMGrabPosY; // Snap Pos
|
int nReviewSnapSerialNo; // serial no
|
CString strSnapTime; // snap time
|
double dDurationTime; // duration time
|
|
VectorImageData vectorImageData; // camera image
|
|
CString strImgFileName;
|
CString strImgFilePath;
|
|
int nMagnificationOffsetX;
|
int nMagnificationOffsetY;
|
|
// defect find data
|
int nReview_ResultCode;
|
int nReview_Width;
|
int nReview_Height;
|
int nReview_Length;
|
int nReview_Square;
|
int nReview_Stat;
|
|
// wsi data : ��� ���� �� �߰�
|
int nWsi_ResultCode; // ���� ����
|
int nWsi_Type; // �Ը� / ����
|
int nWsi_SlopeWarn;
|
double pWsi_ResultData[Wsi_Result_Info_Count]; // um
|
int nWsiReflowPositionIndex; // WsiReflowPositionIndex
|
int nWsi_pReflowResultData[WsiReflowInfo_Result_Info_Count];
|
double dWsi_DamDistance;
|
bool bBigSizeDefect;
|
int nMultiShotNum; //�Ŵ���� �Կ� ����
|
|
int nGlassType; //TFE=0,MN=1,QD=2,BANK=3 CS =4 CSG = 5
|
|
int nWsi_ResultIndex;
|
int nWsi_DefectType;
|
|
float fHeight;
|
float fWidthX;
|
float fWidthY;
|
float fAratio; //TFE
|
|
int nDecisionZoneA;
|
int nDecisionZoneB;
|
int nDecisionZoneC;
|
int nDecisionZoneD;
|
int nDecisionZoneE;
|
int nDecisionZoneF;
|
int nPointIndex;
|
int nDecisionZoneSlotB;
|
|
double dDistFromRef; //MN
|
|
int nJugementR;
|
int nJugementG;
|
int nJugementB;
|
double dRZoneHeight;
|
double dGZoneHeight;
|
double dBZoneHeight;
|
double dDefectHeight; //wsi Height
|
|
double dCSHeight; //cs
|
|
// measure data
|
int nMeasure_RecipeIndex;
|
int nMeasure_ResultCode;
|
VectorResultFormula vecMeasure_ResultData;
|
|
// reflow data
|
int nReflow_Result; // ������ Line�� ����. 3 �̸� : DAM2 Reflow ����, 4~5 : DAM1 Reflow ����, 6 : no Reflow ���� / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side
|
int pReflow_LinePosData[REFLOW_LINE_DATA]; // Line ��ǥ ��� �迭. DAM#2 �ٱ� 2 Lines, DAM#2, DAM#1 ������ ��ǥ�� �����(��, Pattern�� �������� �ٱ��ʺ��� ����)
|
int nReflow_Side;
|
int nInspectionMode;
|
int nReflow_CellIndex;
|
|
BOOL bCheckWSISendToMotor; //�������� ��ǥ �������� Ȯ��
|
BOOL bCheckSendToMotor; //WSI ����� �������� ��ǥ �������� Ȯ��
|
|
};
|
typedef std::vector<SReviewResult> VectorSReviewResult;
|
typedef std::vector<SReviewResult>::iterator VectorSReviewResultIt;
|
typedef std::vector<SReviewResult>::const_iterator constVectorSReviewResultIt;
|
|
class AFX_EXT_CLASS CReviewResult
|
{
|
public:
|
CReviewResult(int nModuleIndex=-1);
|
virtual ~CReviewResult(void);
|
void Reset();
|
|
double GetTotalReviewTime();
|
double GetTotalReviewTime(int nIndex);
|
double GetReviewTime(int nIndex);
|
double GetReviewTime(int nStartIdx, int nEndIdx);
|
|
void AddSReviewResult(const SReviewResult& reviewResult);
|
void ResizeReviewResult(int nCount);
|
|
BOOL CheckComplete() const;
|
|
int GetSReviewResultCount(int nResultCode=ReviewResult_None) const;
|
SReviewResult* GetSReviewResult(int nIndex);
|
const SReviewResult* GetSReviewResult(int nIndex) const;
|
VectorSReviewResult* GetVectorSReviewResult() { return &m_vecSReviewResult; }
|
const VectorSReviewResult* GetVectorSReviewResult() const { return &m_vecSReviewResult; }
|
|
|
void SetModuleIndex(int nIdx) { m_nModuleIndex = nIdx; }
|
int GetModuleIndex() const { return m_nModuleIndex; }
|
|
void SetLastSReviewResultIndex(int nIdx) { m_nLastSReviewResultIndex = nIdx; }
|
int GetLastSReviewResultIndex() const { return m_nLastSReviewResultIndex; }
|
|
void SetStartSReviewResultIndex(int nIdx) { m_nStartSReviewResultIndex = nIdx; }
|
int GetStartSReviewResultIndex() const { return m_nStartSReviewResultIndex; }
|
|
void SetEndSReviewResultIndex(int nIdx) { m_nEndSReviewResultIndex = nIdx; }
|
int GetEndSReviewResultIndex() const { return m_nEndSReviewResultIndex; }
|
|
void SetLastSReviewResultTick(DWORD dwTick) { m_dwLastSReviewResultTick = dwTick; }
|
DWORD GetLastSReviewResultTick() const { return m_dwLastSReviewResultTick; }
|
|
void SetCollisionPostionX(int nPosion) { m_nCollisionPositionX = nPosion; }
|
int GetCollisionPositionX() const { return m_nCollisionPositionX; }
|
|
public:
|
int m_nLastSReviewResultIndex;
|
int m_nStartSReviewResultIndex;
|
int m_nEndSReviewResultIndex;
|
DWORD m_dwLastSReviewResultTick;
|
|
int m_nModuleIndex;
|
|
int m_nCollisionPositionX;
|
|
//protected:
|
VectorSReviewResult m_vecSReviewResult;
|
|
};
|