Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin1/hugin/CPZoomDisplayPanel.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00024 #ifndef _CPZOOMDISPLAYPANEL_H 00025 #define _CPZOOMDISPLAYPANEL_H 00026 00027 #include <vector> 00028 00029 //#include <vigra_ext/ImageTransforms.h> 00030 //#include <hugin/ImageCache.h> 00031 #include <PT/PanoToolsInterface.h> 00032 00033 00038 class CPZoomDisplayPanel : public wxPanel, public PT::PanoramaObserver 00039 { 00040 // typedef PT::RemappedPanoImage<vigra::BRGBImage, vigra::BImage> RemappedImage; 00041 public: 00044 CPZoomDisplayPanel(wxWindow *parent, PT::Panorama & pano ); 00045 00048 virtual ~CPZoomDisplayPanel(); 00049 00050 // void panoramaChanged(PT::Panorama &pano); 00051 // void panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & imgNr); 00052 00054 void SetPoint(const FDiff2D & point) 00055 { 00056 m_validPoint = true; 00057 m_point = point; 00058 if (m_validImg) { 00059 updateInternal(); 00060 // update display 00061 wxPaintDC dc(this); 00062 OnDraw(dc); 00063 } 00064 } 00065 00068 void SetImage(unsigned int imgNr) 00069 { 00070 m_validImg = true; 00071 m_imgNr = imgNr; 00072 } 00073 00074 // do not display anything 00075 void Clear() 00076 { 00077 m_validImg = false; 00078 m_validPoint = false; 00079 // todo: draw blank space. (erase old image) 00080 } 00081 00082 // redraw 00083 void OnRedraw(wxPaintEvent & e); 00084 void OnSize(wxSizeEvent & e); 00085 protected: 00086 00087 // update the bitmap, and the transforms. 00088 void updateInternal(); 00089 00090 void OnDraw(wxDC & dc); 00091 // on left mousbutton 00092 void OnLMB(wxMouseEvent & e); 00093 00094 bool m_validPoint; 00095 bool m_validImg; 00096 00097 PT::Panorama & m_pano; 00098 00099 // the remapped bitmap 00100 wxBitmap m_bitmap; 00101 00102 // the other stuff 00103 00104 // the point 00105 FDiff2D m_point; 00106 unsigned int m_imgNr; 00107 00108 // transforms used for visualisation 00109 PTools::Transform m_t_img2center; 00110 PTools::Transform m_t_center2img; 00111 00112 DECLARE_EVENT_TABLE(); 00113 }; 00114 00115 00116 00117 #endif // _CPZOOMDISPLAYPANEL_H
1.3.9.1