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 resetProgress (double max)
bool increaseProgress (double delta)
bool increaseProgress (double delta, const std::string &msg)
void setMessage (const std::string &msg)
 change the message text of the current task
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  ) 
 

constructor

Definition at line 127 of file LensCalFrame.cpp.

References DEBUG_TRACE, DEFAULT_LENSCAL_SCALE, DEFAULT_LENSCAL_THRESHOLD, DEFAULT_MINLINELENGTH, DEFAULT_RESIZE_DIMENSION, FillLensProjectionList(), HuginBase::ImageCache::getInstance(), HUGIN_IMGCACHE_UPPERBOUND, HuginBase::ImageCache::setProgressDisplay(), and HuginBase::ImageCache::SetUpperLimit().

LensCalFrame::~LensCalFrame  )  [virtual]
 

destructor

Definition at line 212 of file LensCalFrame.cpp.

References HuginBase::LensDB::LensDB::Clean(), DEBUG_TRACE, HuginBase::ImageCache::getInstance(), m_edge_scale, m_edge_threshold, m_images, m_minlinelength, m_preview, m_resize_dimension, ReadInputs(), LensCalImageCtrl::SetEmptyImage(), HuginBase::ImageCache::setProgressDisplay(), and StoreFramePosition().


Member Function Documentation

void LensCalFrame::AddImages wxArrayString  files  ) 
 

Definition at line 342 of file LensCalFrame.cpp.

References EnableButtons(), ImageLineList::GetFilename(), ImageLineList::GetPanoImage(), HuginBase::SrcPanoImage::hasEXIFread(), m_choice_projection, m_images, m_images_list, OnImageSelected(), SelectProjection(), and UpdateList().

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

bool LensCalFrame::displayProgress  )  [private]
 

update progress display

Definition at line 288 of file LensCalFrame.cpp.

References m_progress, m_progressMax, and m_progressMsg.

Referenced by increaseProgress().

void LensCalFrame::EnableButtons  )  [private]
 

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

Definition at line 542 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 639 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(), m_a, m_b, m_c, m_cropfactor, m_d, m_e, m_focallength, m_images, m_projection, HuginBase::OptimizeVector, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::BaseSrcPanoImage::setExifCropFactor(), HuginBase::BaseSrcPanoImage::setExifFocalLength(), HuginBase::BaseSrcPanoImage::setExposureValue(), HuginBase::BaseSrcPanoImage::setHFOV(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setProjection(), HuginBase::BaseSrcPanoImage::setProjection(), HuginBase::Panorama::setSrcImage(), HuginBase::SrcPanoImage::setVar(), HuginBase::BaseSrcPanoImage::setWhiteBalanceBlue(), HuginBase::BaseSrcPanoImage::setWhiteBalanceRed(), HuginBase::ImageVariableGroup::switchParts(), and HuginBase::ImageVariableGroup::unlinkVariableImage().

Referenced by OnSaveLens(), OnSaveProject(), Optimize(), and SaveLensToIni().

const wxString & LensCalFrame::GetXRCPath  ) 
 

get the path to the xrc directory

Definition at line 251 of file LensCalFrame.cpp.

bool LensCalFrame::increaseProgress double  delta,
const std::string msg
 

Definition at line 274 of file LensCalFrame.cpp.

References displayProgress(), m_progress, and m_progressMsg.

bool LensCalFrame::increaseProgress double  delta  ) 
 

Definition at line 263 of file LensCalFrame.cpp.

References displayProgress(), m_progress, and m_progressMax.

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

Definition at line 418 of file LensCalFrame.cpp.

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

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

Definition at line 337 of file LensCalFrame.cpp.

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

Definition at line 598 of file LensCalFrame.cpp.

References HuginBase::ImageCache::getImage(), HuginBase::ImageCache::getInstance(), HUGIN_CONV_FILENAME, m_cropfactor, m_focallength, m_images, m_minlinelength, m_preview, m_projection, ReadInputs(), LensCalImageCtrl::SetLens(), and UpdateList().

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

Definition at line 835 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 621 of file LensCalFrame.cpp.

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

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

Definition at line 870 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 525 of file LensCalFrame.cpp.

References EnableButtons(), HuginBase::ImageCache::getInstance(), m_images, m_images_list, HuginBase::ImageCache::softFlush(), and UpdateList().

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

Definition at line 861 of file LensCalFrame.cpp.

References m_edge_scale, m_edge_threshold, m_minlinelength, m_resize_dimension, and ParametersToDisplay().

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

Definition at line 764 of file LensCalFrame.cpp.

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

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

Definition at line 798 of file LensCalFrame.cpp.

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

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

Definition at line 849 of file LensCalFrame.cpp.

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

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

Definition at line 855 of file LensCalFrame.cpp.

References m_preview, and LensCalImageCtrl::SetShowLines().

void LensCalFrame::Optimize  )  [private]
 

do the optimization

Definition at line 715 of file LensCalFrame.cpp.

References 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 243 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 551 of file LensCalFrame.cpp.

References GetSelectedProjection(), 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 str2double().

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

void LensCalFrame::resetProgress double  max  ) 
 

Definition at line 256 of file LensCalFrame.cpp.

References m_progress, m_progressMax, and m_progressMsg.

void LensCalFrame::SaveLensToIni  )  [private]
 

Definition at line 736 of file LensCalFrame.cpp.

References GetPanorama(), and SaveLensParameters().

Referenced by OnSaveLens().

void LensCalFrame::setMessage const std::string msg  ) 
 

change the message text of the current task

Reimplemented from AppBase::MultiProgressDisplay.

Definition at line 283 of file LensCalFrame.cpp.

References m_progressMsg.

void LensCalFrame::UpdateList bool  restoreSelection  ) 
 

updates the list box with current values

Definition at line 507 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 501 of file LensCalFrame.cpp.

References m_images, and m_images_list.

void LensCalFrame::updateProgressDisplay  )  [protected, virtual]
 

called when a progress message should be displayed

Reimplemented from AppBase::MultiProgressDisplay.

Definition at line 303 of file LensCalFrame.cpp.

References DEBUG_TRACE.


Member Data Documentation

double LensCalFrame::m_a [private]
 

Definition at line 117 of file LensCalFrame.h.

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

double LensCalFrame::m_b [private]
 

Definition at line 118 of file LensCalFrame.h.

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

double LensCalFrame::m_c [private]
 

Definition at line 119 of file LensCalFrame.h.

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

wxChoice* LensCalFrame::m_choice_projection [private]
 

Definition at line 104 of file LensCalFrame.h.

Referenced by AddImages(), and ReadInputs().

double LensCalFrame::m_cropfactor [private]
 

Definition at line 112 of file LensCalFrame.h.

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

double LensCalFrame::m_d [private]
 

Definition at line 120 of file LensCalFrame.h.

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

double LensCalFrame::m_e [private]
 

Definition at line 121 of file LensCalFrame.h.

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

double LensCalFrame::m_edge_scale [private]
 

Definition at line 113 of file LensCalFrame.h.

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

double LensCalFrame::m_edge_threshold [private]
 

Definition at line 114 of file LensCalFrame.h.

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

double LensCalFrame::m_focallength [private]
 

Definition at line 111 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 108 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 105 of file LensCalFrame.h.

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

double LensCalFrame::m_minlinelength [private]
 

Definition at line 116 of file LensCalFrame.h.

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

LensCalImageCtrl* LensCalFrame::m_preview [private]
 

Definition at line 106 of file LensCalFrame.h.

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

double LensCalFrame::m_progress [private]
 

Definition at line 125 of file LensCalFrame.h.

Referenced by displayProgress(), increaseProgress(), and resetProgress().

double LensCalFrame::m_progressMax [private]
 

Definition at line 124 of file LensCalFrame.h.

Referenced by displayProgress(), increaseProgress(), and resetProgress().

wxString LensCalFrame::m_progressMsg [private]
 

Definition at line 126 of file LensCalFrame.h.

Referenced by displayProgress(), increaseProgress(), resetProgress(), and setMessage().

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

Definition at line 110 of file LensCalFrame.h.

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

unsigned int LensCalFrame::m_resize_dimension [private]
 

Definition at line 115 of file LensCalFrame.h.

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


The documentation for this class was generated from the following files:
Generated on Sat Sep 20 01:25:46 2014 for Hugintrunk by  doxygen 1.3.9.1