|
Hugintrunk
0.1
|
The main window frame. More...
#include <LensCalFrame.h>

Public Member Functions | |
| LensCalFrame (wxWindow *parent) | |
| constructor More... | |
| virtual | ~LensCalFrame () |
| destructor More... | |
| const wxString & | GetXRCPath () |
| get the path to the xrc directory More... | |
| void | AddImages (wxArrayString files) |
| void | UpdateListString (unsigned int index) |
| void | UpdateList (bool restoreSelection) |
| updates the list box with current values More... | |
Public Member Functions inherited from AppBase::ProgressDisplay | |
| virtual | ~ProgressDisplay () |
| void | setMessage (const std::string &message, const std::string &filename="") |
| sets the message to given string More... | |
| void | taskFinished () |
| call when a task has finished and the status message should be cleared More... | |
| bool | updateDisplay () |
| updates the display, return true, if update was successful, false if cancel was pressed More... | |
| bool | updateDisplay (const std::string &message) |
| bool | updateDisplayValue () |
| void | setMaximum (int newMaximum) |
| sets the new maximum value of the progress value More... | |
| bool | wasCancelled () |
| return true, if process should be canceled by user e.g. More... | |
Protected Member Functions | |
| void | updateProgressDisplay () |
| called when a progress message should be displayed More... | |
Protected Member Functions inherited from AppBase::ProgressDisplay | |
| ProgressDisplay (int maximum=0) | |
| constructor More... | |
Private Member Functions | |
| void | OnExit (wxCommandEvent &e) |
| void | OnAddImage (wxCommandEvent &e) |
| void | OnRemoveImage (wxCommandEvent &e) |
| void | OnFindLines (wxCommandEvent &e) |
| void | OnOptimize (wxCommandEvent &e) |
| void | OnShowDistortionGraph (wxCommandEvent &e) |
| show distortion graph More... | |
| void | SaveLensToIni () |
| void | OnSaveLens (wxCommandEvent &e) |
| void | OnSaveProject (wxCommandEvent &e) |
| void | OnImageSelected (wxCommandEvent &e) |
| void | OnSelectPreviewContent (wxCommandEvent &e) |
| void | OnReset (wxCommandEvent &e) |
| void | OnShowLines (wxCommandEvent &e) |
| void | OnRefresh (wxCommandEvent &e) |
| bool | ReadInputs (bool readFocalLength, bool readOptions, bool readLensParameter) |
| reads all input values into internal values More... | |
| void | Optimize () |
| do the optimization More... | |
| bool | displayProgress () |
| update progress display More... | |
| HuginBase::Panorama | GetPanorama () |
| return panorama object with all images More... | |
| void | EnableButtons () |
| enable all buttons and menu items depending on number of active images More... | |
| void | ParametersToDisplay () |
| set all parameter input wxTextField to internal values More... | |
Private Attributes | |
| wxChoice * | m_choice_projection |
| wxListBox * | m_images_list |
| LensCalImageCtrl * | m_preview |
| std::vector< ImageLineList * > | m_images |
| list of all detected lines More... | |
| HuginBase::SrcPanoImage::Projection | m_projection |
| double | m_focallength |
| double | m_cropfactor |
| double | m_edge_scale |
| double | m_edge_threshold |
| unsigned int | m_resize_dimension |
| double | m_minlinelength |
| double | m_a |
| double | m_b |
| double | m_c |
| double | m_d |
| double | m_e |
| double | m_progressMax |
| double | m_progress |
| wxString | m_progressMsg |
| wxGraphTools::GraphPopupWindow * | m_popup = nullptr |
Additional Inherited Members | |
Protected Attributes inherited from AppBase::ProgressDisplay | |
| bool | m_canceled |
| std::string | m_message |
| std::string | m_filename |
| int | m_maximum |
| int | m_progress |
The main window frame.
Definition at line 56 of file LensCalFrame.h.
|
explicit |
constructor
Definition at line 102 of file LensCalFrame.cpp.
References DEBUG_TRACE, DEFAULT_LENSCAL_SCALE, DEFAULT_LENSCAL_THRESHOLD, DEFAULT_MINLINELENGTH, DEFAULT_RESIZE_DIMENSION, EnableButtons(), FillLensProjectionList(), GetXRCPath(), HUGIN_IMGCACHE_UPPERBOUND, m_choice_projection, m_edge_scale, m_edge_threshold, m_images_list, m_minlinelength, m_preview, m_resize_dimension, OnAddImage(), OnExit(), OnFindLines(), OnImageSelected(), OnOptimize(), OnRefresh(), OnRemoveImage(), OnReset(), OnSaveLens(), OnSaveProject(), OnSelectPreviewContent(), OnShowDistortionGraph(), OnShowLines(), and ParametersToDisplay().
|
virtual |
destructor
Definition at line 202 of file LensCalFrame.cpp.
References HuginBase::LensDB::LensDB::Clean(), DEBUG_TRACE, m_edge_scale, m_edge_threshold, m_images, m_minlinelength, m_preview, m_resize_dimension, ReadInputs(), LensCalImageCtrl::SetEmptyImage(), and hugin_utils::StoreFramePosition().
| void LensCalFrame::AddImages | ( | wxArrayString | files | ) |
Definition at line 271 of file LensCalFrame.cpp.
References hugin_utils::doubleTowxString(), EnableButtons(), ImageLineList::GetFilename(), ImageLineList::GetPanoImage(), hugin_utils::HuginMessageBox(), m_choice_projection, m_images, m_images_list, OnImageSelected(), SelectListValue(), and UpdateList().
Referenced by OnAddImage(), and FileDropTarget::OnDropFiles().
|
private |
update progress display
|
private |
enable all buttons and menu items depending on number of active images
Definition at line 495 of file LensCalFrame.cpp.
References m_images.
Referenced by AddImages(), LensCalFrame(), OnAddImage(), and OnRemoveImage().
|
private |
return panorama object with all images
Definition at line 623 of file LensCalFrame.cpp.
References HuginBase::Panorama::addCtrlPoint(), HuginBase::Panorama::addImage(), HuginBase::SrcPanoImage::calcHFOV(), cps_per_line, HuginLines::GetControlPoints(), HuginBase::StandardImageVariableGroups::getLenses(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::ConstImageVariableGroup::getPartNumber(), HuginBase::Panorama::getSrcImage(), m_a, m_b, m_c, m_cropfactor, m_d, m_e, m_focallength, m_images, m_projection, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::RECTILINEAR, HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setProjection(), HuginBase::Panorama::setSrcImage(), HuginBase::SrcPanoImage::setVar(), HuginBase::ImageVariableGroup::switchParts(), and HuginLines::valid_line.
Referenced by OnSaveLens(), OnSaveProject(), Optimize(), and SaveLensToIni().
| const wxString & LensCalFrame::GetXRCPath | ( | ) |
get the path to the xrc directory
Definition at line 241 of file LensCalFrame.cpp.
Referenced by LensCalFrame().
|
private |
Definition at line 369 of file LensCalFrame.cpp.
References AddImages(), containsInvalidCharacters(), DEBUG_INFO, EnableButtons(), GetFileDialogImageFilters(), and ShowFilenameWarning().
Referenced by LensCalFrame().
|
private |
Definition at line 266 of file LensCalFrame.cpp.
Referenced by LensCalFrame().
|
private |
Definition at line 552 of file LensCalFrame.cpp.
References HuginLines::detectEdges(), HuginLines::findLines(), HUGIN_CONV_FILENAME, hugin_utils::HuginMessageBox(), m_cropfactor, m_edge_scale, m_edge_threshold, m_focallength, m_images, m_minlinelength, m_preview, m_projection, m_resize_dimension, ReadInputs(), LensCalImageCtrl::SetLens(), and UpdateList().
Referenced by LensCalFrame().
|
private |
Definition at line 807 of file LensCalFrame.cpp.
References m_images, m_images_list, m_preview, LensCalImageCtrl::SetEmptyImage(), and LensCalImageCtrl::SetImage().
Referenced by AddImages(), LensCalFrame(), and UpdateList().
|
private |
Definition at line 575 of file LensCalFrame.cpp.
References hugin_utils::HuginMessageBox(), m_images, Optimize(), and ReadInputs().
Referenced by LensCalFrame().
|
private |
Definition at line 842 of file LensCalFrame.cpp.
References hugin_utils::HuginMessageBox(), m_a, m_b, m_c, m_cropfactor, m_d, m_e, m_focallength, m_preview, m_projection, ReadInputs(), LensCalImageCtrl::SetLens(), and LensCalImageCtrl::SetLensDistortions().
Referenced by LensCalFrame().
|
private |
Definition at line 476 of file LensCalFrame.cpp.
References EnableButtons(), HUGIN_CONV_FILENAME, m_images, m_images_list, and UpdateList().
Referenced by LensCalFrame().
|
private |
Definition at line 833 of file LensCalFrame.cpp.
References DEFAULT_LENSCAL_SCALE, DEFAULT_LENSCAL_THRESHOLD, DEFAULT_MINLINELENGTH, DEFAULT_RESIZE_DIMENSION, m_edge_scale, m_edge_threshold, m_minlinelength, m_resize_dimension, and ParametersToDisplay().
Referenced by LensCalFrame().
|
private |
Definition at line 743 of file LensCalFrame.cpp.
References HuginBase::Panorama::getImage(), GetPanorama(), hugin_utils::HuginMessageBox(), m_images, ReadInputs(), SaveLensParameters(), and SaveLensToIni().
Referenced by LensCalFrame().
|
private |
Definition at line 777 of file LensCalFrame.cpp.
References hugin_utils::AskUserOverwrite(), GetPanorama(), hugin_utils::getPathPrefix(), HUGIN_CONV_FILENAME, hugin_utils::HuginMessageBox(), ReadInputs(), and HuginBase::Panorama::WritePTOFile().
Referenced by LensCalFrame().
|
private |
Definition at line 821 of file LensCalFrame.cpp.
References LensCalImageCtrl::GetMode(), m_preview, LensCalImageCtrl::mode_corrected, and LensCalImageCtrl::SetMode().
Referenced by LensCalFrame().
|
private |
show distortion graph
Definition at line 593 of file LensCalFrame.cpp.
References HuginBase::SrcPanoImage::calcHFOV(), wxGraphTools::GetDistortionGraph(), hugin_utils::HuginMessageBox(), m_a, m_b, m_c, m_cropfactor, m_d, m_e, m_focallength, m_images, m_popup, m_projection, ReadInputs(), and HuginBase::SrcPanoImage::setVar().
Referenced by LensCalFrame().
|
private |
Definition at line 827 of file LensCalFrame.cpp.
References m_preview, and LensCalImageCtrl::SetShowLines().
Referenced by LensCalFrame().
|
private |
do the optimization
Definition at line 696 of file LensCalFrame.cpp.
References hugin_utils::doubleTowxString(), HuginBase::Panorama::getImage(), GetPanorama(), HuginBase::SrcPanoImage::getVar(), m_a, m_b, m_c, m_d, m_e, m_preview, HuginBase::PTools::optimize(), and LensCalImageCtrl::SetLensDistortions().
Referenced by OnOptimize().
|
private |
set all parameter input wxTextField to internal values
Definition at line 233 of file LensCalFrame.cpp.
References hugin_utils::doubleTowxString(), m_edge_scale, m_edge_threshold, m_minlinelength, and m_resize_dimension.
Referenced by LensCalFrame(), and OnReset().
|
private |
reads all input values into internal values
Definition at line 505 of file LensCalFrame.cpp.
References GetSelectedValue(), m_a, m_b, m_c, m_choice_projection, m_cropfactor, m_d, m_e, m_edge_scale, m_edge_threshold, m_focallength, m_minlinelength, m_projection, m_resize_dimension, and hugin_utils::str2double().
Referenced by OnFindLines(), OnOptimize(), OnRefresh(), OnSaveLens(), OnSaveProject(), OnShowDistortionGraph(), and ~LensCalFrame().
|
private |
Definition at line 717 of file LensCalFrame.cpp.
References hugin_utils::AskUserOverwrite(), GetPanorama(), and SaveLensParameters().
Referenced by OnSaveLens().
| void LensCalFrame::UpdateList | ( | bool | restoreSelection | ) |
updates the list box with current values
Definition at line 458 of file LensCalFrame.cpp.
References m_images, m_images_list, and OnImageSelected().
Referenced by AddImages(), OnFindLines(), and OnRemoveImage().
| void LensCalFrame::UpdateListString | ( | unsigned int | index | ) |
Definition at line 452 of file LensCalFrame.cpp.
References m_images, and m_images_list.
|
protectedvirtual |
called when a progress message should be displayed
update the display
Implements AppBase::ProgressDisplay.
Definition at line 247 of file LensCalFrame.cpp.
References HUGIN_CONV_FILENAME, AppBase::ProgressDisplay::m_filename, and AppBase::ProgressDisplay::m_message.
|
private |
Definition at line 120 of file LensCalFrame.h.
Referenced by GetPanorama(), OnRefresh(), OnShowDistortionGraph(), Optimize(), and ReadInputs().
|
private |
Definition at line 121 of file LensCalFrame.h.
Referenced by GetPanorama(), OnRefresh(), OnShowDistortionGraph(), Optimize(), and ReadInputs().
|
private |
Definition at line 122 of file LensCalFrame.h.
Referenced by GetPanorama(), OnRefresh(), OnShowDistortionGraph(), Optimize(), and ReadInputs().
|
private |
Definition at line 107 of file LensCalFrame.h.
Referenced by AddImages(), LensCalFrame(), and ReadInputs().
|
private |
Definition at line 115 of file LensCalFrame.h.
Referenced by GetPanorama(), OnFindLines(), OnRefresh(), OnShowDistortionGraph(), and ReadInputs().
|
private |
Definition at line 123 of file LensCalFrame.h.
Referenced by GetPanorama(), OnRefresh(), OnShowDistortionGraph(), Optimize(), and ReadInputs().
|
private |
Definition at line 124 of file LensCalFrame.h.
Referenced by GetPanorama(), OnRefresh(), OnShowDistortionGraph(), Optimize(), and ReadInputs().
|
private |
Definition at line 116 of file LensCalFrame.h.
Referenced by LensCalFrame(), OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().
|
private |
Definition at line 117 of file LensCalFrame.h.
Referenced by LensCalFrame(), OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().
|
private |
Definition at line 114 of file LensCalFrame.h.
Referenced by GetPanorama(), OnFindLines(), OnRefresh(), OnShowDistortionGraph(), and ReadInputs().
|
private |
list of all detected lines
Definition at line 111 of file LensCalFrame.h.
Referenced by AddImages(), EnableButtons(), GetPanorama(), OnFindLines(), OnImageSelected(), OnOptimize(), OnRemoveImage(), OnSaveLens(), OnShowDistortionGraph(), UpdateList(), UpdateListString(), and ~LensCalFrame().
|
private |
Definition at line 108 of file LensCalFrame.h.
Referenced by AddImages(), LensCalFrame(), OnImageSelected(), OnRemoveImage(), UpdateList(), and UpdateListString().
|
private |
Definition at line 119 of file LensCalFrame.h.
Referenced by LensCalFrame(), OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().
|
private |
Definition at line 131 of file LensCalFrame.h.
Referenced by OnShowDistortionGraph().
|
private |
Definition at line 109 of file LensCalFrame.h.
Referenced by LensCalFrame(), OnFindLines(), OnImageSelected(), OnRefresh(), OnSelectPreviewContent(), OnShowLines(), Optimize(), and ~LensCalFrame().
|
private |
Definition at line 128 of file LensCalFrame.h.
|
private |
Definition at line 127 of file LensCalFrame.h.
|
private |
Definition at line 129 of file LensCalFrame.h.
|
private |
Definition at line 113 of file LensCalFrame.h.
Referenced by GetPanorama(), OnFindLines(), OnRefresh(), OnShowDistortionGraph(), and ReadInputs().
|
private |
Definition at line 118 of file LensCalFrame.h.
Referenced by LensCalFrame(), OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().
1.8.5