Hugin trunk 0.1
Loading...
Searching...
No Matches
OptimizePanel.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _OPTIMIZE_PANEL_H
25#define _OPTIMIZE_PANEL_H
26
27#include <panodata/Panorama.h>
28#include <wx/xrc/xmlres.h>
29#include "GuiLevel.h"
30
31class ImagesTreeCtrl;
32class wxCheckBox;
33
38class OptimizePanel : public wxPanel, public HuginBase::PanoramaObserver
39{
40
41
42public:
44
46 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
47
48 virtual ~OptimizePanel();
49
50 void Init(HuginBase::Panorama * pano);
51
53 virtual void panoramaChanged(HuginBase::Panorama & pano);
55 virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet & imgNr);
56
58 void OnOptimizeButton(wxCommandEvent & e);
60 void OnCheckOnlyActiveImages(wxCommandEvent &e);
62 void SetOnlyActiveImages(const bool onlyActive);
64 void OnCheckIgnoreLineCP(wxCommandEvent &e);
66 void SetIgnoreLineCP(const bool noLineCp);
68
69protected:
70
71 void OnClose(wxCloseEvent& e);
72 void OnReset(wxCommandEvent& e);
73
74 void runOptimizer(const HuginBase::UIntSet & img, const bool ignoreLineCp);
75
76 bool AskApplyResult(wxWindow* activeWindow, const HuginBase::Panorama & pano);
77
80
84
86private:
88};
89
90
92class OptimizePanelXmlHandler : public wxXmlResourceHandler
93{
95
96public:
98 virtual wxObject *DoCreateResource();
99 virtual bool CanHandle(wxXmlNode *node);
100};
101
102
103#endif // _OPTIMIZE_PANEL_H
declaration of helper for work with different GuiLevels
GuiLevel
Definition GuiLevel.h:32
this handler class will receive change events from the Panorama.
Model for a panorama.
Definition Panorama.h:153
the main images tree control, used on images and optimizer tabs
Definition ImagesTree.h:37
virtual wxObject * DoCreateResource()
virtual bool CanHandle(wxXmlNode *node)
run the optimizer.
HuginBase::Panorama * m_pano
void SetGuiLevel(GuiLevel newGuiLevel)
bool AskApplyResult(wxWindow *activeWindow, const HuginBase::Panorama &pano)
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
receives notification about panorama changes
void OnCheckOnlyActiveImages(wxCommandEvent &e)
handle "only active images" checkbox
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
Delayed creation.
void OnClose(wxCloseEvent &e)
void SetOnlyActiveImages(const bool onlyActive)
for external setting of "only active image" checkbox
void OnOptimizeButton(wxCommandEvent &e)
run the optimizer
void Init(HuginBase::Panorama *pano)
void runOptimizer(const HuginBase::UIntSet &img, const bool ignoreLineCp)
wxCheckBox * m_edit_cb
wxCheckBox * m_ignore_line_cp
virtual void panoramaChanged(HuginBase::Panorama &pano)
receives notification about panorama changes
wxCheckBox * m_only_active_images_cb
ImagesTreeCtrl * m_images_tree_list
void OnCheckIgnoreLineCP(wxCommandEvent &e)
handle "ignore line cp" checkbox
void SetIgnoreLineCP(const bool noLineCp)
for external setting of "ignore line cp" checkbox
virtual ~OptimizePanel()
ImagesTreeCtrl * m_lens_tree_list
void OnReset(wxCommandEvent &e)
std::set< unsigned int > UIntSet
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41