LensCalFrame Class Reference

The main window frame. More...

#include <LensCalFrame.h>

Inheritance diagram for LensCalFrame:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 LensCalFrame (wxWindow *parent)
 constructor
virtual ~LensCalFrame ()
 destructor
const wxString & GetXRCPath ()
 get the path to the xrc directory
void AddImages (wxArrayString files)
void UpdateListString (unsigned int index)
void UpdateList (bool restoreSelection)
 updates the list box with current values

Protected Member Functions

void updateProgressDisplay ()
 called when a progress message should be displayed

Private Member Functions

void OnExit (wxCommandEvent &e)
void OnAddImage (wxCommandEvent &e)
void OnRemoveImage (wxCommandEvent &e)
void OnFindLines (wxCommandEvent &e)
void OnOptimize (wxCommandEvent &e)
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
void Optimize ()
 do the optimization
bool displayProgress ()
 update progress display
HuginBase::Panorama GetPanorama ()
 return panorama object with all images
void EnableButtons ()
 enable all buttons and menu items depending on number of active images
void ParametersToDisplay ()
 set all parameter input wxTextField to internal values

Private Attributes

wxChoice * m_choice_projection
wxListBox * m_images_list
LensCalImageCtrlm_preview
std::vector< ImageLineList * > m_images
 list of all detected lines
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

Detailed Description

The main window frame.

Definition at line 50 of file LensCalFrame.h.


Constructor & Destructor Documentation

LensCalFrame::OnSaveProject LensCalFrame::OnAddImage LensCalFrame::OnFindLines LensCalFrame::OnOptimize LensCalFrame::OnRefresh LensCalFrame::OnShowLines LensCalFrame::LensCalFrame ( wxWindow *  parent  )  [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.

LensCalFrame::~LensCalFrame (  )  [virtual]

destructor

Definition at line 203 of file LensCalFrame.cpp.

References DEBUG_TRACE, m_edge_scale, m_edge_threshold, m_images, m_minlinelength, m_preview, m_resize_dimension, ReadInputs(), LensCalImageCtrl::SetEmptyImage(), and StoreFramePosition().


Member Function Documentation

void LensCalFrame::AddImages ( wxArrayString  files  ) 

Definition at line 272 of file LensCalFrame.cpp.

References hugin_utils::doubleTowxString(), EnableButtons(), m_choice_projection, m_images, m_images_list, OnImageSelected(), SelectListValue(), and UpdateList().

Referenced by OnAddImage(), and FileDropTarget::OnDropFiles().

bool LensCalFrame::displayProgress (  )  [private]

update progress display

void LensCalFrame::EnableButtons (  )  [private]

enable all buttons and menu items depending on number of active images

Definition at line 494 of file LensCalFrame.cpp.

References m_images.

Referenced by AddImages(), OnAddImage(), and OnRemoveImage().

Panorama LensCalFrame::GetPanorama (  )  [private]

return panorama object with all images

Definition at line 591 of file LensCalFrame.cpp.

References HuginBase::Panorama::addCtrlPoint(), HuginBase::Panorama::addImage(), PT::calcHFOV(), cps_per_line, HuginLines::GetControlPoints(), HuginBase::StandardImageVariableGroups::getLenses(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::ConstImageVariableGroup::getPartNumber(), HuginBase::Panorama::getSrcImage(), HuginBase::ConstImageVariableGroup::IVE_ExposureValue, HuginBase::ConstImageVariableGroup::IVE_WhiteBalanceBlue, HuginBase::ConstImageVariableGroup::IVE_WhiteBalanceRed, 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::ImageVariableGroup::switchParts(), HuginBase::ImageVariableGroup::unlinkVariableImage(), 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 242 of file LensCalFrame.cpp.

void LensCalFrame::OnAddImage ( wxCommandEvent &  e  )  [private]

Definition at line 370 of file LensCalFrame.cpp.

References AddImages(), containsInvalidCharacters(), DEBUG_INFO, EnableButtons(), HUGIN_WX_FILE_IMG_FILTER, and ShowFilenameWarning().

void LensCalFrame::OnExit ( wxCommandEvent &  e  )  [private]

Definition at line 267 of file LensCalFrame.cpp.

void LensCalFrame::OnFindLines ( wxCommandEvent &  e  )  [private]

Definition at line 550 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().

void LensCalFrame::OnImageSelected ( wxCommandEvent &  e  )  [private]

Definition at line 787 of file LensCalFrame.cpp.

References m_images, m_images_list, m_preview, LensCalImageCtrl::SetEmptyImage(), and LensCalImageCtrl::SetImage().

Referenced by AddImages(), and UpdateList().

void LensCalFrame::OnOptimize ( wxCommandEvent &  e  )  [private]

Definition at line 573 of file LensCalFrame.cpp.

References m_images, Optimize(), and ReadInputs().

void LensCalFrame::OnRefresh ( wxCommandEvent &  e  )  [private]

Definition at line 822 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().

void LensCalFrame::OnRemoveImage ( wxCommandEvent &  e  )  [private]

Definition at line 477 of file LensCalFrame.cpp.

References EnableButtons(), m_images, m_images_list, and UpdateList().

void LensCalFrame::OnReset ( wxCommandEvent &  e  )  [private]

Definition at line 813 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().

void LensCalFrame::OnSaveLens ( wxCommandEvent &  e  )  [private]

Definition at line 716 of file LensCalFrame.cpp.

References HuginBase::Panorama::getImage(), GetPanorama(), m_images, ReadInputs(), SaveLensParameters(), and SaveLensToIni().

void LensCalFrame::OnSaveProject ( wxCommandEvent &  e  )  [private]

Definition at line 750 of file LensCalFrame.cpp.

References fill_set(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptimizeVector(), HuginBase::Panorama::getOptions(), GetPanorama(), hugin_utils::getPathPrefix(), HUGIN_CONV_FILENAME, HuginBase::Panorama::printPanoramaScript(), and ReadInputs().

void LensCalFrame::OnSelectPreviewContent ( wxCommandEvent &  e  )  [private]

Definition at line 801 of file LensCalFrame.cpp.

References LensCalImageCtrl::GetMode(), m_preview, LensCalImageCtrl::mode_corrected, and LensCalImageCtrl::SetMode().

void LensCalFrame::OnShowLines ( wxCommandEvent &  e  )  [private]

Definition at line 807 of file LensCalFrame.cpp.

References m_preview, and LensCalImageCtrl::SetShowLines().

void LensCalFrame::Optimize (  )  [private]

do the optimization

Definition at line 667 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().

void LensCalFrame::ParametersToDisplay (  )  [private]

set all parameter input wxTextField to internal values

Definition at line 234 of file LensCalFrame.cpp.

References hugin_utils::doubleTowxString(), m_edge_scale, m_edge_threshold, m_minlinelength, and m_resize_dimension.

Referenced by OnReset().

bool LensCalFrame::ReadInputs ( bool  readFocalLength,
bool  readOptions,
bool  readLensParameter 
) [private]

reads all input values into internal values

Definition at line 503 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, Projection, and str2double().

Referenced by OnFindLines(), OnOptimize(), OnRefresh(), OnSaveLens(), OnSaveProject(), and ~LensCalFrame().

void LensCalFrame::SaveLensToIni (  )  [private]

Definition at line 688 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 459 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 453 of file LensCalFrame.cpp.

References m_images, and m_images_list.

void LensCalFrame::updateProgressDisplay (  )  [protected, virtual]

called when a progress message should be displayed

Implements AppBase::ProgressDisplay.

Definition at line 248 of file LensCalFrame.cpp.

References HUGIN_CONV_FILENAME, AppBase::ProgressDisplay::m_filename, and AppBase::ProgressDisplay::m_message.


Member Data Documentation

double LensCalFrame::m_a [private]

Definition at line 112 of file LensCalFrame.h.

Referenced by GetPanorama(), OnRefresh(), Optimize(), and ReadInputs().

double LensCalFrame::m_b [private]

Definition at line 113 of file LensCalFrame.h.

Referenced by GetPanorama(), OnRefresh(), Optimize(), and ReadInputs().

double LensCalFrame::m_c [private]

Definition at line 114 of file LensCalFrame.h.

Referenced by GetPanorama(), OnRefresh(), Optimize(), and ReadInputs().

wxChoice* LensCalFrame::m_choice_projection [private]

Definition at line 99 of file LensCalFrame.h.

Referenced by AddImages(), and ReadInputs().

double LensCalFrame::m_cropfactor [private]

Definition at line 107 of file LensCalFrame.h.

Referenced by GetPanorama(), OnFindLines(), OnRefresh(), and ReadInputs().

double LensCalFrame::m_d [private]

Definition at line 115 of file LensCalFrame.h.

Referenced by GetPanorama(), OnRefresh(), Optimize(), and ReadInputs().

double LensCalFrame::m_e [private]

Definition at line 116 of file LensCalFrame.h.

Referenced by GetPanorama(), OnRefresh(), Optimize(), and ReadInputs().

double LensCalFrame::m_edge_scale [private]

Definition at line 108 of file LensCalFrame.h.

Referenced by OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().

double LensCalFrame::m_edge_threshold [private]

Definition at line 109 of file LensCalFrame.h.

Referenced by OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().

double LensCalFrame::m_focallength [private]

Definition at line 106 of file LensCalFrame.h.

Referenced by GetPanorama(), OnFindLines(), OnRefresh(), and ReadInputs().

std::vector<ImageLineList*> LensCalFrame::m_images [private]

list of all detected lines

Definition at line 103 of file LensCalFrame.h.

Referenced by AddImages(), EnableButtons(), GetPanorama(), OnFindLines(), OnImageSelected(), OnOptimize(), OnRemoveImage(), OnSaveLens(), UpdateList(), UpdateListString(), and ~LensCalFrame().

wxListBox* LensCalFrame::m_images_list [private]

Definition at line 100 of file LensCalFrame.h.

Referenced by AddImages(), OnImageSelected(), OnRemoveImage(), UpdateList(), and UpdateListString().

double LensCalFrame::m_minlinelength [private]

Definition at line 111 of file LensCalFrame.h.

Referenced by OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().

LensCalImageCtrl* LensCalFrame::m_preview [private]

Definition at line 101 of file LensCalFrame.h.

Referenced by OnFindLines(), OnImageSelected(), OnRefresh(), OnSelectPreviewContent(), OnShowLines(), Optimize(), and ~LensCalFrame().

double LensCalFrame::m_progress [private]

Reimplemented from AppBase::ProgressDisplay.

Definition at line 120 of file LensCalFrame.h.

double LensCalFrame::m_progressMax [private]

Definition at line 119 of file LensCalFrame.h.

wxString LensCalFrame::m_progressMsg [private]

Definition at line 121 of file LensCalFrame.h.

HuginBase::SrcPanoImage::Projection LensCalFrame::m_projection [private]

Definition at line 105 of file LensCalFrame.h.

Referenced by GetPanorama(), OnFindLines(), OnRefresh(), and ReadInputs().

unsigned int LensCalFrame::m_resize_dimension [private]

Definition at line 110 of file LensCalFrame.h.

Referenced by OnFindLines(), OnReset(), ParametersToDisplay(), ReadInputs(), and ~LensCalFrame().


The documentation for this class was generated from the following files:
Generated on 28 Aug 2015 for Hugintrunk by  doxygen 1.4.7