Hugin trunk 0.1
Loading...
Searching...
No Matches
ImagesPanel.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _IMAGESPANEL_H
25#define _IMAGESPANEL_H
26
27#include "hugin/MainFrame.h"
28
30
31// forward declarations, to save the #include statements
32class ImagesTreeCtrl;
33
40class ImagesPanel: public wxPanel, public HuginBase::PanoramaObserver
41{
42public:
44
45 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
46
47 void Init(HuginBase::Panorama * pano);
48
50
67// virtual void panoramaChanged(HuginBase::Panorama &pano);
69 virtual void panoramaChanged(HuginBase::Panorama & pano);
70 virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet & imgNr);
75
83 void RunCPGenerator(const HuginBase::UIntSet& img);
86protected:
88 void OnOptimizeButton(wxCommandEvent &e);
90 void OnPhotometricOptimizeButton(wxCommandEvent &e);
91
92private:
93 // a window event
94 void OnSize(wxSizeEvent & e);
95
98
100 void CPGenerate(wxCommandEvent & e);
105
107 void OnLensTypeChanged(wxCommandEvent & e);
109 void OnFocalLengthChanged(wxCommandEvent & e);
111 void OnCropFactorChanged(wxCommandEvent & e);
113 void OnMinimumOverlapChanged(wxCommandEvent & e);
115 void OnMaxEvDiffChanged(wxCommandEvent& e);
116
118 void OnGroupModeChanged(wxCommandEvent & e);
120 void OnDisplayModeChanged(wxCommandEvent & e);
122 void OnOptimizerSwitchChanged(wxCommandEvent &e);
124 void OnPhotometricOptimizerSwitchChanged(wxCommandEvent &e);
126 void FillGroupChoice();
128 void FillOptimizerChoice();
129
130 void DisableImageCtrls();
131 void EnableImageCtrls();
132
134 void ShowImage(unsigned int imgNr);
135 void UpdatePreviewImage();
136
139
142
154 wxTextCtrl *m_focallength;
156 wxTextCtrl *m_cropfactor;
158 wxTextCtrl *m_overlap;
160 wxTextCtrl *m_maxEv;
162
166 //storing for different cp detector settings
168
171
173};
174
176class ImagesPanelXmlHandler : public wxXmlResourceHandler
177{
179
180public:
182 virtual wxObject *DoCreateResource();
183 virtual bool CanHandle(wxXmlNode *node);
184};
185
186#endif // _IMAGESPANEL_H
GuiLevel
Definition GuiLevel.h:32
class for storing settings of different control point generators
unsigned int GetDefaultGenerator()
return index of default generator (this one is used for assistent)
ArraySettings settings
array which stores the different autopano settings
class, which stores all settings of one cp detector
std::shared_ptr< Request > RequestPtr
Reference counted request for an image to load.
Definition ImageCache.h:151
this handler class will receive change events from the Panorama.
Model for a panorama.
Definition Panorama.h:153
virtual bool CanHandle(wxXmlNode *node)
virtual wxObject * DoCreateResource()
Hugin's first panel.
Definition ImagesPanel.h:41
void OnFocalLengthChanged(wxCommandEvent &e)
updates the focal length for the selected images
wxStaticBitmap * m_smallImgCtrl
pointer to the preview image control
void OnLensTypeChanged(wxCommandEvent &e)
updates the lens type for the selected images
void OnMinimumOverlapChanged(wxCommandEvent &e)
updates the minimum overlap
void OnPhotometricOptimizerSwitchChanged(wxCommandEvent &e)
event handler, when photometric optimizer master switch was changed
void OnGroupModeChanged(wxCommandEvent &e)
event handler when grouping selection was changed
wxChoice * m_CPDetectorChoice
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
wxString GetCurrentOptimizerString()
return the currently selected optimizer setting as string from the drop down list box
void RunCPGenerator(CPDetectorSetting &setting, const HuginBase::UIntSet &img)
run the cp generator with the given setting on selected images
wxChoice * m_groupModeChoice
HuginBase::ImageCache::RequestPtr thumbnail_request
Request for thumbnail image.
void CPGenerate(wxCommandEvent &e)
control point detection event handler
size_t m_showImgNr
void EnableImageCtrls()
wxButton * m_matchingButton
wxBitmap m_empty
bitmap with default image
wxChoice * m_optChoice
pointer to optimizer switch selector
void SetGuiLevel(GuiLevel newGuiLevel)
sets the GuiLevel for all controls on this panel
void OnCropFactorChanged(wxCommandEvent &e)
updates the crop factor for the selected images
virtual void panoramaChanged(HuginBase::Panorama &pano)
this is called whenever the panorama has changed.
wxTextCtrl * m_focallength
the text input control for focal length
wxChoice * m_optPhotoChoice
pointer to photometric optimizer switch selector
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
notifies about changes to images
void UpdatePreviewImage()
void DisableImageCtrls()
void OnSize(wxSizeEvent &e)
void FillOptimizerChoice()
fills the optmizer wxChoices with values depending on GuiLevel
GuiLevel m_guiLevel
void OnSelectionChanged(wxTreeEvent &e)
change displayed variables if the selection has changed.
wxChoice * m_lenstype
pointer to lens type selector
void OnOptimizeButton(wxCommandEvent &e)
event handler for geometric optimizer
CPDetectorConfig cpdetector_config
void ReloadCPDetectorSettings()
Reloads the cp detector settings from config, necessary after edit preferences.
void OnOptimizerSwitchChanged(wxCommandEvent &e)
event handler, when optimizer master switch was changed
void FillGroupChoice()
fills the grouping wxChoice with values depending on GuiLevel
HuginBase::Panorama * m_pano
the model
Definition ImagesPanel.h:97
wxTextCtrl * m_maxEv
the text input control for max ev difference
wxTextCtrl * m_cropfactor
the text input control for crop factor
void OnDisplayModeChanged(wxCommandEvent &e)
event handler when display mode (which information should be shown) was changed
void OnMaxEvDiffChanged(wxCommandEvent &e)
updates the max ev difference
void ShowImage(unsigned int imgNr)
show a bigger thumbnail
ImagesTreeCtrl * m_images_tree
pointer to the main control
const wxString GetSelectedCPGenerator()
return the currently selected cp generator description
void Init(HuginBase::Panorama *pano)
CPDetectorSetting & GetDefaultSetting()
returns the default cp detector settings
Definition ImagesPanel.h:74
wxTextCtrl * m_overlap
the text input control for minimum overlap
void OnPhotometricOptimizeButton(wxCommandEvent &e)
event handler for photometric optimizer
the main images tree control, used on images and optimizer tabs
Definition ImagesTree.h:37
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