Hugin trunk 0.1
Loading...
Searching...
No Matches
LensCalFrame.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
11/*
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
16 *
17 * This software is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public
23 * License along with this software. If not, see
24 * <http://www.gnu.org/licenses/>.
25 *
26 */
27
28#ifndef LENSCALFRAME_H
29#define LENSCALFRAME_H
30
31#include <vector>
32#include <set>
33
34#include "panoinc_WX.h"
35#include "panodata/Panorama.h"
36#include "lines/FindLines.h"
37#include "LensCalTypes.h"
38#include "LensCalImageCtrl.h"
39
41class FileDropTarget : public wxFileDropTarget
42{
43public:
45};
46
47// forward declaration, to prevent include of class
48namespace wxGraphTools
49{
50class GraphPopupWindow;
51};
52
56class LensCalFrame:public wxFrame, public AppBase::ProgressDisplay
57{
58public:
59
61 explicit LensCalFrame(wxWindow* parent);
63 virtual ~LensCalFrame();
64
66 const wxString & GetXRCPath();
67 void AddImages(wxArrayString files);
68 void UpdateListString(unsigned int index);
71
72protected:
75
76private:
77 // event handlers
78 void OnExit(wxCommandEvent &e);
79 void OnAddImage(wxCommandEvent &e);
80 void OnRemoveImage(wxCommandEvent &e);
81 void OnFindLines(wxCommandEvent &e);
82 void OnOptimize(wxCommandEvent &e);
84 void OnShowDistortionGraph(wxCommandEvent &e);
85 void SaveLensToIni();
86 void OnSaveLens(wxCommandEvent &e);
87 void OnSaveProject(wxCommandEvent &e);
88 void OnImageSelected(wxCommandEvent &e);
89 void OnSelectPreviewContent(wxCommandEvent &e);
90 void OnReset(wxCommandEvent &e);
91 void OnShowLines(wxCommandEvent &e);
92 void OnRefresh(wxCommandEvent &e);
96 void Optimize();
102 void EnableButtons();
104 void ParametersToDisplay();
105
106 //link to some controls
111 std::vector<ImageLineList*> m_images;
112 //internal values of inputs
118 unsigned int m_resize_dimension;
120 double m_a;
121 double m_b;
122 double m_c;
123 double m_d;
124 double m_e;
125
126 // progress reporter
130 // popup window
132};
133
134
135#endif // LENSCALFRAME_H
declaration of functions for finding lines
declaration of preview for lens calibration gui
declaration of helper class for LensCal
simple class that forward the drop to the mainframe
bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames)
file drag and drop handler method
Model for a panorama.
Definition Panorama.h:153
The main window frame.
bool ReadInputs(bool readFocalLength, bool readOptions, bool readLensParameter)
reads all input values into internal values
HuginBase::SrcPanoImage::Projection m_projection
void UpdateList(bool restoreSelection)
updates the list box with current values
void ParametersToDisplay()
set all parameter input wxTextField to internal values
void AddImages(wxArrayString files)
wxString m_progressMsg
const wxString & GetXRCPath()
get the path to the xrc directory
double m_progress
void OnReset(wxCommandEvent &e)
bool displayProgress()
update progress display
void OnExit(wxCommandEvent &e)
void OnFindLines(wxCommandEvent &e)
std::vector< ImageLineList * > m_images
list of all detected lines
void OnSaveProject(wxCommandEvent &e)
double m_progressMax
void OnShowDistortionGraph(wxCommandEvent &e)
show distortion graph
void Optimize()
do the optimization
double m_edge_scale
virtual ~LensCalFrame()
destructor
wxGraphTools::GraphPopupWindow * m_popup
wxChoice * m_choice_projection
void OnImageSelected(wxCommandEvent &e)
void updateProgressDisplay()
called when a progress message should be displayed
double m_minlinelength
void OnSelectPreviewContent(wxCommandEvent &e)
unsigned int m_resize_dimension
void OnShowLines(wxCommandEvent &e)
void OnAddImage(wxCommandEvent &e)
wxListBox * m_images_list
double m_cropfactor
void OnRefresh(wxCommandEvent &e)
void OnOptimize(wxCommandEvent &e)
void OnRemoveImage(wxCommandEvent &e)
void OnSaveLens(wxCommandEvent &e)
LensCalImageCtrl * m_preview
void UpdateListString(unsigned int index)
HuginBase::Panorama GetPanorama()
return panorama object with all images
double m_edge_threshold
double m_focallength
void EnableButtons()
enable all buttons and menu items depending on number of active images
image previewer for lens calibration GUI
simple popup to show graph
Definition GraphTools.h:39
include file for the hugin project
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