Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PanoPanel Class Reference

Define the pano edit panel. More...

#include <PanoPanel.h>

Inheritance diagram for PanoPanel:
Inheritance graph

Public Member Functions

 PanoPanel ()
 
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
 
void Init (HuginBase::Panorama *pano)
 
virtual ~PanoPanel (void)
 
virtual void panoramaChanged (HuginBase::Panorama &pano)
 this is called whenever the panorama has changed.
 
virtual void panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
 notifies about changes to images
 
void DoStitch (const wxString &userDefinedSetting=wxEmptyString, const bool readSetting=true)
 stitching using hugin_stitch_project
 
void DoSendToBatch (const wxString &userDefinedSetting=wxEmptyString)
 stitching with PTBatcherGUI
 
void DoUserDefinedStitch (const wxString &settings=wxString())
 stitching with user defined file
 
void DoStitchOrSendBatch (const wxString &userDefinedSetting=wxEmptyString)
 general stitching command, selects PTBatcherGUI or hugin_stitch_project depending on the settings in preferences
 
void SetGuiLevel (GuiLevel newGuiLevel)
 
wxButtonGetStitchButton () const
 
- Public Member Functions inherited from HuginBase::PanoramaObserver
virtual ~PanoramaObserver ()
 

Private Types

enum  StitchingEngine { NONA =0 , PTSTITCHER }
 the supported stitching engines More...
 
enum  StitchingPresets {
  PROFILE_CUSTOM =0 , PROFILE_JPEG =0 , PROFILE_DRAFT_JPEG , PROFILE_TIFF ,
  PROFILE_LAYER_TIFF , PROFILE_LAYER_PSD
}
 the supported defaults More...
 

Private Member Functions

bool StackCheck (HuginBase::Panorama &pano)
 
void UpdateDisplay (const HuginBase::PanoramaOptions &opt, const bool hasStacks)
 
void SetStitcher (HuginBase::PanoramaOptions::Remapper stitcher)
 
void QuickModeChanged (wxCommandEvent &e)
 
void ApplyQuickMode (int preset)
 
void HFOVChanged (wxCommandEvent &e)
 
void HFOVChangedSpin (wxSpinEvent &e)
 
void VFOVChanged (wxCommandEvent &e)
 
void VFOVChangedSpin (wxSpinEvent &e)
 
void ProjectionChanged (wxCommandEvent &e)
 
void OnOutputFilesChanged (wxCommandEvent &e)
 
void RemapperChanged (wxCommandEvent &e)
 
void OnRemapperOptions (wxCommandEvent &e)
 
void FusionChanged (wxCommandEvent &e)
 
void OnFusionOptions (wxCommandEvent &e)
 
void HDRMergeChanged (wxCommandEvent &e)
 
void OnHDRMergeOptions (wxCommandEvent &e)
 
void BlenderChanged (wxCommandEvent &e)
 
void OnBlenderOptions (wxCommandEvent &e)
 
void OnEdgeFillChanged (wxCommandEvent &e)
 
void OnEdgeFillOptions (wxCommandEvent &e)
 
void FileFormatChanged (wxCommandEvent &e)
 
void HDRFileFormatChanged (wxCommandEvent &e)
 
void OnJPEGQualityText (wxCommandEvent &e)
 
void OnNormalTIFFCompression (wxCommandEvent &e)
 
void OnHDRTIFFCompression (wxCommandEvent &e)
 
void OnHDRFileFormatOpts (wxCommandEvent &e)
 
void WidthChanged (wxCommandEvent &e)
 
void HeightChanged (wxCommandEvent &e)
 
void ROIChanged (wxCommandEvent &e)
 
void DoCalcFOV (wxCommandEvent &e)
 
void OnDoStitch (wxCommandEvent &e)
 
void DoCalcOptimalWidth (wxCommandEvent &e)
 set the highest sensible width
 
void DoCalcOptimalROI (wxCommandEvent &e)
 set the largest rectangle for crop ROI
 
void EnableControls (bool enable)
 enable/disable control influenced by quick mode
 
bool CheckGoodSize ()
 Check the canvas size isn't overly huge, or the user knows what they are doing.
 
bool CheckHasImages ()
 check if the output contains images at all
 
bool CheckFreeSpace (const wxString &folder)
 check if there is enough free disk space
 

Private Attributes

HuginBase::Panoramapano
 
GuiLevel m_guiLevel
 
bool updatesDisabled
 
HuginBase::PanoramaOptions m_oldOpt
 
double m_oldVFOV
 
bool m_keepViewOnResize
 
bool m_hasStacks
 
wxChoicem_ProjectionChoice
 
wxTextCtrl * m_HFOVText
 
wxTextCtrl * m_VFOVText
 
wxTextCtrl * m_WidthTxt
 
wxTextCtrl * m_HeightTxt
 
wxTextCtrl * m_ROILeftTxt
 
wxTextCtrl * m_ROIRightTxt
 
wxTextCtrl * m_ROITopTxt
 
wxTextCtrl * m_ROIBottomTxt
 
wxChoicem_RemapperChoice
 
wxChoicem_FusionChoice
 
wxChoicem_HDRMergeChoice
 
wxChoicem_BlenderChoice
 
wxChoicem_edgeFillChoice
 
wxButtonm_StitchButton
 
wxButtonm_CalcHFOVButton
 
wxButtonm_CalcOptWidthButton
 
wxButtonm_CalcOptROIButton
 
wxChoicem_FileFormatChoice
 
wxStaticTextm_FileFormatOptionsLabel
 
wxTextCtrl * m_FileFormatJPEGQualityText
 
wxChoicem_FileFormatTIFFCompChoice
 
wxChoicem_HDRFileFormatChoice
 
wxStaticTextm_HDRFileFormatLabelTIFFCompression
 
wxChoicem_FileFormatHDRTIFFCompChoice
 
wxScrolledWindow * m_pano_ctrls
 

Detailed Description

Define the pano edit panel.

Definition at line 43 of file PanoPanel.h.

Member Enumeration Documentation

◆ StitchingEngine

the supported stitching engines

Enumerator
NONA 
PTSTITCHER 

Definition at line 90 of file PanoPanel.h.

◆ StitchingPresets

the supported defaults

Enumerator
PROFILE_CUSTOM 
PROFILE_JPEG 
PROFILE_DRAFT_JPEG 
PROFILE_TIFF 
PROFILE_LAYER_TIFF 
PROFILE_LAYER_PSD 

Definition at line 93 of file PanoPanel.h.

Constructor & Destructor Documentation

◆ PanoPanel()

PanoPanel::PanoPanel ( )

Definition at line 66 of file PanoPanel.cpp.

◆ ~PanoPanel()

PanoPanel::~PanoPanel ( void  )
virtual

Member Function Documentation

◆ ApplyQuickMode()

void PanoPanel::ApplyQuickMode ( int  preset)
private

◆ BlenderChanged()

void PanoPanel::BlenderChanged ( wxCommandEvent &  e)
private

◆ CheckFreeSpace()

bool PanoPanel::CheckFreeSpace ( const wxString folder)
private

check if there is enough free disk space

Definition at line 1630 of file PanoPanel.cpp.

References MainFrame::Get(), hugin_utils::GetMessageDialog(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getROI(), pano, and threshold().

Referenced by DoSendToBatch(), and DoStitch().

◆ CheckGoodSize()

bool PanoPanel::CheckGoodSize ( )
private

Check the canvas size isn't overly huge, or the user knows what they are doing.

The canvas size can become too big if, for example, the field of view is more than 180 degrees, then you select rectilinear proection, then press "Calculate optimal size", or stitch a wide stereographic image using the assistant tab. If the canvas size is unreasonable, this function will display a warning. The user has the option to continue.

Returns
true if the canvas size is reasonable, or the user presses "continue anyway" on the warning, false if the stitch should be aborted

Definition at line 1559 of file PanoPanel.cpp.

References MainFrame::Get(), hugin_utils::GetMessageDialog(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getROI(), hugin_utils::HuginMessageBox(), HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputLDRBlended, HuginBase::PanoramaOptions::outputLDRExposureBlended, HuginBase::PanoramaOptions::outputLDRExposureLayersFused, pano, and threshold().

Referenced by DoSendToBatch(), DoStitch(), and DoUserDefinedStitch().

◆ CheckHasImages()

bool PanoPanel::CheckHasImages ( )
private

check if the output contains images at all

Definition at line 1619 of file PanoPanel.cpp.

References HuginBase::Panorama::getActiveImages(), hugin_utils::HuginMessageBox(), pano, and threshold().

Referenced by DoSendToBatch(), DoStitch(), and DoUserDefinedStitch().

◆ Create()

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

◆ DoCalcFOV()

void PanoPanel::DoCalcFOV ( wxCommandEvent &  e)
private

◆ DoCalcOptimalROI()

void PanoPanel::DoCalcOptimalROI ( wxCommandEvent &  e)
private

◆ DoCalcOptimalWidth()

void PanoPanel::DoCalcOptimalWidth ( wxCommandEvent &  e)
private

◆ DoSendToBatch()

void PanoPanel::DoSendToBatch ( const wxString userDefinedSetting = wxEmptyString)

◆ DoStitch()

void PanoPanel::DoStitch ( const wxString userDefinedSetting = wxEmptyString,
const bool  readSetting = true 
)

◆ DoStitchOrSendBatch()

void PanoPanel::DoStitchOrSendBatch ( const wxString userDefinedSetting = wxEmptyString)

general stitching command, selects PTBatcherGUI or hugin_stitch_project depending on the settings in preferences

Definition at line 1378 of file PanoPanel.cpp.

References DoSendToBatch(), DoStitch(), HUGIN_PROCESSOR_GUI, and threshold().

Referenced by DoUserDefinedStitch(), and OnDoStitch().

◆ DoUserDefinedStitch()

void PanoPanel::DoUserDefinedStitch ( const wxString settings = wxString())

◆ EnableControls()

void PanoPanel::EnableControls ( bool  enable)
private

enable/disable control influenced by quick mode

Definition at line 797 of file PanoPanel.cpp.

References m_BlenderChoice, m_RemapperChoice, m_WidthTxt, and threshold().

◆ FileFormatChanged()

void PanoPanel::FileFormatChanged ( wxCommandEvent &  e)
private

◆ FusionChanged()

void PanoPanel::FusionChanged ( wxCommandEvent &  e)
private

Definition at line 949 of file PanoPanel.cpp.

References DEBUG_DEBUG, m_FusionChoice, and threshold().

Referenced by Create().

◆ GetStitchButton()

wxButton * PanoPanel::GetStitchButton ( ) const
inline

Definition at line 85 of file PanoPanel.h.

References m_StitchButton.

Referenced by MainFrame::OnDoStitch().

◆ HDRFileFormatChanged()

void PanoPanel::HDRFileFormatChanged ( wxCommandEvent &  e)
private

◆ HDRMergeChanged()

void PanoPanel::HDRMergeChanged ( wxCommandEvent &  e)
private

Definition at line 974 of file PanoPanel.cpp.

References DEBUG_DEBUG, m_HDRMergeChoice, and threshold().

Referenced by Create().

◆ HeightChanged()

void PanoPanel::HeightChanged ( wxCommandEvent &  e)
private

◆ HFOVChanged()

void PanoPanel::HFOVChanged ( wxCommandEvent &  e)
private

◆ HFOVChangedSpin()

void PanoPanel::HFOVChangedSpin ( wxSpinEvent e)
private

◆ Init()

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

Definition at line 250 of file PanoPanel.cpp.

References HuginBase::Panorama::addObserver(), pano, panoramaChanged(), and threshold().

Referenced by MainFrame::MainFrame().

◆ OnBlenderOptions()

void PanoPanel::OnBlenderOptions ( wxCommandEvent &  e)
private

◆ OnDoStitch()

void PanoPanel::OnDoStitch ( wxCommandEvent &  e)
private

Definition at line 1408 of file PanoPanel.cpp.

References DoStitchOrSendBatch().

Referenced by Create().

◆ OnEdgeFillChanged()

void PanoPanel::OnEdgeFillChanged ( wxCommandEvent &  e)
private

◆ OnEdgeFillOptions()

void PanoPanel::OnEdgeFillOptions ( wxCommandEvent &  e)
private

◆ OnFusionOptions()

void PanoPanel::OnFusionOptions ( wxCommandEvent &  e)
private

◆ OnHDRFileFormatOpts()

void PanoPanel::OnHDRFileFormatOpts ( wxCommandEvent &  e)
private

◆ OnHDRMergeOptions()

void PanoPanel::OnHDRMergeOptions ( wxCommandEvent &  e)
private

◆ OnHDRTIFFCompression()

void PanoPanel::OnHDRTIFFCompression ( wxCommandEvent &  e)
private

◆ OnJPEGQualityText()

void PanoPanel::OnJPEGQualityText ( wxCommandEvent &  e)
private

◆ OnNormalTIFFCompression()

void PanoPanel::OnNormalTIFFCompression ( wxCommandEvent &  e)
private

◆ OnOutputFilesChanged()

void PanoPanel::OnOutputFilesChanged ( wxCommandEvent &  e)
private

◆ OnRemapperOptions()

void PanoPanel::OnRemapperOptions ( wxCommandEvent &  e)
private

◆ panoramaChanged()

void PanoPanel::panoramaChanged ( HuginBase::Panorama pano)
virtual

this is called whenever the panorama has changed.

This function must now update all the gui representations of the panorama to display the new state.

Functions that change the panororama must not update the GUI directly. The GUI should always be updated to reflect the current panorama state in this function.

This avoids unnessecary close coupling between the controller and the view (even if they sometimes are in the same object). See model view controller pattern.

Todo:
react on different update signals more special

Implements HuginBase::PanoramaObserver.

Definition at line 278 of file PanoPanel.cpp.

References DEBUG_TRACE, HuginBase::Panorama::getOptions(), m_oldOpt, pano, StackCheck(), threshold(), and UpdateDisplay().

Referenced by Init(), and MainFrame::MainFrame().

◆ panoramaImagesChanged()

virtual void PanoPanel::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet changed 
)
inlinevirtual

notifies about changes to images

Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.

Parameters
panothe panorama object that changed
changedset of changed images

Implements HuginBase::PanoramaObserver.

Definition at line 72 of file PanoPanel.h.

◆ ProjectionChanged()

void PanoPanel::ProjectionChanged ( wxCommandEvent &  e)
private

◆ QuickModeChanged()

void PanoPanel::QuickModeChanged ( wxCommandEvent &  e)
private

◆ RemapperChanged()

void PanoPanel::RemapperChanged ( wxCommandEvent &  e)
private

◆ ROIChanged()

void PanoPanel::ROIChanged ( wxCommandEvent &  e)
private

◆ SetGuiLevel()

void PanoPanel::SetGuiLevel ( GuiLevel  newGuiLevel)

Definition at line 1657 of file PanoPanel.cpp.

References m_guiLevel, m_oldOpt, threshold(), and UpdateDisplay().

Referenced by MainFrame::SetGuiLevel().

◆ SetStitcher()

void PanoPanel::SetStitcher ( HuginBase::PanoramaOptions::Remapper  stitcher)
private

◆ StackCheck()

bool PanoPanel::StackCheck ( HuginBase::Panorama pano)
private

◆ UpdateDisplay()

void PanoPanel::UpdateDisplay ( const HuginBase::PanoramaOptions opt,
const bool  hasStacks 
)
private

◆ VFOVChanged()

void PanoPanel::VFOVChanged ( wxCommandEvent &  e)
private

◆ VFOVChangedSpin()

void PanoPanel::VFOVChangedSpin ( wxSpinEvent e)
private

◆ WidthChanged()

void PanoPanel::WidthChanged ( wxCommandEvent &  e)
private

Member Data Documentation

◆ m_BlenderChoice

wxChoice* PanoPanel::m_BlenderChoice
private

Definition at line 204 of file PanoPanel.h.

Referenced by BlenderChanged(), Create(), EnableControls(), and UpdateDisplay().

◆ m_CalcHFOVButton

wxButton* PanoPanel::m_CalcHFOVButton
private

Definition at line 207 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_CalcOptROIButton

wxButton* PanoPanel::m_CalcOptROIButton
private

Definition at line 209 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_CalcOptWidthButton

wxButton* PanoPanel::m_CalcOptWidthButton
private

Definition at line 208 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_edgeFillChoice

wxChoice* PanoPanel::m_edgeFillChoice
private

Definition at line 205 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_FileFormatChoice

wxChoice* PanoPanel::m_FileFormatChoice
private

Definition at line 211 of file PanoPanel.h.

Referenced by Create(), FileFormatChanged(), and UpdateDisplay().

◆ m_FileFormatHDRTIFFCompChoice

wxChoice* PanoPanel::m_FileFormatHDRTIFFCompChoice
private

Definition at line 218 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_FileFormatJPEGQualityText

wxTextCtrl* PanoPanel::m_FileFormatJPEGQualityText
private

Definition at line 213 of file PanoPanel.h.

Referenced by Create(), OnJPEGQualityText(), UpdateDisplay(), and ~PanoPanel().

◆ m_FileFormatOptionsLabel

wxStaticText* PanoPanel::m_FileFormatOptionsLabel
private

Definition at line 212 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_FileFormatTIFFCompChoice

wxChoice* PanoPanel::m_FileFormatTIFFCompChoice
private

Definition at line 214 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_FusionChoice

wxChoice* PanoPanel::m_FusionChoice
private

Definition at line 202 of file PanoPanel.h.

Referenced by Create(), FusionChanged(), and UpdateDisplay().

◆ m_guiLevel

GuiLevel PanoPanel::m_guiLevel
private

Definition at line 178 of file PanoPanel.h.

Referenced by SetGuiLevel(), and UpdateDisplay().

◆ m_hasStacks

bool PanoPanel::m_hasStacks
private

Definition at line 188 of file PanoPanel.h.

Referenced by Create(), and StackCheck().

◆ m_HDRFileFormatChoice

wxChoice* PanoPanel::m_HDRFileFormatChoice
private

Definition at line 216 of file PanoPanel.h.

Referenced by Create(), HDRFileFormatChanged(), and UpdateDisplay().

◆ m_HDRFileFormatLabelTIFFCompression

wxStaticText* PanoPanel::m_HDRFileFormatLabelTIFFCompression
private

Definition at line 217 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_HDRMergeChoice

wxChoice* PanoPanel::m_HDRMergeChoice
private

Definition at line 203 of file PanoPanel.h.

Referenced by Create(), HDRMergeChanged(), and UpdateDisplay().

◆ m_HeightTxt

wxTextCtrl* PanoPanel::m_HeightTxt
private

Definition at line 196 of file PanoPanel.h.

Referenced by Create(), HeightChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_HFOVText

wxTextCtrl* PanoPanel::m_HFOVText
private

Definition at line 192 of file PanoPanel.h.

Referenced by Create(), HFOVChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_keepViewOnResize

bool PanoPanel::m_keepViewOnResize
private

Definition at line 187 of file PanoPanel.h.

Referenced by Create(), UpdateDisplay(), and WidthChanged().

◆ m_oldOpt

HuginBase::PanoramaOptions PanoPanel::m_oldOpt
private

Definition at line 184 of file PanoPanel.h.

Referenced by panoramaChanged(), and SetGuiLevel().

◆ m_oldVFOV

double PanoPanel::m_oldVFOV
private

Definition at line 185 of file PanoPanel.h.

◆ m_pano_ctrls

wxScrolledWindow* PanoPanel::m_pano_ctrls
private

Definition at line 220 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

◆ m_ProjectionChoice

wxChoice* PanoPanel::m_ProjectionChoice
private

Definition at line 191 of file PanoPanel.h.

Referenced by Create(), ProjectionChanged(), and UpdateDisplay().

◆ m_RemapperChoice

wxChoice* PanoPanel::m_RemapperChoice
private

Definition at line 201 of file PanoPanel.h.

Referenced by Create(), EnableControls(), RemapperChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_ROIBottomTxt

wxTextCtrl* PanoPanel::m_ROIBottomTxt
private

Definition at line 200 of file PanoPanel.h.

Referenced by Create(), ROIChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_ROILeftTxt

wxTextCtrl* PanoPanel::m_ROILeftTxt
private

Definition at line 197 of file PanoPanel.h.

Referenced by Create(), ROIChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_ROIRightTxt

wxTextCtrl* PanoPanel::m_ROIRightTxt
private

Definition at line 198 of file PanoPanel.h.

Referenced by Create(), ROIChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_ROITopTxt

wxTextCtrl* PanoPanel::m_ROITopTxt
private

Definition at line 199 of file PanoPanel.h.

Referenced by Create(), ROIChanged(), UpdateDisplay(), and ~PanoPanel().

◆ m_StitchButton

wxButton* PanoPanel::m_StitchButton
private

Definition at line 206 of file PanoPanel.h.

Referenced by Create(), GetStitchButton(), and UpdateDisplay().

◆ m_VFOVText

wxTextCtrl* PanoPanel::m_VFOVText
private

Definition at line 193 of file PanoPanel.h.

Referenced by Create(), UpdateDisplay(), VFOVChanged(), and ~PanoPanel().

◆ m_WidthTxt

wxTextCtrl* PanoPanel::m_WidthTxt
private

Definition at line 195 of file PanoPanel.h.

Referenced by Create(), EnableControls(), UpdateDisplay(), WidthChanged(), and ~PanoPanel().

◆ pano

HuginBase::Panorama* PanoPanel::pano
private

◆ updatesDisabled

bool PanoPanel::updatesDisabled
private

The documentation for this class was generated from the following files: