From 4114d380bd594385fa6f10bb36a9eef4d19e8db1 Mon Sep 17 00:00:00 2001
From: kojingeun <diteam.co.kr>
Date: 월, 05 6월 2023 23:33:58 +0900
Subject: [PATCH] Ongoing50 #4517 CF AOI Review 결과 파일 찾기 실패 개선 1. Find Bin File 찾는 Library 변경  - CRT _findfirsti64 / _findnexti64 -> C++17 Filesystem directory_iterator  - 파일 탐색 시간 20k Files(80GB) 1sec 소요

---
 ReviewHistory/ReveiwHistory/CameraImageView.h |  139 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 139 insertions(+), 0 deletions(-)

diff --git a/ReviewHistory/ReveiwHistory/CameraImageView.h b/ReviewHistory/ReveiwHistory/CameraImageView.h
new file mode 100644
index 0000000..8bf8388
--- /dev/null
+++ b/ReviewHistory/ReveiwHistory/CameraImageView.h
@@ -0,0 +1,139 @@
+癤�#pragma once
+
+#include "CHImageControls/CHImageData.h"
+
+#define IDR_LOAD_IMAGE		9000
+#define IDR_SAVE_IMAGE		9001
+#define IDR_ONLY_SAVE_IMAGE	9002
+
+#define IDR_CENTER_LINE		9100
+#define IDR_RULER			9101
+#define IDR_ROI_RECT		9102
+#define IDR_CLEAR_ROI_RECT	9103
+#define IDR_SAVE_ROI_RECT	9104
+	
+#define IDR_VIEW_ORIGIN		9200
+#define IDR_VIEW_FIT		9201
+
+#define IDR_VIEW_COLOR		9300
+#define IDR_VIEW_GRAY		9301
+#define IDR_VIEW_RED		9302
+#define IDR_VIEW_BLUE		9303
+#define IDR_VIEW_GREEN		9304
+
+
+// CDlgHistory ���솕 �긽�옄�엯�땲�떎.
+interface ICameraImageView2Parent
+{
+	virtual void CIV2P_GetImagePathName(CString& strFilename) = 0;
+	virtual void CIV2P_ManualSimulation(CCHImageData* pImageData) = 0;
+};
+
+class CCameraImageView : public CWnd, public CCHImageData
+{
+	DECLARE_DYNAMIC(CCameraImageView)
+
+public:
+	CCameraImageView(CWnd *pParentWnd);
+	virtual ~CCameraImageView();
+	void SetCIV2P(ICameraImageView2Parent* pCIV2P)		{ m_pCIV2P = pCIV2P; }
+
+	BOOL GetViewImage(CCHImageData* pImageData);
+	BOOL GetOriginImage(CCHImageData* pImageData);
+	BOOL SetViewImage(CCHImageData* pImageData);
+	BOOL SetOriginImage(CCHImageData* pImageData);
+	BOOL SetOriginImage(int nWidth, int nHeight, int nChannels, int nWidthStep, const BYTE* pBuffer);
+
+	// getter
+	int		GetScaleWidth(void);
+	int		GetScaleHeight(void);
+	int		GetHScrollPos(void);
+	int		GetVScrollPos(void);
+	double	GetWidthScale()		{ return m_dWidthScale; }
+	double	GetHeightScale()	{ return m_dHeightScale; }
+
+	// setter
+	void	SetDrawObject(BOOL bDraw);
+	void	SetDrawMode(int nDrawMode);
+	void	SetViewName(const CString strViewName);
+	void	SetParentWnd(CWnd* pParentWnd);
+	void	SetDrawCenterLine(BOOL bDraw);
+	void	SetDrawRuler(BOOL bDraw);
+
+	void	SetResolution(double dRes);
+	void	SetRulerGab(double dGab);
+
+	BOOL	LoadImage(const CString& strFilename);
+
+protected:
+	void	UpdateImageView(CDC *pDC);
+	void	DrawCenterLine(CDC *pDC);
+	void	DrawRuler(CDC *pDC);
+	void	DrawViewName(CDC *pDC);
+
+	ICameraImageView2Parent*	m_pCIV2P;
+
+	CRITICAL_SECTION	m_csImageData;
+	CWnd				*m_pParentWnd;
+	CString				m_strViewName;
+	CCHImageData		m_OriginImage;
+
+	// pre draw info
+	int			m_nViewBand;
+	CRect		m_rtClientRect;
+	int			m_nScaleWidth;
+	int			m_nScaleHeight;
+	double		m_dWidthScale; 
+	double		m_dHeightScale;
+
+	// Scroll Pos
+	int			m_nVScroll;
+	int			m_nHScroll;
+	// Max Scroll Pos
+	int			m_nMaxVScroll;
+	int			m_nMaxHScroll;
+
+	// image draw
+	int			m_nDrawMode;
+	BOOL		m_bDrawViewName;
+
+	BOOL		m_bDrawCenterLine;
+	BOOL		m_bDrawRuler;
+	double		m_dRulerGab;
+	double		m_dResolution;
+
+protected:
+	DECLARE_MESSAGE_MAP()
+	afx_msg void OnLoadImage();
+	afx_msg void OnSaveImage();
+	afx_msg void OnCenterLine();
+	afx_msg void OnRuler();
+	afx_msg void OnViewOrigin();
+	afx_msg void OnViewFit();
+	afx_msg void OnViewColor();
+	afx_msg void OnViewGray();
+	afx_msg void OnViewRed();
+	afx_msg void OnViewGreen();
+	afx_msg void OnViewBlue();
+	afx_msg void OnDestroy();
+	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
+	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
+
+	afx_msg void OnPaint();
+
+	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
+
+	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
+	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
+	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
+
+	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
+	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
+	afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
+	
+public:
+	
+};
+
+// typedef std::vector<CCameraImageView*>					VectorCameraImageView;
+// typedef std::vector<CCameraImageView*>::iterator		VectorCameraImageViewIt;

--
Gitblit v1.9.3