|
Hugin trunk 0.1
|
panel for enfuse GUI More...
#include <PerspectivePanel.h>

Public Member Functions | |
| bool | Create (wxWindow *parent, MyExecPanel *logWindow) |
| create the panel and populate all controls | |
| void | OnProcessFinished (wxCommandEvent &e) |
| clean up temporary files at end | |
| wxString | GetStatusString () |
| return help text for current mode | |
| void | SetImage (const wxString &filename) |
| load the given image | |
Protected Member Functions | |
| void | OnLoadImage (wxCommandEvent &e) |
| void | OnLoadDistortion (wxCommandEvent &e) |
| void | OnZoom (wxCommandEvent &e) |
| void | OnPreview (wxCommandEvent &e) |
| void | OnColourChanged (wxColourPickerEvent &e) |
| void | OnCropChanged (wxCommandEvent &e) |
| void | OnRotationChanged (wxCommandEvent &e) |
| void | OnModeChanged (wxCommandEvent &e) |
| void | OnFindLines (wxCommandEvent &e) |
| void | OnRemoveLines (wxCommandEvent &e) |
| void | OnSavePTO (wxCommandEvent &e) |
| void | OnSaveOutput (wxCommandEvent &e) |
Private Member Functions | |
| bool | ReadInputs () |
| read the values from the input boxes | |
| bool | GetPanorama (HuginBase::Panorama &pano, const bool optimized=true) |
| return Pano object, it is optimized and the crop set when optimized=true | |
| const PerspectiveImageCtrl::ImageRotation | GetRotation () const |
| return the image rotation | |
| const double | GetRoll () const |
| return the roll angle in degree | |
Private Attributes | |
| PerspectiveImageCtrl * | m_preview { nullptr } |
| controls | |
| wxChoice * | m_previewChoice { nullptr } |
| wxChoice * | m_zoomChoice { nullptr } |
| wxChoice * | m_rotationChoice { nullptr } |
| wxChoice * | m_modeChoice { nullptr } |
| wxTextCtrl * | m_focallengthTextCtrl { nullptr } |
| wxTextCtrl * | m_cropTextCtrl { nullptr } |
| wxButton * | m_findLineButton { nullptr } |
| wxButton * | m_removeLinesButton { nullptr } |
| wxButton * | m_outputButton { nullptr } |
| wxStaticText * | m_helpTextCtrl { nullptr } |
| MyExecPanel * | m_logWindow { nullptr } |
| HuginBase::SrcPanoImage | m_srcImage |
| SrcPanoImage, contains information about the image. | |
| PerspectiveImageCtrl::ImageRotation | m_exifRotation { PerspectiveImageCtrl::ROT0 } |
| save rotation as written in EXIF | |
| int | m_degDigits { 3 } |
| wxArrayString | m_tempFiles |
| temp files, which should be deleted at end | |
panel for enfuse GUI
Definition at line 37 of file PerspectivePanel.h.
| bool PerspectivePanel::Create | ( | wxWindow * | parent, |
| MyExecPanel * | logWindow | ||
| ) |
create the panel and populate all controls
Definition at line 87 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::Create(), HUGIN_MASK_COLOUR_POINT_SELECTED, m_cropTextCtrl, m_degDigits, m_findLineButton, m_focallengthTextCtrl, m_helpTextCtrl, m_logWindow, m_modeChoice, m_outputButton, m_preview, m_previewChoice, m_removeLinesButton, m_rotationChoice, m_zoomChoice, OnColourChanged(), OnCropChanged(), OnFindLines(), OnLoadDistortion(), OnLoadImage(), OnModeChanged(), OnPreview(), OnRemoveLines(), OnRotationChanged(), OnSaveOutput(), OnSavePTO(), OnZoom(), PerspectiveImageCtrl::SetLineColour(), PerspectiveImageCtrl::setScale(), and threshold().
Referenced by ToolboxFrame::ToolboxFrame().
|
private |
return Pano object, it is optimized and the crop set when optimized=true
Definition at line 630 of file PerspectivePanel.cpp.
References HuginBase::Panorama::addImage(), HuginBase::CalculateOptimalScale::calcOptimalPanoScale(), deregisterPTWXDlgFcn(), PerspectiveImageCtrl::GetControlPoints(), HuginBase::Panorama::getCtrlPoints(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), GetRoll(), HuginBase::PanoramaOptions::getWidth(), hugin_utils::HuginMessageBox(), m_preview, m_srcImage, HuginBase::PTools::optimize(), HuginBase::PanoramaOptions::outputExposureValue, ReadInputs(), HuginBase::PanoramaOptions::RECTILINEAR, registerPTWXDlgFcn(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::Panorama::setCtrlPoints(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setProjection(), HuginBase::PanoramaOptions::setROI(), HuginBase::PanoramaOptions::setWidth(), and threshold().
Referenced by OnFindLines(), OnPreview(), OnSaveOutput(), and OnSavePTO().
return the roll angle in degree
Definition at line 730 of file PerspectivePanel.cpp.
References GetRotation(), PerspectiveImageCtrl::ROT0, PerspectiveImageCtrl::ROT180, PerspectiveImageCtrl::ROT270, and PerspectiveImageCtrl::ROT90.
Referenced by GetPanorama().
|
private |
return the image rotation
Definition at line 705 of file PerspectivePanel.cpp.
References m_exifRotation, m_rotationChoice, PerspectiveImageCtrl::ROT0, PerspectiveImageCtrl::ROT180, PerspectiveImageCtrl::ROT270, and PerspectiveImageCtrl::ROT90.
Referenced by GetRoll(), OnRotationChanged(), and SetImage().
| wxString PerspectivePanel::GetStatusString | ( | ) |
return help text for current mode
Definition at line 565 of file PerspectivePanel.cpp.
References m_modeChoice, and threshold().
Referenced by OnModeChanged().
|
protected |
Definition at line 351 of file PerspectivePanel.cpp.
References m_preview, PerspectiveImageCtrl::SetLineColour(), and threshold().
Referenced by Create().
|
protected |
Definition at line 357 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::IsOriginalShown(), m_preview, and OnPreview().
Referenced by Create().
|
protected |
Definition at line 397 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::AddLines(), PerspectiveImageCtrl::getCachedImage(), HuginLines::GetLines(), GetPanorama(), HuginLines::GetVerticalLines(), m_preview, m_previewChoice, OnPreview(), and threshold().
Referenced by Create().
|
protected |
Definition at line 329 of file PerspectivePanel.cpp.
References m_srcImage, OnPreview(), HuginBase::SrcPanoImage::readDistortionFromDB(), and threshold().
Referenced by Create().
|
protected |
Definition at line 280 of file PerspectivePanel.cpp.
References GetFileDialogImageFilters(), SetImage(), and threshold().
Referenced by Create().
|
protected |
Definition at line 376 of file PerspectivePanel.cpp.
References GetStatusString(), PerspectiveImageCtrl::IsOriginalShown(), m_findLineButton, m_helpTextCtrl, m_modeChoice, m_preview, m_previewChoice, m_removeLinesButton, OnPreview(), PerspectiveImageCtrl::SetRectMode(), and threshold().
Referenced by Create().
|
protected |
Definition at line 187 of file PerspectivePanel.cpp.
References GetPanorama(), m_preview, m_previewChoice, m_zoomChoice, PerspectiveImageCtrl::setOriginalMode(), and PerspectiveImageCtrl::SetRemappedMode().
Referenced by Create(), OnCropChanged(), OnFindLines(), OnLoadDistortion(), OnModeChanged(), OnRemoveLines(), OnRotationChanged(), and SetImage().
| void PerspectivePanel::OnProcessFinished | ( | wxCommandEvent & | e | ) |
clean up temporary files at end
Definition at line 548 of file PerspectivePanel.cpp.
References m_outputButton, m_tempFiles, and threshold().
Referenced by ToolboxFrame::OnQueueProgress().
|
protected |
Definition at line 424 of file PerspectivePanel.cpp.
References m_preview, m_previewChoice, OnPreview(), and PerspectiveImageCtrl::RemoveLines().
Referenced by Create().
|
protected |
Definition at line 366 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::ChangeRotation(), GetRotation(), PerspectiveImageCtrl::IsOriginalShown(), m_preview, and OnPreview().
Referenced by Create().
|
protected |
Definition at line 465 of file PerspectivePanel.cpp.
References MyExecPanel::ClearOutput(), MyExecPanel::ExecQueue(), HuginQueue::GetConfigTempDir(), HuginQueue::GetExternalProgram(), HuginQueue::GetInternalProgram(), GetMainImageFilters(), GetPanorama(), HUGIN_CONV_FILENAME, m_logWindow, m_outputButton, m_srcImage, m_tempFiles, threshold(), HuginBase::Panorama::WritePTOFile(), and HuginQueue::wxEscapeFilename().
Referenced by Create().
|
protected |
Definition at line 432 of file PerspectivePanel.cpp.
References hugin_utils::AskUserOverwrite(), GetPanorama(), hugin_utils::getPathPrefix(), HUGIN_CONV_FILENAME, m_preview, threshold(), and HuginBase::Panorama::WritePTOFile().
Referenced by Create().
|
protected |
Definition at line 153 of file PerspectivePanel.cpp.
References DEBUG_ERROR, m_preview, and PerspectiveImageCtrl::setScale().
Referenced by Create().
|
private |
read the values from the input boxes
Definition at line 577 of file PerspectivePanel.cpp.
References HuginBase::SrcPanoImage::calcHFOV(), hugin_utils::HuginMessageBox(), m_cropTextCtrl, m_focallengthTextCtrl, m_srcImage, hugin_utils::str2double(), and threshold().
Referenced by GetPanorama().
load the given image
Definition at line 217 of file PerspectivePanel.cpp.
References HuginBase::SrcPanoImage::applyEXIFValues(), HuginBase::SrcPanoImage::calcFocalLength(), HuginBase::SrcPanoImage::checkImageSizeKnown(), hugin_utils::doubleTowxString(), GetRotation(), HUGIN_CONV_FILENAME, m_cropTextCtrl, m_degDigits, m_exifRotation, m_focallengthTextCtrl, m_preview, m_previewChoice, m_srcImage, OnPreview(), HuginBase::SrcPanoImage::readCropfactorFromDB(), HuginBase::SrcPanoImage::readEXIF(), PerspectiveImageCtrl::ROT0, PerspectiveImageCtrl::ROT180, PerspectiveImageCtrl::ROT270, PerspectiveImageCtrl::ROT90, PerspectiveImageCtrl::setImage(), and threshold().
Referenced by PerspectiveDropTarget::OnDropFiles(), and OnLoadImage().
|
private |
Definition at line 80 of file PerspectivePanel.h.
Referenced by Create(), ReadInputs(), and SetImage().
|
private |
Definition at line 90 of file PerspectivePanel.h.
Referenced by Create(), and SetImage().
|
private |
save rotation as written in EXIF
Definition at line 89 of file PerspectivePanel.h.
Referenced by GetRotation(), and SetImage().
Definition at line 81 of file PerspectivePanel.h.
Referenced by Create(), and OnModeChanged().
|
private |
Definition at line 79 of file PerspectivePanel.h.
Referenced by Create(), ReadInputs(), and SetImage().
|
private |
Definition at line 84 of file PerspectivePanel.h.
Referenced by Create(), and OnModeChanged().
|
private |
Definition at line 85 of file PerspectivePanel.h.
Referenced by Create(), and OnSaveOutput().
Definition at line 78 of file PerspectivePanel.h.
Referenced by Create(), GetStatusString(), and OnModeChanged().
Definition at line 83 of file PerspectivePanel.h.
Referenced by Create(), OnProcessFinished(), and OnSaveOutput().
|
private |
controls
Definition at line 74 of file PerspectivePanel.h.
Referenced by Create(), GetPanorama(), OnColourChanged(), OnCropChanged(), OnFindLines(), OnModeChanged(), OnPreview(), OnRemoveLines(), OnRotationChanged(), OnSavePTO(), OnZoom(), and SetImage().
Definition at line 75 of file PerspectivePanel.h.
Referenced by Create(), OnFindLines(), OnModeChanged(), OnPreview(), OnRemoveLines(), and SetImage().
Definition at line 82 of file PerspectivePanel.h.
Referenced by Create(), and OnModeChanged().
Definition at line 77 of file PerspectivePanel.h.
Referenced by Create(), and GetRotation().
|
private |
SrcPanoImage, contains information about the image.
Definition at line 87 of file PerspectivePanel.h.
Referenced by GetPanorama(), OnLoadDistortion(), OnSaveOutput(), ReadInputs(), and SetImage().
|
private |
temp files, which should be deleted at end
Definition at line 92 of file PerspectivePanel.h.
Referenced by OnProcessFinished(), and OnSaveOutput().
Definition at line 76 of file PerspectivePanel.h.
Referenced by Create(), and OnPreview().