//-----------------------------------------------------------------------------
#ifndef LineProfileCanvasH
#define LineProfileCanvasH LineProfileCanvasH
//-----------------------------------------------------------------------------
#include "DrawingCanvas.h"

//-----------------------------------------------------------------------------
class LineProfileCanvas : public ImageAnalysisPlotCanvas
//-----------------------------------------------------------------------------
{
	int**				m_pHorData;
	int**				m_pVerData;
	int					m_horDataCount;
	int					m_verDataCount;
	void				DeallocateProfileBuffer( void );
	void				DrawProfileLine( wxPaintDC& dc, int h, int startOffset, double scaleX, double scaleY, int** pData, int elementCount, TPlane plane );
	void				ProcessRGB_8u_CxData( const ImageBuffer* pIB, const int inc, const int order[3] );
	template<typename _Ty>
	void				ProcessYUVData( const ImageBuffer* pIB );
	template<typename _Ty>
	void				ProcessYUV444Data( const ImageBuffer* pIB );
	template<typename _Ty>
	void				ProcessUYVData( const ImageBuffer* pIB );
	DECLARE_DYNAMIC_CLASS(LineProfileCanvas)
	DECLARE_EVENT_TABLE()
public:
	explicit			LineProfileCanvas() {}
	explicit			LineProfileCanvas( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
							const wxSize& size = wxDefaultSize, long style = wxSUNKEN_BORDER,
							const wxString& name = wxT("Line Profile"), bool boActive = false );
					   ~LineProfileCanvas();
	virtual wxString	GetGridValue( int row, int col ) const;
	void				OnPaint( wxPaintEvent& );
	virtual void		RefreshData( const RequestData& data, int x = -1, int y = -1, int w = -1, int h = -1, bool boForceRefresh = false );
};

#endif // LineProfileCanvasH
