Hugin trunk 0.1
Loading...
Searching...
No Matches
PanoPanel.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
26#ifndef _PANOPANEL_H
27#define _PANOPANEL_H
28
29#include "hugin/MainFrame.h"
30#include "GuiLevel.h"
31
32class PanoDialog;
33class wxSpinCtrl;
34class wxTextCtrl;
35class wxChoice;
36class wxComboBox;
37
43class PanoPanel: public wxPanel, public HuginBase::PanoramaObserver
44{
45public:
46
47 PanoPanel();
48
49 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
50
52
53 virtual ~PanoPanel(void) ;
54
73
75 void DoStitch(const wxString& userDefinedSetting = wxEmptyString, const bool readSetting = true);
79 void DoUserDefinedStitch(const wxString& settings = wxString());
83
86
87 private:
88
91
96
97
98 // apply changes from the model
100 void UpdateDisplay(const HuginBase::PanoramaOptions & opt, const bool hasStacks);
102
103 // apply changes to the model. (gui values -> Panorama)
104 void QuickModeChanged(wxCommandEvent & e);
106
107 void HFOVChanged(wxCommandEvent & e);
109 void VFOVChanged(wxCommandEvent & e );
111 void ProjectionChanged(wxCommandEvent & e);
112
113 void OnOutputFilesChanged(wxCommandEvent & e);
114 void RemapperChanged(wxCommandEvent & e);
115 void OnRemapperOptions(wxCommandEvent & e);
116
117 void FusionChanged(wxCommandEvent & e);
118 void OnFusionOptions(wxCommandEvent & e);
119
120 void HDRMergeChanged(wxCommandEvent & e);
121 void OnHDRMergeOptions(wxCommandEvent & e);
122
123 void BlenderChanged(wxCommandEvent & e);
124 void OnBlenderOptions(wxCommandEvent & e);
125
126 void OnEdgeFillChanged(wxCommandEvent& e);
127 void OnEdgeFillOptions(wxCommandEvent& e);
128
129 // File format options
130 void FileFormatChanged(wxCommandEvent & e);
131 void HDRFileFormatChanged(wxCommandEvent & e);
132 void OnJPEGQualityText(wxCommandEvent & e);
133 void OnNormalTIFFCompression(wxCommandEvent & e);
134 void OnHDRTIFFCompression(wxCommandEvent & e);
135
136 void OnHDRFileFormatOpts(wxCommandEvent & e);
137
138
139 void WidthChanged(wxCommandEvent & e);
140 void HeightChanged(wxCommandEvent & e);
141 void ROIChanged(wxCommandEvent & e);
142
143// TODO remove
144// void DoPreview(wxCommandEvent & e);
145 void DoCalcFOV(wxCommandEvent & e);
146 void OnDoStitch(wxCommandEvent & e);
147
150 void DoCalcOptimalWidth(wxCommandEvent & e);
151
154 void DoCalcOptimalROI(wxCommandEvent & e);
155
157 void EnableControls(bool enable);
158
169 bool CheckGoodSize();
171 bool CheckHasImages();
173 bool CheckFreeSpace(const wxString& folder);
174
175 // the model
177 //current gui level
179
180 // don't listen to input on gui elements during
181 // updating the gui from the model, to prevent recursion,
182 // because the gui might report changes as well.
185 double m_oldVFOV;
186
189
190 // controls of this frame
192 wxTextCtrl * m_HFOVText;
193 wxTextCtrl * m_VFOVText;
194
195 wxTextCtrl * m_WidthTxt;
196 wxTextCtrl * m_HeightTxt;
197 wxTextCtrl * m_ROILeftTxt;
198 wxTextCtrl * m_ROIRightTxt;
199 wxTextCtrl * m_ROITopTxt;
200 wxTextCtrl * m_ROIBottomTxt;
210
215
219
220 wxScrolledWindow *m_pano_ctrls;
221
223};
224
226class PanoPanelXmlHandler : public wxXmlResourceHandler
227{
229
230public:
232 virtual wxObject *DoCreateResource();
233 virtual bool CanHandle(wxXmlNode *node);
234};
235
236#endif // _PANOPANEL_H
declaration of helper for work with different GuiLevels
GuiLevel
Definition GuiLevel.h:32
this handler class will receive change events from the Panorama.
Panorama image options.
Model for a panorama.
Definition Panorama.h:153
virtual wxObject * DoCreateResource()
virtual bool CanHandle(wxXmlNode *node)
Define the pano edit panel.
Definition PanoPanel.h:44
virtual void panoramaChanged(HuginBase::Panorama &pano)
this is called whenever the panorama has changed.
wxTextCtrl * m_ROIRightTxt
Definition PanoPanel.h:198
void HFOVChanged(wxCommandEvent &e)
void OnHDRMergeOptions(wxCommandEvent &e)
void DoCalcFOV(wxCommandEvent &e)
void ApplyQuickMode(int preset)
wxTextCtrl * m_HeightTxt
Definition PanoPanel.h:196
void SetStitcher(HuginBase::PanoramaOptions::Remapper stitcher)
bool CheckFreeSpace(const wxString &folder)
check if there is enough free disk space
wxButton * m_CalcOptWidthButton
Definition PanoPanel.h:208
wxChoice * m_FileFormatChoice
Definition PanoPanel.h:211
wxChoice * m_HDRMergeChoice
Definition PanoPanel.h:203
bool CheckGoodSize()
Check the canvas size isn't overly huge, or the user knows what they are doing.
void DoCalcOptimalWidth(wxCommandEvent &e)
set the highest sensible width
void FileFormatChanged(wxCommandEvent &e)
wxTextCtrl * m_VFOVText
Definition PanoPanel.h:193
void OnDoStitch(wxCommandEvent &e)
StitchingPresets
the supported defaults
Definition PanoPanel.h:93
@ PROFILE_LAYER_PSD
Definition PanoPanel.h:95
@ PROFILE_JPEG
Definition PanoPanel.h:93
@ PROFILE_LAYER_TIFF
Definition PanoPanel.h:95
@ PROFILE_DRAFT_JPEG
Definition PanoPanel.h:94
@ PROFILE_TIFF
Definition PanoPanel.h:94
@ PROFILE_CUSTOM
Definition PanoPanel.h:93
void BlenderChanged(wxCommandEvent &e)
wxTextCtrl * m_FileFormatJPEGQualityText
Definition PanoPanel.h:213
void DoSendToBatch(const wxString &userDefinedSetting=wxEmptyString)
stitching with PTBatcherGUI
void EnableControls(bool enable)
enable/disable control influenced by quick mode
void OnHDRFileFormatOpts(wxCommandEvent &e)
bool CheckHasImages()
check if the output contains images at all
bool updatesDisabled
Definition PanoPanel.h:183
void OnJPEGQualityText(wxCommandEvent &e)
void ProjectionChanged(wxCommandEvent &e)
wxScrolledWindow * m_pano_ctrls
Definition PanoPanel.h:220
wxChoice * m_ProjectionChoice
Definition PanoPanel.h:191
void DoStitchOrSendBatch(const wxString &userDefinedSetting=wxEmptyString)
general stitching command, selects PTBatcherGUI or hugin_stitch_project depending on the settings in ...
void ROIChanged(wxCommandEvent &e)
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
notifies about changes to images
Definition PanoPanel.h:72
HuginBase::PanoramaOptions m_oldOpt
Definition PanoPanel.h:184
void HFOVChangedSpin(wxSpinEvent &e)
void OnOutputFilesChanged(wxCommandEvent &e)
wxTextCtrl * m_HFOVText
Definition PanoPanel.h:192
wxTextCtrl * m_ROIBottomTxt
Definition PanoPanel.h:200
bool m_keepViewOnResize
Definition PanoPanel.h:187
virtual ~PanoPanel(void)
wxTextCtrl * m_WidthTxt
Definition PanoPanel.h:195
void OnFusionOptions(wxCommandEvent &e)
wxChoice * m_edgeFillChoice
Definition PanoPanel.h:205
void OnNormalTIFFCompression(wxCommandEvent &e)
wxChoice * m_FileFormatTIFFCompChoice
Definition PanoPanel.h:214
wxButton * GetStitchButton() const
Definition PanoPanel.h:85
wxChoice * m_FileFormatHDRTIFFCompChoice
Definition PanoPanel.h:218
wxButton * m_CalcOptROIButton
Definition PanoPanel.h:209
void Init(HuginBase::Panorama *pano)
void QuickModeChanged(wxCommandEvent &e)
wxChoice * m_HDRFileFormatChoice
Definition PanoPanel.h:216
wxButton * m_CalcHFOVButton
Definition PanoPanel.h:207
bool m_hasStacks
Definition PanoPanel.h:188
double m_oldVFOV
Definition PanoPanel.h:185
bool StackCheck(HuginBase::Panorama &pano)
void VFOVChangedSpin(wxSpinEvent &e)
void OnEdgeFillChanged(wxCommandEvent &e)
void UpdateDisplay(const HuginBase::PanoramaOptions &opt, const bool hasStacks)
void HDRMergeChanged(wxCommandEvent &e)
void HeightChanged(wxCommandEvent &e)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
Definition PanoPanel.cpp:72
void VFOVChanged(wxCommandEvent &e)
void OnBlenderOptions(wxCommandEvent &e)
void OnRemapperOptions(wxCommandEvent &e)
wxButton * m_StitchButton
Definition PanoPanel.h:206
void FusionChanged(wxCommandEvent &e)
void RemapperChanged(wxCommandEvent &e)
void SetGuiLevel(GuiLevel newGuiLevel)
wxTextCtrl * m_ROILeftTxt
Definition PanoPanel.h:197
void DoStitch(const wxString &userDefinedSetting=wxEmptyString, const bool readSetting=true)
stitching using hugin_stitch_project
wxChoice * m_BlenderChoice
Definition PanoPanel.h:204
wxStaticText * m_HDRFileFormatLabelTIFFCompression
Definition PanoPanel.h:217
void DoUserDefinedStitch(const wxString &settings=wxString())
stitching with user defined file
void WidthChanged(wxCommandEvent &e)
wxChoice * m_RemapperChoice
Definition PanoPanel.h:201
GuiLevel m_guiLevel
Definition PanoPanel.h:178
void DoCalcOptimalROI(wxCommandEvent &e)
set the largest rectangle for crop ROI
void HDRFileFormatChanged(wxCommandEvent &e)
wxChoice * m_FusionChoice
Definition PanoPanel.h:202
void OnEdgeFillOptions(wxCommandEvent &e)
HuginBase::Panorama * pano
Definition PanoPanel.h:176
wxTextCtrl * m_ROITopTxt
Definition PanoPanel.h:199
wxStaticText * m_FileFormatOptionsLabel
Definition PanoPanel.h:212
void OnHDRTIFFCompression(wxCommandEvent &e)
StitchingEngine
the supported stitching engines
Definition PanoPanel.h:90
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