Hugintrunk
0.1
|
The image preview frame. More...
#include <PreviewFrame.h>
Public Member Functions | |
PreviewFrame (wxFrame *frame, HuginBase::Panorama &pano) | |
ctor. More... | |
virtual | ~PreviewFrame () |
dtor. More... | |
void | panoramaChanged (HuginBase::Panorama &pano) |
Notification about a Panorama change. More... | |
void | panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &changed) |
notifies about changes to images More... | |
void | OnUpdate (wxCommandEvent &event) |
void | updateProgressDisplay () |
update the display More... | |
Public Member Functions inherited from HuginBase::PanoramaObserver | |
virtual | ~PanoramaObserver () |
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 | OnClose (wxCloseEvent &e) |
void | OnChangeDisplayedImgs (wxCommandEvent &e) |
void | OnAutoPreviewToggle (wxCommandEvent &e) |
void | OnCenterHorizontally (wxCommandEvent &e) |
void | OnFitPano (wxCommandEvent &e) |
void | OnStraighten (wxCommandEvent &e) |
void | OnShowAll (wxCommandEvent &e) |
void | OnShowNone (wxCommandEvent &e) |
void | OnNumTransform (wxCommandEvent &e) |
void | OnChangeFOV (wxScrollEvent &e) |
void | OnExposureTextChanged (wxCommandEvent &e) |
void | OnRangeCompressionTextChanged (wxCommandEvent &e) |
void | OnTextCtrlChanged (wxCommandEvent &e) |
void | OnDefaultExposure (wxCommandEvent &e) |
void | OnDecreaseExposure (wxSpinEvent &e) |
void | OnIncreaseExposure (wxSpinEvent &e) |
void | OnRangeCompressionIncrease (wxSpinEvent &e) |
void | OnRangeCompressionDecrease (wxSpinEvent &e) |
void | OnProjParameterReset (wxCommandEvent &e) |
event handler for reset projection parameters More... | |
void | OnBlendChoice (wxCommandEvent &e) |
void | OnProjectionChoice (wxCommandEvent &e) |
void | OnOutputChoice (wxCommandEvent &e) |
void | OnFullScreen (wxCommandEvent &e) |
event handler for full screen More... | |
void | OnUndo (wxCommandEvent &e) |
event handler for undo More... | |
void | OnRedo (wxCommandEvent &e) |
event handler for redo More... | |
void | updatePano () |
Protected Member Functions inherited from AppBase::ProgressDisplay | |
ProgressDisplay (int maximum=0) | |
constructor More... | |
Private Attributes | |
HuginBase::Panorama & | m_pano |
PreviewPanel * | m_PreviewPanel |
wxToolBar * | m_ToolBar |
wxSlider * | m_HFOVSlider |
wxSlider * | m_VFOVSlider |
wxChoice * | m_BlendModeChoice |
wxChoice * | m_ProjectionChoice |
wxChoice * | m_outputModeChoice |
wxTextCtrl * | m_exposureTextCtrl |
wxBitmapButton * | m_defaultExposureBut |
wxSpinButton * | m_exposureSpinBut |
wxTextCtrl * | m_rangeCompressionTextCtrl |
wxSpinButton * | m_rangeCompressionSpinBut |
wxString | m_choices [3] |
int | m_oldProjFormat |
wxScrolledWindow * | m_ButtonPanel |
wxBoxSizer * | m_ButtonSizer |
wxStaticBoxSizer * | m_ToggleButtonSizer |
wxBoxSizer * | m_topsizer |
wxStaticBoxSizer * | m_projParamSizer |
std::vector< wxStaticText * > | m_projParamNamesLabel |
std::vector< wxTextCtrl * > | m_projParamTextCtrl |
std::vector< wxSlider * > | m_projParamSlider |
std::vector< wxToggleButton * > | m_ToggleButtons |
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 image preview frame.
Contains the ImagePreviewPanel and various controls for it.
it is not created with XRC, because it is highly dynamic, buttons have to be added etc.
Definition at line 40 of file PreviewFrame.h.
PreviewFrame::PreviewFrame | ( | wxFrame * | frame, |
HuginBase::Panorama & | pano | ||
) |
ctor.
Definition at line 75 of file PreviewFrame.cpp.
References HuginBase::Panorama::addObserver(), PreviewPanel::Create(), DEBUG_ASSERT, DEBUG_TRACE, huginApp::Get(), ID_BLEND_CHOICE, ID_EXPOSURE_DEFAULT, ID_EXPOSURE_SPIN, ID_EXPOSURE_TEXT, ID_FULL_SCREEN, ID_OUTPUTMODE_CHOICE, ID_PROJECTION_CHOICE, ID_RANGE_COMPRESSION_SPIN, ID_RANGE_COMPRESSION_TEXT, ID_REDO, ID_UNDO, PreviewPanel::Init(), m_BlendModeChoice, m_ButtonPanel, m_ButtonSizer, m_choices, m_defaultExposureBut, m_exposureSpinBut, m_exposureTextCtrl, m_HFOVSlider, m_oldProjFormat, m_outputModeChoice, m_pano, m_PreviewPanel, m_ProjectionChoice, m_projParamNamesLabel, m_projParamSizer, m_projParamSlider, m_projParamTextCtrl, m_rangeCompressionSpinBut, m_rangeCompressionTextCtrl, m_ToggleButtonSizer, m_ToolBar, m_topsizer, m_VFOVSlider, OnAutoPreviewToggle(), OnBlendChoice(), OnCenterHorizontally(), OnChangeFOV(), OnClose(), OnDecreaseExposure(), OnDefaultExposure(), OnExposureTextChanged(), OnFitPano(), OnFullScreen(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnProjParameterReset(), OnRangeCompressionDecrease(), OnRangeCompressionIncrease(), OnRangeCompressionTextChanged(), OnRedo(), OnShowAll(), OnShowNone(), OnStraighten(), OnTextCtrlChanged(), OnUndo(), OnUpdate(), PROJ_PARAM_NAMES_ID, PROJ_PARAM_RESET_ID, PROJ_PARAM_SLIDER_ID, PROJ_PARAM_VAL_ID, RestoreFramePosition(), PreviewPanel::SetAutoUpdate(), and PreviewPanel::SetBlendMode().
|
virtual |
dtor.
Definition at line 391 of file PreviewFrame.cpp.
References DEBUG_TRACE, m_BlendModeChoice, m_pano, m_projParamTextCtrl, m_ToolBar, HuginBase::Panorama::removeObserver(), and StoreFramePosition().
|
protected |
Definition at line 596 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), m_PreviewPanel, and PreviewPanel::SetAutoUpdate().
Referenced by PreviewFrame().
|
protected |
Definition at line 858 of file PreviewFrame.cpp.
References PreviewPanel::BLEND_COPY, PreviewPanel::BLEND_DIFFERENCE, DEBUG_WARN, m_BlendModeChoice, m_PreviewPanel, and PreviewPanel::SetBlendMode().
Referenced by PreviewFrame().
|
protected |
Definition at line 626 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), and m_pano.
Referenced by PreviewFrame().
|
protected |
Definition at line 415 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_ERROR, HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), ID_TOGGLE_BUT, m_pano, and m_ToggleButtons.
Referenced by panoramaImagesChanged().
|
protected |
Definition at line 827 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_TRACE, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjectionParameters(), m_HFOVSlider, m_pano, HuginBase::PanoramaOptions::m_projFeatures, m_projParamSlider, m_VFOVSlider, HuginBase::PanoramaOptions::setHFOV(), HuginBase::PanoramaOptions::setProjectionParameters(), and HuginBase::PanoramaOptions::setVFOV().
Referenced by PreviewFrame().
|
protected |
Definition at line 582 of file PreviewFrame.cpp.
References DEBUG_DEBUG, and DEBUG_TRACE.
Referenced by PreviewFrame().
|
protected |
Definition at line 900 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 878 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 741 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_exposureTextCtrl, m_pano, HuginBase::PanoramaOptions::outputExposureValue, hugin_utils::str2double(), and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 656 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_INFO, DEBUG_TRACE, HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getVFOV(), m_pano, hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), and updatePano().
Referenced by PreviewFrame().
|
protected |
event handler for full screen
Definition at line 985 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), and m_PreviewPanel.
Referenced by PreviewFrame().
|
protected |
Definition at line 890 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 705 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, hugin_utils::str2double(), and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 948 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_WARN, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_outputModeChoice, m_pano, HuginBase::PanoramaOptions::outputMode, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 930 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_WARN, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, m_ProjectionChoice, HuginBase::PanoramaOptions::setProjection(), and updatePano().
Referenced by PreviewFrame().
|
protected |
event handler for reset projection parameters
Definition at line 818 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, and HuginBase::PanoramaOptions::resetProjectionParameters().
Referenced by PreviewFrame().
|
protected |
Definition at line 920 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, celeste::max(), HuginBase::PanoramaOptions::outputRangeCompression, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 910 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, celeste::min(), HuginBase::PanoramaOptions::outputRangeCompression, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 760 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, m_rangeCompressionTextCtrl, HuginBase::PanoramaOptions::outputRangeCompression, hugin_utils::str2double(), and updatePano().
Referenced by PreviewFrame().
|
protected |
event handler for redo
Definition at line 1008 of file PreviewFrame.cpp.
References PanoCommand::GlobalCmdHist::getInstance().
Referenced by PreviewFrame().
|
protected |
Definition at line 675 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_ASSERT, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 690 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_ASSERT, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().
Referenced by PreviewFrame().
|
protected |
Definition at line 635 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), and m_pano.
Referenced by PreviewFrame().
|
protected |
Definition at line 789 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_INFO, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjectionParameters(), m_pano, HuginBase::PanoramaOptions::m_projFeatures, m_projParamTextCtrl, HuginBase::PanoramaOptions::setProjectionParameters(), hugin_utils::str2double(), and updatePano().
Referenced by PreviewFrame().
|
protected |
event handler for undo
Definition at line 995 of file PreviewFrame.cpp.
References PanoCommand::GlobalCmdHist::getInstance().
Referenced by PreviewFrame().
void PreviewFrame::OnUpdate | ( | wxCommandEvent & | event | ) |
Definition at line 644 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), and m_PreviewPanel.
Referenced by MainFrame::LoadProjectFile(), MainFrame::OnMergeProject(), MainFrame::OnNewProject(), MainFrame::OnTogglePreviewFrame(), and PreviewFrame().
|
virtual |
Notification about a Panorama change.
This function will always be called, even when the change could be handled by panoramaImageAdded() or other notify functions.
This allows lazy observers to just listen to panoramaChanged().
Implements HuginBase::PanoramaObserver.
Definition at line 436 of file PreviewFrame.cpp.
References DEBUG_DEBUG, hugin_utils::doubleToString(), HuginBase::PanoramaOptions::fovCalcSupported(), HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getProjectionParameters(), HuginBase::PanoramaOptions::getVFOV(), m_exposureTextCtrl, m_HFOVSlider, m_oldProjFormat, m_outputModeChoice, m_ProjectionChoice, HuginBase::PanoramaOptions::m_projFeatures, m_projParamNamesLabel, m_projParamSizer, m_projParamSlider, m_projParamTextCtrl, m_rangeCompressionTextCtrl, m_ToolBar, m_topsizer, m_VFOVSlider, HuginBase::PanoramaOptions::OUTPUT_HDR, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputRangeCompression, hugin_utils::roundi(), and updatePano().
|
virtual |
notifies about changes to images
Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.
pano | the panorama object that changed |
changed | set of changed images |
Implements HuginBase::PanoramaObserver.
Definition at line 521 of file PreviewFrame.cpp.
References DEBUG_INFO, DEBUG_TRACE, HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HUGIN_CONV_FILENAME, ID_TOGGLE_BUT, m_ButtonPanel, m_ButtonSizer, m_pano, m_ToggleButtons, OnChangeDisplayedImgs(), set_contains(), and updatePano().
|
protected |
Definition at line 649 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), m_PreviewPanel, and m_ToolBar.
Referenced by OnDecreaseExposure(), OnDefaultExposure(), OnExposureTextChanged(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnRangeCompressionDecrease(), OnRangeCompressionIncrease(), OnRangeCompressionTextChanged(), OnShowAll(), OnShowNone(), OnTextCtrlChanged(), panoramaChanged(), and panoramaImagesChanged().
|
virtual |
update the display
Implements AppBase::ProgressDisplay.
Definition at line 966 of file PreviewFrame.cpp.
References HUGIN_CONV_FILENAME, AppBase::ProgressDisplay::m_filename, and AppBase::ProgressDisplay::m_message.
|
private |
Definition at line 101 of file PreviewFrame.h.
Referenced by OnBlendChoice(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 116 of file PreviewFrame.h.
Referenced by panoramaImagesChanged(), and PreviewFrame().
|
private |
Definition at line 117 of file PreviewFrame.h.
Referenced by panoramaImagesChanged(), and PreviewFrame().
|
private |
Definition at line 110 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 105 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 106 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 104 of file PreviewFrame.h.
Referenced by OnExposureTextChanged(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 99 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 111 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 103 of file PreviewFrame.h.
Referenced by OnOutputChoice(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 95 of file PreviewFrame.h.
Referenced by OnCenterHorizontally(), OnChangeDisplayedImgs(), OnChangeFOV(), OnDecreaseExposure(), OnDefaultExposure(), OnExposureTextChanged(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnProjParameterReset(), OnRangeCompressionDecrease(), OnRangeCompressionIncrease(), OnRangeCompressionTextChanged(), OnShowAll(), OnShowNone(), OnStraighten(), OnTextCtrlChanged(), panoramaImagesChanged(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 97 of file PreviewFrame.h.
Referenced by OnAutoPreviewToggle(), OnBlendChoice(), OnFullScreen(), OnUpdate(), PreviewFrame(), and updatePano().
|
private |
Definition at line 102 of file PreviewFrame.h.
Referenced by OnProjectionChoice(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 122 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 121 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 124 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 123 of file PreviewFrame.h.
Referenced by OnTextCtrlChanged(), panoramaChanged(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 108 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 107 of file PreviewFrame.h.
Referenced by OnRangeCompressionTextChanged(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 125 of file PreviewFrame.h.
Referenced by OnChangeDisplayedImgs(), OnShowAll(), OnShowNone(), and panoramaImagesChanged().
|
private |
Definition at line 118 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 98 of file PreviewFrame.h.
Referenced by panoramaChanged(), PreviewFrame(), updatePano(), and ~PreviewFrame().
|
private |
Definition at line 120 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 100 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().