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 118 of file LensCalFrame.cpp.
References DEBUG_TRACE, DEFAULT_LENSCAL_SCALE, DEFAULT_LENSCAL_THRESHOLD, DEFAULT_MINLINELENGTH, DEFAULT_RESIZE_DIMENSION, FillLensProjectionList(), and HUGIN_IMGCACHE_UPPERBOUND.
|
virtual |
destructor
Definition at line 204 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 StoreFramePosition().
void LensCalFrame::AddImages | ( | wxArrayString | files | ) |
Definition at line 273 of file LensCalFrame.cpp.
References hugin_utils::doubleTowxString(), EnableButtons(), ImageLineList::GetFilename(), ImageLineList::GetPanoImage(), 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 497 of file LensCalFrame.cpp.
References m_images.
Referenced by AddImages(), OnAddImage(), and OnRemoveImage().
|
private |
return panorama object with all images
Definition at line 625 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 243 of file LensCalFrame.cpp.
|
private |
Definition at line 371 of file LensCalFrame.cpp.
References AddImages(), containsInvalidCharacters(), DEBUG_INFO, EnableButtons(), GetFileDialogImageFilters(), and ShowFilenameWarning().
|
private |
Definition at line 268 of file LensCalFrame.cpp.
|
private |
Definition at line 554 of file LensCalFrame.cpp.
References HuginLines::detectEdges(), HuginLines::findLines(), HUGIN_CONV_FILENAME, 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().
|
private |
Definition at line 813 of file LensCalFrame.cpp.
References m_images, m_images_list, m_preview, LensCalImageCtrl::SetEmptyImage(), and LensCalImageCtrl::SetImage().
Referenced by AddImages(), and UpdateList().
|
private |
Definition at line 577 of file LensCalFrame.cpp.
References m_images, Optimize(), and ReadInputs().
|
private |
Definition at line 848 of file LensCalFrame.cpp.
References m_a, m_b, m_c, m_cropfactor, m_d, m_e, m_focallength, m_preview, m_projection, ReadInputs(), LensCalImageCtrl::SetLens(), and LensCalImageCtrl::SetLensDistortions().
|
private |
Definition at line 478 of file LensCalFrame.cpp.
References EnableButtons(), HUGIN_CONV_FILENAME, m_images, m_images_list, and UpdateList().
|
private |
Definition at line 839 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().
|
private |
Definition at line 747 of file LensCalFrame.cpp.
References HuginBase::Panorama::getImage(), GetPanorama(), m_images, ReadInputs(), SaveLensParameters(), and SaveLensToIni().
|
private |
Definition at line 781 of file LensCalFrame.cpp.
References GetPanorama(), hugin_utils::getPathPrefix(), HUGIN_CONV_FILENAME, ReadInputs(), and HuginBase::Panorama::WritePTOFile().
|
private |
Definition at line 827 of file LensCalFrame.cpp.
References LensCalImageCtrl::GetMode(), m_preview, LensCalImageCtrl::mode_corrected, and LensCalImageCtrl::SetMode().
|
private |
show distortion graph
Definition at line 595 of file LensCalFrame.cpp.
References HuginBase::SrcPanoImage::calcHFOV(), wxGraphTools::GetDistortionGraph(), 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().
|
private |
Definition at line 833 of file LensCalFrame.cpp.
References m_preview, and LensCalImageCtrl::SetShowLines().
|
private |
do the optimization
Definition at line 698 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 235 of file LensCalFrame.cpp.
References hugin_utils::doubleTowxString(), m_edge_scale, m_edge_threshold, m_minlinelength, and m_resize_dimension.
Referenced by OnReset().
|
private |
reads all input values into internal values
Definition at line 507 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 719 of file LensCalFrame.cpp.
References GetPanorama(), and SaveLensParameters().
Referenced by OnSaveLens().
void LensCalFrame::UpdateList | ( | bool | restoreSelection | ) |
updates the list box with current values
Definition at line 460 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 454 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 249 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(), 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 OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().
|
private |
Definition at line 117 of file LensCalFrame.h.
Referenced by 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(), OnImageSelected(), OnRemoveImage(), UpdateList(), and UpdateListString().
|
private |
Definition at line 119 of file LensCalFrame.h.
Referenced by 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 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 OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().