OptimizePanel Class Reference

run the optimizer. More...

#include <OptimizePanel.h>

Inheritance diagram for OptimizePanel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OptimizePanel ()
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
 Delayed creation.
virtual ~OptimizePanel ()
void Init (HuginBase::Panorama *pano)
virtual void panoramaChanged (HuginBase::Panorama &pano)
 receives notification about panorama changes
virtual void panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
 receives notification about panorama changes
void OnOptimizeButton (wxCommandEvent &e)
 run the optimizer
void OnCheckOnlyActiveImages (wxCommandEvent &e)
 handle "only active images" checkbox
void SetOnlyActiveImages (const bool onlyActive)
 for external setting of "only active image" checkbox
void SetGuiLevel (GuiLevel newGuiLevel)

Protected Member Functions

void OnClose (wxCloseEvent &e)
void OnReset (wxCommandEvent &e)
void runOptimizer (const HuginBase::UIntSet &img)
bool AskApplyResult (wxWindow *activeWindow, const HuginBase::Panorama &pano)

Protected Attributes

ImagesTreeCtrlm_images_tree_list
ImagesTreeCtrlm_lens_tree_list
wxCheckBox * m_only_active_images_cb
wxCheckBox * m_edit_cb
HuginBase::Panoramam_pano

Detailed Description

run the optimizer.

this is tied into the wxWindows hugin

it will emit an event that

Definition at line 38 of file OptimizePanel.h.


Constructor & Destructor Documentation

OptimizePanel::OptimizePanel (  ) 

OptimizePanel::~OptimizePanel (  )  [virtual]

Definition at line 134 of file OptimizePanel.cpp.

References DEBUG_TRACE, m_only_active_images_cb, m_pano, and HuginBase::Panorama::removeObserver().


Member Function Documentation

bool OptimizePanel::AskApplyResult ( wxWindow *  activeWindow,
const HuginBase::Panorama pano 
) [protected]

Definition at line 299 of file OptimizePanel.cpp.

References HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), const_map_get(), HuginBase::Panorama::getVariables(), m_only_active_images_cb, celeste::max(), and celeste::min().

Referenced by runOptimizer().

bool OptimizePanel::Create ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel") 
)

Delayed creation.

Definition at line 64 of file OptimizePanel.cpp.

References DEBUG_ASSERT, DEBUG_TRACE, MainFrame::Get(), m_edit_cb, m_images_tree_list, m_lens_tree_list, m_only_active_images_cb, and MainFrame::SetOptimizeOnlyActiveImages().

void OptimizePanel::Init ( HuginBase::Panorama pano  ) 

Definition at line 111 of file OptimizePanel.cpp.

References HuginBase::Panorama::addObserver(), DEBUG_TRACE, ImagesTreeCtrl::DISPLAY_LENS, ImagesTreeCtrl::DISPLAY_POSITION, ImagesTreeCtrl::GROUP_LENS, ImagesTreeCtrl::Init(), m_images_tree_list, m_lens_tree_list, m_pano, ImagesTreeCtrl::SetDisplayMode(), ImagesTreeCtrl::SetGroupMode(), and ImagesTreeCtrl::SetOptimizerMode().

void OptimizePanel::OnCheckOnlyActiveImages ( wxCommandEvent &  e  ) 

handle "only active images" checkbox

Definition at line 376 of file OptimizePanel.cpp.

References MainFrame::Get(), m_only_active_images_cb, and MainFrame::SetOptimizeOnlyActiveImages().

void OptimizePanel::OnClose ( wxCloseEvent &  e  )  [protected]

Definition at line 348 of file OptimizePanel.cpp.

References DEBUG_DEBUG, and DEBUG_TRACE.

void OptimizePanel::OnOptimizeButton ( wxCommandEvent &  e  ) 

run the optimizer

Definition at line 158 of file OptimizePanel.cpp.

References CheckLensStacks(), DEBUG_TRACE, fill_set(), HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptimizerSwitch(), m_only_active_images_cb, m_pano, and runOptimizer().

Referenced by MainFrame::OnOptimize().

void OptimizePanel::OnReset ( wxCommandEvent &  e  )  [protected]

Definition at line 365 of file OptimizePanel.cpp.

References CommandHistory::addCommand(), MainFrame::Get(), PanoOperation::PanoOperation::GetCommand(), MainFrame::GetGuiLevel(), PanoCommand::GlobalCmdHist::getInstance(), ImagesTreeCtrl::GetSelectedImages(), m_images_tree_list, m_pano, and PanoOperation::ResetOperation::RESET_DIALOG_LENS.

void OptimizePanel::panoramaChanged ( HuginBase::Panorama pano  )  [virtual]

receives notification about panorama changes

Implements HuginBase::PanoramaObserver.

Definition at line 143 of file OptimizePanel.cpp.

References HuginBase::Panorama::getOptimizerSwitch(), m_edit_cb, m_images_tree_list, m_lens_tree_list, and m_pano.

void OptimizePanel::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet imgNr 
) [virtual]

receives notification about panorama changes

Implements HuginBase::PanoramaObserver.

Definition at line 151 of file OptimizePanel.cpp.

References HuginBase::Panorama::getNrOfImages().

void OptimizePanel::runOptimizer ( const HuginBase::UIntSet img  )  [protected]

Definition at line 190 of file OptimizePanel.cpp.

References CommandHistory::addCommand(), AskApplyResult(), cerr, HuginBase::PanoramaOptions::CYLINDRICAL, DEBUG_DEBUG, DEBUG_TRACE, deregisterPTWXDlgFcn(), HuginBase::PanoramaOptions::EQUIRECTANGULAR, fill_set(), HuginBase::Panorama::getCtrlPoints(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptimizerSwitch(), HuginBase::Panorama::getOptimizeVector(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjection(), HuginBase::Panorama::getSubset(), HuginBase::Panorama::getVariables(), m_edit_cb, m_pano, HuginBase::OPT_PAIR, HuginBase::PTools::optimize(), HuginBase::Panorama::printPanoramaScript(), HuginBase::PanoramaOptions::RECTILINEAR, registerPTWXDlgFcn(), HuginBase::Panorama::setOptions(), and HuginBase::PanoramaOptions::setProjection().

Referenced by OnOptimizeButton().

void OptimizePanel::SetGuiLevel ( GuiLevel  newGuiLevel  ) 

Definition at line 128 of file OptimizePanel.cpp.

References m_images_tree_list, m_lens_tree_list, and ImagesTreeCtrl::SetGuiLevel().

Referenced by MainFrame::SetGuiLevel().

void OptimizePanel::SetOnlyActiveImages ( const bool  onlyActive  ) 

for external setting of "only active image" checkbox

Definition at line 381 of file OptimizePanel.cpp.

References m_only_active_images_cb.

Referenced by MainFrame::OnOnlyActiveImages().


Member Data Documentation

wxCheckBox* OptimizePanel::m_edit_cb [protected]

Definition at line 78 of file OptimizePanel.h.

Referenced by Create(), panoramaChanged(), and runOptimizer().

ImagesTreeCtrl* OptimizePanel::m_images_tree_list [protected]

Definition at line 74 of file OptimizePanel.h.

Referenced by Create(), Init(), OnReset(), panoramaChanged(), and SetGuiLevel().

ImagesTreeCtrl* OptimizePanel::m_lens_tree_list [protected]

Definition at line 75 of file OptimizePanel.h.

Referenced by Create(), Init(), panoramaChanged(), and SetGuiLevel().

wxCheckBox* OptimizePanel::m_only_active_images_cb [protected]

Definition at line 77 of file OptimizePanel.h.

Referenced by AskApplyResult(), Create(), OnCheckOnlyActiveImages(), OnOptimizeButton(), SetOnlyActiveImages(), and ~OptimizePanel().

HuginBase::Panorama* OptimizePanel::m_pano [protected]

Definition at line 80 of file OptimizePanel.h.

Referenced by Init(), OnOptimizeButton(), OnReset(), panoramaChanged(), runOptimizer(), and ~OptimizePanel().


The documentation for this class was generated from the following files:
Generated on 3 Dec 2016 for Hugintrunk by  doxygen 1.4.7