Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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=wxT("panel"))
 
void Init (HuginBase::Panorama *pano)
 
virtual ~PanoPanel (void)
 
virtual void panoramaChanged (HuginBase::Panorama &pano)
 this is called whenever the panorama has changed. More...
 
virtual void panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
 notifies about changes to images More...
 
void DoStitch (const wxString &userDefinedSetting=wxEmptyString)
 stitching using hugin_stitch_project More...
 
void DoSendToBatch (const wxString &userDefinedSetting=wxEmptyString)
 stitching with PTBatcherGUI More...
 
void DoUserDefinedStitch (const wxString &settings=wxString())
 stitching with user defined file More...
 
void DoStitchOrSendBatch (const wxString &userDefinedSetting=wxEmptyString)
 general stitching command, selects PTBatcherGUI or hugin_stitch_project depending on the settings in preferences More...
 
void SetGuiLevel (GuiLevel newGuiLevel)
 
- 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 More...
 
void DoCalcOptimalROI (wxCommandEvent &e)
 set the largest rectangle for crop ROI More...
 
void EnableControls (bool enable)
 enable/disable control influenced by quick mode More...
 
bool CheckGoodSize ()
 Check the canvas size isn't overly huge, or the user knows what they are doing. More...
 
bool CheckHasImages ()
 check if the output contains images at all More...
 
bool CheckFreeSpace (const wxString &folder)
 check if there is enough free disk space More...
 

Private Attributes

HuginBase::Panoramapano
 
GuiLevel m_guiLevel
 
bool updatesDisabled
 
HuginBase::PanoramaOptions m_oldOpt
 
double m_oldVFOV
 
bool m_keepViewOnResize
 
bool m_hasStacks
 
wxChoice * m_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
 
wxChoice * m_RemapperChoice
 
wxChoice * m_FusionChoice
 
wxChoice * m_HDRMergeChoice
 
wxChoice * m_BlenderChoice
 
wxChoice * m_edgeFillChoice
 
wxButton * m_StitchButton
 
wxButton * m_CalcHFOVButton
 
wxButton * m_CalcOptWidthButton
 
wxButton * m_CalcOptROIButton
 
wxChoice * m_FileFormatChoice
 
wxStaticText * m_FileFormatOptionsLabel
 
wxTextCtrl * m_FileFormatJPEGQualityText
 
wxChoice * m_FileFormatTIFFCompChoice
 
wxChoice * m_HDRFileFormatChoice
 
wxStaticText * m_HDRFileFormatLabelTIFFCompression
 
wxChoice * m_FileFormatHDRTIFFCompChoice
 
wxScrolledWindow * m_pano_ctrls
 

Detailed Description

Define the pano edit panel.

Definition at line 43 of file PanoPanel.h.

Member Enumeration Documentation

the supported stitching engines

Enumerator
NONA 
PTSTITCHER 

Definition at line 89 of file PanoPanel.h.

the supported defaults

Enumerator
PROFILE_CUSTOM 
PROFILE_JPEG 
PROFILE_DRAFT_JPEG 
PROFILE_TIFF 
PROFILE_LAYER_TIFF 
PROFILE_LAYER_PSD 

Definition at line 92 of file PanoPanel.h.

Constructor & Destructor Documentation

PanoPanel::PanoPanel ( )

Definition at line 117 of file PanoPanel.cpp.

PanoPanel::~PanoPanel ( void  )
virtual

Member Function Documentation

void PanoPanel::ApplyQuickMode ( int  preset)
private
void PanoPanel::BlenderChanged ( wxCommandEvent &  e)
private
bool PanoPanel::CheckFreeSpace ( const wxString &  folder)
private

check if there is enough free disk space

Definition at line 1663 of file PanoPanel.cpp.

References MainFrame::Get(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getROI(), pano, and MainFrame::ShowStitcherTab().

Referenced by DoSendToBatch(), and DoStitch().

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 1576 of file PanoPanel.cpp.

References MainFrame::Get(), HuginBase::Panorama::getOptions(), pano, and MainFrame::ShowStitcherTab().

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

bool PanoPanel::CheckHasImages ( )
private

check if the output contains images at all

Definition at line 1647 of file PanoPanel.cpp.

References HuginBase::Panorama::getActiveImages(), HuginBase::getImagesinROI(), and pano.

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

bool PanoPanel::Create ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel") 
)
void PanoPanel::DoCalcFOV ( wxCommandEvent &  e)
private
void PanoPanel::DoCalcOptimalROI ( wxCommandEvent &  e)
private
void PanoPanel::DoCalcOptimalWidth ( wxCommandEvent &  e)
private
void PanoPanel::DoSendToBatch ( const wxString &  userDefinedSetting = wxEmptyString)
void PanoPanel::DoStitch ( const wxString &  userDefinedSetting = wxEmptyString)
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 1397 of file PanoPanel.cpp.

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

Referenced by DoUserDefinedStitch(), and OnDoStitch().

void PanoPanel::DoUserDefinedStitch ( const wxString &  settings = wxString())
void PanoPanel::EnableControls ( bool  enable)
private

enable/disable control influenced by quick mode

Definition at line 807 of file PanoPanel.cpp.

References m_BlenderChoice, m_RemapperChoice, and m_WidthTxt.

void PanoPanel::FileFormatChanged ( wxCommandEvent &  e)
private
void PanoPanel::FusionChanged ( wxCommandEvent &  e)
private

Definition at line 959 of file PanoPanel.cpp.

References DEBUG_DEBUG, and m_FusionChoice.

void PanoPanel::HDRFileFormatChanged ( wxCommandEvent &  e)
private
void PanoPanel::HDRMergeChanged ( wxCommandEvent &  e)
private

Definition at line 984 of file PanoPanel.cpp.

References DEBUG_DEBUG, and m_HDRMergeChoice.

void PanoPanel::HeightChanged ( wxCommandEvent &  e)
private
void PanoPanel::HFOVChanged ( wxCommandEvent &  e)
private
void PanoPanel::HFOVChangedSpin ( wxSpinEvent &  e)
private
void PanoPanel::Init ( HuginBase::Panorama pano)

Definition at line 267 of file PanoPanel.cpp.

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

Referenced by MainFrame::MainFrame().

void PanoPanel::OnBlenderOptions ( wxCommandEvent &  e)
private
void PanoPanel::OnDoStitch ( wxCommandEvent &  e)
private

Definition at line 1425 of file PanoPanel.cpp.

References DoStitchOrSendBatch().

void PanoPanel::OnEdgeFillChanged ( wxCommandEvent &  e)
private
void PanoPanel::OnEdgeFillOptions ( wxCommandEvent &  e)
private
void PanoPanel::OnFusionOptions ( wxCommandEvent &  e)
private
void PanoPanel::OnHDRFileFormatOpts ( wxCommandEvent &  e)
private
void PanoPanel::OnHDRMergeOptions ( wxCommandEvent &  e)
private
void PanoPanel::OnHDRTIFFCompression ( wxCommandEvent &  e)
private
void PanoPanel::OnJPEGQualityText ( wxCommandEvent &  e)
private
void PanoPanel::OnNormalTIFFCompression ( wxCommandEvent &  e)
private
void PanoPanel::OnOutputFilesChanged ( wxCommandEvent &  e)
private
void PanoPanel::OnRemapperOptions ( wxCommandEvent &  e)
private
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 295 of file PanoPanel.cpp.

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

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

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.

void PanoPanel::ProjectionChanged ( wxCommandEvent &  e)
private
void PanoPanel::QuickModeChanged ( wxCommandEvent &  e)
private
void PanoPanel::RemapperChanged ( wxCommandEvent &  e)
private
void PanoPanel::ROIChanged ( wxCommandEvent &  e)
private
void PanoPanel::SetGuiLevel ( GuiLevel  newGuiLevel)

Definition at line 1696 of file PanoPanel.cpp.

References m_guiLevel, m_oldOpt, and UpdateDisplay().

Referenced by MainFrame::SetGuiLevel().

void PanoPanel::SetStitcher ( HuginBase::PanoramaOptions::Remapper  stitcher)
private
bool PanoPanel::StackCheck ( HuginBase::Panorama pano)
private
void PanoPanel::UpdateDisplay ( const HuginBase::PanoramaOptions opt,
const bool  hasStacks 
)
private
Todo:
Is this right? I don't see a 4th item in the combo box, and exr is a confusing LDR format.

Definition at line 364 of file PanoPanel.cpp.

References HuginBase::PanoramaOptions::blendMode, hugin_utils::doubleToString(), HuginBase::PanoramaOptions::edgeFillMode, hugin_utils::floori(), HuginBase::PanoramaOptions::fovCalcSupported(), hugin_utils::gcd(), HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getROI(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::PanoramaOptions::getWidth(), GUI_SIMPLE, m_BlenderChoice, m_CalcHFOVButton, m_CalcOptROIButton, m_CalcOptWidthButton, m_edgeFillChoice, m_FileFormatChoice, m_FileFormatHDRTIFFCompChoice, m_FileFormatJPEGQualityText, m_FileFormatOptionsLabel, m_FileFormatTIFFCompChoice, m_FusionChoice, m_guiLevel, m_HDRFileFormatChoice, m_HDRFileFormatLabelTIFFCompression, m_HDRMergeChoice, m_HeightTxt, m_HFOVText, m_keepViewOnResize, m_pano_ctrls, m_ProjectionChoice, m_RemapperChoice, m_ROIBottomTxt, m_ROILeftTxt, m_ROIRightTxt, m_ROITopTxt, m_StitchButton, m_VFOVText, m_WidthTxt, celeste::max(), HuginBase::PanoramaOptions::outputHDRBlended, HuginBase::PanoramaOptions::outputHDRLayers, HuginBase::PanoramaOptions::outputHDRStacks, HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeCompression, HuginBase::PanoramaOptions::outputImageTypeHDR, HuginBase::PanoramaOptions::outputImageTypeHDRCompression, HuginBase::PanoramaOptions::outputLDRBlended, HuginBase::PanoramaOptions::outputLDRExposureBlended, HuginBase::PanoramaOptions::outputLDRExposureLayers, HuginBase::PanoramaOptions::outputLDRExposureLayersFused, HuginBase::PanoramaOptions::outputLDRExposureRemapped, HuginBase::PanoramaOptions::outputLDRLayers, HuginBase::PanoramaOptions::outputLDRStacks, pano, vigra_ext::pow(), HuginBase::PanoramaOptions::quality, and SelectListValue().

Referenced by panoramaChanged(), ROIChanged(), and SetGuiLevel().

void PanoPanel::VFOVChanged ( wxCommandEvent &  e)
private
void PanoPanel::VFOVChangedSpin ( wxSpinEvent &  e)
private
void PanoPanel::WidthChanged ( wxCommandEvent &  e)
private

Member Data Documentation

wxChoice* PanoPanel::m_BlenderChoice
private

Definition at line 203 of file PanoPanel.h.

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

wxButton* PanoPanel::m_CalcHFOVButton
private

Definition at line 206 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxButton* PanoPanel::m_CalcOptROIButton
private

Definition at line 208 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxButton* PanoPanel::m_CalcOptWidthButton
private

Definition at line 207 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_edgeFillChoice
private

Definition at line 204 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_FileFormatChoice
private

Definition at line 210 of file PanoPanel.h.

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

wxChoice* PanoPanel::m_FileFormatHDRTIFFCompChoice
private

Definition at line 217 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxTextCtrl* PanoPanel::m_FileFormatJPEGQualityText
private

Definition at line 212 of file PanoPanel.h.

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

wxStaticText* PanoPanel::m_FileFormatOptionsLabel
private

Definition at line 211 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_FileFormatTIFFCompChoice
private

Definition at line 213 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_FusionChoice
private

Definition at line 201 of file PanoPanel.h.

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

GuiLevel PanoPanel::m_guiLevel
private

Definition at line 177 of file PanoPanel.h.

Referenced by SetGuiLevel(), and UpdateDisplay().

bool PanoPanel::m_hasStacks
private

Definition at line 187 of file PanoPanel.h.

Referenced by Create(), and StackCheck().

wxChoice* PanoPanel::m_HDRFileFormatChoice
private

Definition at line 215 of file PanoPanel.h.

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

wxStaticText* PanoPanel::m_HDRFileFormatLabelTIFFCompression
private

Definition at line 216 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_HDRMergeChoice
private

Definition at line 202 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_HeightTxt
private

Definition at line 195 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_HFOVText
private

Definition at line 191 of file PanoPanel.h.

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

bool PanoPanel::m_keepViewOnResize
private

Definition at line 186 of file PanoPanel.h.

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

HuginBase::PanoramaOptions PanoPanel::m_oldOpt
private

Definition at line 183 of file PanoPanel.h.

Referenced by panoramaChanged(), and SetGuiLevel().

double PanoPanel::m_oldVFOV
private

Definition at line 184 of file PanoPanel.h.

wxScrolledWindow* PanoPanel::m_pano_ctrls
private

Definition at line 219 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxChoice* PanoPanel::m_ProjectionChoice
private

Definition at line 190 of file PanoPanel.h.

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

wxChoice* PanoPanel::m_RemapperChoice
private

Definition at line 200 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_ROIBottomTxt
private

Definition at line 199 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_ROILeftTxt
private

Definition at line 196 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_ROIRightTxt
private

Definition at line 197 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_ROITopTxt
private

Definition at line 198 of file PanoPanel.h.

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

wxButton* PanoPanel::m_StitchButton
private

Definition at line 205 of file PanoPanel.h.

Referenced by Create(), and UpdateDisplay().

wxTextCtrl* PanoPanel::m_VFOVText
private

Definition at line 192 of file PanoPanel.h.

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

wxTextCtrl* PanoPanel::m_WidthTxt
private

Definition at line 194 of file PanoPanel.h.

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

HuginBase::Panorama* PanoPanel::pano
private
bool PanoPanel::updatesDisabled
private

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