Hugintrunk
0.1
|
panel for enfuse GUI More...
#include <PerspectivePanel.h>
Public Member Functions | |
~PerspectivePanel () | |
destructor, save position and size More... | |
bool | Create (wxWindow *parent, MyExecPanel *logWindow) |
create the panel and populate all controls More... | |
void | OnProcessFinished (wxCommandEvent &e) |
clean up temporary files at end More... | |
wxString | GetStatusString () |
return help text for current mode More... | |
void | SetImage (const wxString &filename) |
load the given image More... | |
Protected Member Functions | |
void | OnSize (wxSizeEvent &e) |
void | OnLoadImage (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 | OnSavePTO (wxCommandEvent &e) |
void | OnSaveOutput (wxCommandEvent &e) |
Private Member Functions | |
bool | ReadInputs () |
read the values from the input boxes More... | |
bool | GetPanorama (HuginBase::Panorama &pano, const bool optimized=true) |
return Pano object, it is optimized and the crop set when optimized=true More... | |
const PerspectiveImageCtrl::ImageRotation | GetRotation () const |
return the image rotation More... | |
const double | GetRoll () const |
return the roll angle in degree More... | |
Private Attributes | |
PerspectiveImageCtrl * | m_preview { nullptr } |
controls More... | |
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_outputButton { nullptr } |
wxStaticText * | m_helpTextCtrl { nullptr } |
MyExecPanel * | m_logWindow { nullptr } |
HuginBase::SrcPanoImage | m_srcImage |
SrcPanoImage, contains information about the image. More... | |
PerspectiveImageCtrl::ImageRotation | m_exifRotation { PerspectiveImageCtrl::ROT0 } |
save rotation as written in EXIF More... | |
int | m_degDigits { 3 } |
wxArrayString | m_tempFiles |
temp files, which should be deleted at end More... | |
panel for enfuse GUI
Definition at line 37 of file PerspectivePanel.h.
PerspectivePanel::~PerspectivePanel | ( | ) |
destructor, save position and size
Definition at line 87 of file PerspectivePanel.cpp.
bool PerspectivePanel::Create | ( | wxWindow * | parent, |
MyExecPanel * | logWindow | ||
) |
create the panel and populate all controls
Definition at line 93 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_rotationChoice, m_zoomChoice, OnColourChanged(), OnCropChanged(), OnFindLines(), OnLoadImage(), OnModeChanged(), OnPreview(), OnRotationChanged(), OnSaveOutput(), OnSavePTO(), OnSize(), OnZoom(), PerspectiveImageCtrl::SetLineColour(), and PerspectiveImageCtrl::setScale().
Referenced by ToolboxFrame::ToolboxFrame().
|
private |
return Pano object, it is optimized and the crop set when optimized=true
Definition at line 598 of file PerspectivePanel.cpp.
References HuginBase::Panorama::addImage(), HuginBase::CalculateOptimalScale::calcOptimalPanoScale(), deregisterPTWXDlgFcn(), PerspectiveImageCtrl::GetControlPoints(), HuginBase::Panorama::getCtrlPoints(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::CalculateOptimalROI::getResultOptimalROI(), HuginBase::CalculateOptimalROIOutside::getResultOptimalROI(), GetRoll(), HuginBase::PanoramaOptions::getWidth(), HuginBase::PanoramaAlgorithm::hasRunSuccessfully(), 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(), and HuginBase::PanoramaOptions::setWidth().
Referenced by OnFindLines(), OnPreview(), OnSaveOutput(), and OnSavePTO().
|
private |
return the roll angle in degree
Definition at line 698 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 673 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 533 of file PerspectivePanel.cpp.
References m_modeChoice.
Referenced by OnModeChanged().
|
protected |
Definition at line 336 of file PerspectivePanel.cpp.
References m_preview, and PerspectiveImageCtrl::SetLineColour().
Referenced by Create().
|
protected |
Definition at line 342 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::IsOriginalShown(), m_preview, and OnPreview().
Referenced by Create().
|
protected |
Definition at line 380 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::AddLines(), PerspectiveImageCtrl::getCachedImage(), HuginLines::GetLines(), GetPanorama(), m_preview, m_previewChoice, and OnPreview().
Referenced by Create().
|
protected |
Definition at line 287 of file PerspectivePanel.cpp.
References GetFileDialogImageFilters(), and SetImage().
Referenced by Create().
|
protected |
Definition at line 361 of file PerspectivePanel.cpp.
References GetStatusString(), PerspectiveImageCtrl::IsOriginalShown(), m_findLineButton, m_helpTextCtrl, m_modeChoice, m_preview, m_previewChoice, OnPreview(), and PerspectiveImageCtrl::SetRectMode().
Referenced by Create().
|
protected |
Definition at line 196 of file PerspectivePanel.cpp.
References GetPanorama(), m_preview, m_previewChoice, m_zoomChoice, PerspectiveImageCtrl::setOriginalMode(), and PerspectiveImageCtrl::SetRemappedMode().
Referenced by Create(), OnCropChanged(), OnFindLines(), OnModeChanged(), OnRotationChanged(), and SetImage().
void PerspectivePanel::OnProcessFinished | ( | wxCommandEvent & | e | ) |
clean up temporary files at end
Definition at line 516 of file PerspectivePanel.cpp.
References m_outputButton, and m_tempFiles.
Referenced by ToolboxFrame::OnQueueProgress().
|
protected |
Definition at line 351 of file PerspectivePanel.cpp.
References PerspectiveImageCtrl::ChangeRotation(), GetRotation(), PerspectiveImageCtrl::IsOriginalShown(), m_preview, and OnPreview().
Referenced by Create().
|
protected |
Definition at line 433 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, HuginBase::Panorama::WritePTOFile(), and HuginQueue::wxEscapeFilename().
Referenced by Create().
|
protected |
Definition at line 399 of file PerspectivePanel.cpp.
References GetPanorama(), hugin_utils::getPathPrefix(), HUGIN_CONV_FILENAME, m_preview, and HuginBase::Panorama::WritePTOFile().
Referenced by Create().
|
protected |
Definition at line 154 of file PerspectivePanel.cpp.
Referenced by Create().
|
protected |
Definition at line 162 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 545 of file PerspectivePanel.cpp.
References HuginBase::SrcPanoImage::calcHFOV(), m_cropTextCtrl, m_focallengthTextCtrl, m_srcImage, and hugin_utils::str2double().
Referenced by GetPanorama().
void PerspectivePanel::SetImage | ( | const wxString & | filename | ) |
load the given image
Definition at line 226 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, and PerspectiveImageCtrl::setImage().
Referenced by PerspectiveDropTarget::OnDropFiles(), and OnLoadImage().
|
private |
Definition at line 81 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().
|
private |
Definition at line 82 of file PerspectivePanel.h.
Referenced by Create(), and OnModeChanged().
|
private |
Definition at line 80 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().
|
private |
Definition at line 79 of file PerspectivePanel.h.
Referenced by Create(), GetStatusString(), and OnModeChanged().
|
private |
Definition at line 83 of file PerspectivePanel.h.
Referenced by Create(), OnProcessFinished(), and OnSaveOutput().
|
private |
controls
Definition at line 75 of file PerspectivePanel.h.
Referenced by Create(), GetPanorama(), OnColourChanged(), OnCropChanged(), OnFindLines(), OnModeChanged(), OnPreview(), OnRotationChanged(), OnSavePTO(), OnZoom(), and SetImage().
|
private |
Definition at line 76 of file PerspectivePanel.h.
Referenced by Create(), OnFindLines(), OnModeChanged(), OnPreview(), and SetImage().
|
private |
Definition at line 78 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(), 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().
|
private |
Definition at line 77 of file PerspectivePanel.h.
Referenced by Create(), and OnPreview().