📄 seqprocessdlg.h
字号:
// SeqProcessDlg.h : header file
//
#if !defined(AFX_SEQPROCESSDLG_H__EAB2FC84_C5D6_11D2_BB92_204C4F4F5020__INCLUDED_)
#define AFX_SEQPROCESSDLG_H__EAB2FC84_C5D6_11D2_BB92_204C4F4F5020__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "CDib.h"
#include "DlgLoadSequence.h"
#include "Matrix.h"
#include "DlgDisplayParams.h"
#include "InitialDirectory.h"
#include "FnMatrix.h"
#define MINWINDOWWIDTH 700
#define MINWINDOWHEIGHT 350
#define XWINDOWPOS 0 // image will be drawn starting from this many pixels
// from the right border of the dialog box
#define YWINDOWPOS 220 // image will be drawn starting from this many pixels
// from the top of the dialog box
// must be increased if you put controls, buttons
// at the top of the dialog window
#define BOUNDARYPOINTS 2000 // the maximum number of points on the
// object boundary
/////////////////////////////////////////////////////////////////////////////
// CSeqProcessDlg dialog
class CSeqProcessDlg : public CDialog
{
// Construction
public:
// My code starts
void InitializeFile(void);
void InitializeDraw(void);
void InitializePlay(void);
void InitializeWindowDisplay(void);
void EnableFileMenuItems( void);
void EnablePlayButtons(void);
void EnablePlayDlgItems(void);
void DisableFileMenuItems(void);
void DisablePlayButtons(void);
void DisablePlayDlgItems(void);
void DrawdcMem2dc(void);
void GotoFrame(int fr);
void OnCancel(void);
void OnOK(void);
BOOL OpenFile( CString& strFileName, CString& strFileTitle,
CString strFileExtension, CString strInitialDir, CString strOpenTitle,
char* strFilter, BOOL isReadFile);
BOOL LoadAndDisplaySingleImage( CString strFileName);
//////////////
void DrawCurrentImage(void);
void DrawMatrix(matrix& image, int xPos, int yPos, int ScaleFac, CString text);
BOOL IsWithinImageDisplay(int x, int y);
void FindImageCoordinates(int x, int y);
void OnPlayStart(void);
void OnPlayStop(void);
void OnPlayNext(void);
void OnPlayPrev(void);
void SaveMatrix( matrix& img, CString& title, CString strInitDir);
BOOL GetFileName( CString& strFileName, CString& text, BOOL IsReadFile, CString strInitialDir );
// function of matrix* Affine member
matrix ReadBmp( CString filename);
void SaveAsBmp( matrix image, CString filename);
Graph_elem*** graph_array;
Active_List_elem* index_array[Max_cost+1];
CPoint seed_point,seed_point2,free_point;
CPoint seed_array[40],next_seed_array[40];
int seed_count;
matrix *GradientMagnitude;
matrix *LaplacianMap;
matrix mat_saved;
BOOL cost_calculated,finish;
struct Live_wire_elem* first;
struct Contour* FirstPoint;
struct Contour* LastPoint;
// Data Members
int m_direction;
int m_width;
int m_height;
int scale; //cigdem, scaling factor for drawing
BOOL NewImage; //cigdem, indicates new image is loaded
int xPosWindow;
int yPosWindow;
// Window title text
CString m_windowText;
// Dialog Members
CDlgLoadSequence dlgLoadSequence;
CDlgDisplayParams m_dlgDisplayParams;
// BMP display
CDib *dibSeq; // pointer to DIB sequence
CBitmap bitmapDraw; // BMP with drawings on it
CDC dcMemDraw; // memory DC with drawings on it
int currentFrame; // current frame being displayed
// Flags for edit boxes on the dialog
BOOL isEditCurrentFrameNumber;
BOOL isEditFromFrameNumber;
BOOL isEditToFrameNumber;
InitialDirectory m_initDir;
// My code ends
CSeqProcessDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CSeqProcessDlg)
enum { IDD = IDD_SEQPROCESS_DIALOG };
CListBox m_listSize2;
CListBox m_listSize1;
CSliderCtrl m_sliderframe;
int m_currentframe;
int m_fromframe;
int m_toframe;
double m_posX;
double m_posY;
int m_startframe;
int m_endframe;
BOOL m_check_frame;
double m_editWeight1;
double m_editWeight2;
double m_editGradDir;
double m_editGradMag;
double m_editLap;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSeqProcessDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CSeqProcessDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnDestroy();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButtonBackward();
afx_msg void OnButtonForward();
afx_msg void OnButtonHome();
afx_msg void OnButtonEnd();
afx_msg void OnButtonStop();
afx_msg void OnChangeEditCurrentframe();
afx_msg void OnKillfocusEditCurrentframe();
afx_msg void OnChangeEditFromframe();
afx_msg void OnKillfocusEditFromframe();
afx_msg void OnChangeEditToframe();
afx_msg void OnKillfocusEditToframe();
afx_msg void OnFileLoadsequence();
afx_msg void OnFileExit();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnCheckFrameMode();
afx_msg void OnParametersDisplay();
afx_msg void OnFileOpenBmp();
afx_msg void OnDenemeProcessImage();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnButtonDeneme();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnFileSaveas();
afx_msg void OnDenemeSeedtrack();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
matrix* Affine;
int sizeAffine;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SEQPROCESSDLG_H__EAB2FC84_C5D6_11D2_BB92_204C4F4F5020__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -