Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
BExtractorDoc.h
1 //
2 // BExtractorDoc.h : interface of the BExtractorDoc class
3 //
4 // Copyright (c) 2001 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #if !defined(B_EXTRACTORDOC_H)
9 #define B_EXTRACTORDOC_H
10 
11 #if _MSC_VER >= 1000
12 #pragma once
13 #endif // _MSC_VER >= 1000
14 
15 #include "vtdata/StructArray.h"
16 #include "vtdata/Roadmap.h"
17 #include "Dib.h"
18 
19 class CBImage;
20 class BExtractorView;
21 
22 class BExtractorDoc : public CDocument
23 {
24 protected: // create from serialization only
25  BExtractorDoc();
26  DECLARE_DYNCREATE(BExtractorDoc)
27 
28 // Attributes
29 public:
30  HDRAWDIB m_hdd;
31  CBImage *m_pImage;
32  bool m_picLoaded;
33  vtStructureArray m_Buildings;
34  vtRoadMap m_Links;
35  float m_fScale;
36 
37 private:
38  CString m_roadFileName;
39 
40 public:
41  const vtProjection &GetProjection() { return m_proj; }
42  void OnImportimage2(LPCTSTR szPathName);
43 
44  void PreFloodFillDIB(CDib *bm);
45  void FloodFillDIB(CDib *bm, class CProgressDlg *prog);
46  int Fill(CDib *bm, int x, int y, byte ov, byte nv, int w, int h, int diag, int count = 0);
47 
48  // transform image space -> UTM space
49  double i_UTMx(int ix);
50  double i_UTMy(int iy);
51 
52 // Overrides
53  // ClassWizard generated virtual function overrides
54  //{{AFX_VIRTUAL(BExtractorDoc)
55  public:
56  virtual BOOL OnNewDocument();
57  virtual void Serialize(CArchive& ar);
58  virtual BOOL OnOpenDocument(LPCTSTR szPathName);
59  virtual BOOL OnSaveDocument(LPCTSTR szPathName);
60  //}}AFX_VIRTUAL
61  void DeleteContents();
62 
63 // Implementation
64 public:
65  virtual ~BExtractorDoc();
66 #ifdef _DEBUG
67  virtual void AssertValid() const;
68  virtual void Dump(CDumpContext& dc) const;
69 #endif
70  BExtractorView *GetView();
71 
72 protected:
73  vtProjection m_proj;
74 
75 // Generated message map functions
76 protected:
77  //{{AFX_MSG(BExtractorDoc)
78  afx_msg void OnImportimage();
79  afx_msg void OnFunctionsClearbuildings();
80  afx_msg void OnBcfcombine();
81  afx_msg void OnUpdateBcfcombine(CCmdUI* pCmdUI);
82  afx_msg void OnUpdateFileOpen(CCmdUI* pCmdUI);
83  afx_msg void OnUpdateFullres(CCmdUI* pCmdUI);
84  afx_msg void OnRmfOpen();
85  afx_msg void OnRmfSave();
86  afx_msg void OnRmfSaveAs();
87  afx_msg void OnUpdateRmfOpen(CCmdUI* pCmdUI);
88  //}}AFX_MSG
89  DECLARE_MESSAGE_MAP()
90 };
91 
93 
94 //{{AFX_INSERT_LOCATION}}
95 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
96 
97 #endif // !defined(B_EXTRACTORDOC_H)