30#include "hugin_config.h"
32#if !defined HAVE_EPOXY || !HAVE_EPOXY
71#include <pano13/queryfeature.h>
94#include <wx/progdlg.h>
95#include <wx/infobar.h>
125#define PF_STYLE (wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN)
155 wxAuiFloatingFrame::OnMoveFinished();
209 int widths[3] = {-3, 150, 150};
215 wxPanel *
tool_panel = wxXmlResource::Get()->LoadPanel(
this,
"mode_panel");
217 XRCCTRL(*
this,
"preview_fit_pano_tool",
wxButton)->SetBitmapMargins(0,5);
218 XRCCTRL(*
this,
"preview_straighten_pano_tool",
wxButton)->SetBitmapMargins(0,5);
219 XRCCTRL(*
this,
"preview_fit_pano_tool2",
wxButton)->SetBitmapMargins(0,5);
220 XRCCTRL(*
this,
"preview_autocrop_tool",
wxButton)->SetBitmapMargins(0,5);
221 XRCCTRL(*
this,
"preview_stack_autocrop_tool",
wxButton)->SetBitmapMargins(0,5);
222 XRCCTRL(*
this,
"preview_autocrop_outside_tool",
wxButton)->SetBitmapMargins(0, 5);
239 wxApp::s_macExitMenuItemId =
XRCID(
"action_exit_preview");
285 long mode =
cfg->Read(
"/GLPreviewFrame/SelectAllMode", 0l);
381 m_VFOVSlider->SetToolTip(
_(
"drag to change the vertical field of view"));
420 m_HFOVSlider->SetToolTip(
_(
"drag to change the horizontal field of view"));
479 int guide=
cfg->Read(
"/GLPreviewFrame/guide",0l);
499 cfg->Read(
"/GLPreviewFrame/showPreviewGrid",&
showGrid,
true);
593 for(
int n=0;
n <
nP;
n++) {
635 blendModeSizer->Add(new wxStaticText(this, -1, _("Output:")),
636 0, // not vertically strechable
637 wxALL | wxALIGN_CENTER_VERTICAL, // draw border all around
640 m_choices[0] = _("LDR");
641 m_choices[1] = _("HDR");
642 m_outputModeChoice = new wxChoice(this, ID_OUTPUTMODE_CHOICE,
643 wxDefaultPosition, wxDefaultSize,
645 m_outputModeChoice->SetSelection(0);
646 blendModeSizer->Add(m_outputModeChoice,
648 wxALL | wxALIGN_CENTER_VERTICAL,
682 resetProjButton->SetToolTip(
_(
"Resets the projection's parameters to their default values."));
745 this->SetBackgroundColour(
m_GLPreview->GetBackgroundColour());
749 m_degDigits = wxConfigBase::Get()->Read(
"/General/DegreeFractionalDigitsEdit",3);
798 if (
cfg->Read(
"/GLPreviewFrame/isShown", 0l) != 0)
800#if defined __WXMSW__ || defined __WXMAC__
854 cfg->Write(
"/GLPreviewFrame/isShown", 1l);
856 cfg->Write(
"/GLPreviewFrame/isShown", 0l);
860 cfg->Write(
"/GLPreviewFrame/OpenGLLayout",
m_mgr->SavePerspective());
1037 if (opts.
getROI().area() > 0)
1078 if (img.getYaw() != 0.0 || img.getPitch() != 0.0 || img.getRoll() != 0.0)
1086 if (
lastCmd ==
"add images" ||
lastCmd ==
"add and distribute images")
1121 if (
comps.size() > 1)
1129 alignMsg +=
_(
"Images or control points have changed, new alignment is needed.");
1135 const double max =
calcStats.getResultMax();
1140 alignMsg =
alignMsg + wxString::Format(
_(
"Mean error after optimization: %.1f pixel, max: %.1f"),
mean, max);
1324 wxString::Format(
" %d ",*
it),
1331#if defined __WXMSW__ || defined __WXMAC__
1362 but->SetValue(
true);
1377 for (
unsigned i=0;
i < nrImages;
i++) {
1430 if (
inf.IsFloating() &&
inf.IsShown()) {
1499#if defined __WXMSW__ || defined __WXMAC__
1534 if (
event.CanVeto())
1544 if (
event.CanVeto())
1560void PreviewFrame::OnProjectionChanged()
1566 case PanoramaOptions::RECTILINEAR:
Ip =
_(
"Rectilinear");
break;
1567 case PanoramaOptions::CYLINDRICAL:
Ip =
_(
"Cylindrical");
break;
1568 case PanoramaOptions::EQUIRECTANGULAR:
Ip =
_(
"Equirectangular");
break;
1570 opt.projectionFormat = (PanoramaOptions::ProjectionFormat)
lt;
1618 DEBUG_INFO (
"new fov: [" <<
opt.getHFOV() <<
" "<<
opt.getVFOV() <<
"] => height: " <<
opt.getHeight() );
1689 text =
XRCCTRL(*
this,
"input_yaw",wxTextCtrl)->GetValue();
1696 text =
XRCCTRL(*
this,
"input_pitch",wxTextCtrl)->GetValue();
1703 text =
XRCCTRL(*
this,
"input_roll",wxTextCtrl)->GetValue();
1717 text =
XRCCTRL(*
this,
"input_x",wxTextCtrl)->GetValue();
1724 text =
XRCCTRL(*
this,
"input_y",wxTextCtrl)->GetValue();
1731 text =
XRCCTRL(*
this,
"input_z",wxTextCtrl)->GetValue();
1787 if (!
text.IsEmpty())
1797 wxLogError(
_(
"Value for range compression is outside of valid range."));
1849 std::vector<double>
para =
opt.getProjectionParameters();
1855 para[
i] = e.GetInt();
1859 opt.setProjectionParameters(
para);
1869 std::vector<double>
para =
opt.getProjectionParameters();
1875 para[
i] = e.GetInt();
1880 opt.setProjectionParameters(
para);
1921 if (
hugin_utils::HuginMessageBox(
_(
"The mosaic/plane mode works only correct for a remapping plane of yaw=0 and pitch=0.\nBut your project has non-zero Tpy and Tpp parameters.\nShould the Tpy and Tpp parameters reset to zero?"),
1956 for (
size_t i = 0 ;
i <
nr;
i++)
1972 for (
size_t i = 0 ;
i <
nr ;
i++)
1975 img.setTranslationPlaneYaw(0);
1976 img.setTranslationPlanePitch(0);
2012 if (
hugin_utils::HuginMessageBox(
_(
"The mosaic/plane mode works only correct for a remapping plane of yaw=0 and pitch=0.\nBut your project has non-zero Tpy and Tpp parameters.\nShould the Tpy and Tpp parameters reset to zero?"),
2297 std::set<Tool*>::iterator
i;
2329 unsigned char green,
2334#if defined __WXMSW__ || defined __WXMAC__
2374 for (
unsigned image = 0; image <
nr_images; image++)
2376#if defined __WXMSW__ || defined __WXMAC__
2471 std::vector<PreviewIdentifyTool**>::iterator
it;
2487 std::vector<PreviewIdentifyTool**>::iterator
it;
2489 (*(*it))->StopShowingImages();
2503 if (e.IsChecked()) {
2523 : image_number(image_number), frame(
frame_in), m_pano(m_pano)
2540 std::vector<PreviewIdentifyTool**>::iterator
it;
2553 std::vector<PreviewIdentifyTool**>::iterator
it;
2555 (*(*it))->StopShowingImages();
2564 if (e.IsChecked()) {
2604 std::vector<wxCheckBox*>::iterator
it;
2605 unsigned int nr = 0;
2615 std::vector<wxCheckBox*>::iterator
it;
2617 (*it)->SetValue(
false);
2623 std::vector<wxCheckBox*>::iterator
it;
2641 unsigned int oldMode = wxConfigBase::Get()->Read(
"/GLPreviewFrame/blendMode", 0l);
2697 if (
stackImgs.size()<activeImages.size())
2808 std::vector<wxCheckBox*>::iterator
it;
2858 std::vector<wxCheckBox*>::iterator
it;
2893 long left, right, top, bottom;
2895 wxLogError(
_(
"Top needs to be an integer bigger than 0"));
2899 wxLogError(
_(
"left needs to be an integer bigger than 0"));
2903 wxLogError(
_(
"right needs to be an integer bigger than 0"));
2907 wxLogError(
_(
"bottom needs to be an integer bigger than 0"));
2910 opt.setROI(vigra::Rect2D(left, top, right, bottom));
2912 if(
opt.getROI().width()<1) {
2913 wxLogError(
_(
"left boundary must be smaller than right"));
2918 if(
opt.getROI().height()<1) {
2919 wxLogError(
_(
"top boundary must be smaller than bottom"));
2946 int top =
opt.getROI().top();
2947 int width =
opt.getROI().width();
2948 int height =
opt.getROI().height();
2953 left = left + (width -
newWidth) / 2.0;
2962 opt.setROI(vigra::Rect2D(left, top, left + width, top + height));
2986 _(
"Invalid HFOV value. Maximum HFOV for this projection is %lf."),
2988 hfov=
opt.getMaxHFOV();
3017 _(
"Invalid VFOV value. Maximum VFOV for this projection is %lf."),
3034 double scale_factor=
XRCCTRL(*
this,
"layout_scale_slider",
wxSlider)->GetValue();
3055 message =
_(
"With a wide field of view, panoramas with rectilinear projection get very stretched towards the edges.\n");
3057 message +=
_(
"Since the field of view is only very wide in the horizontal direction, try a cylindrical projection instead.");
3059 message +=
_(
"For a very wide panorama, try equirectangular projection instead.");
3062 message +=
_(
"You could also try Panini projection.");
3067 message =
_(
"With a wide vertical field of view, panoramas with cylindrical projection get very stretched at the top and bottom.\nAn equirectangular projection would fit the same content in less vertical space.");
3073 message =
_(
"Since the vertical field of view is not too wide, you could try setting the panorama projection to cylindrical.\nCylindrical projection preserves vertical lines, unlike equirectangular.");
3079 message =
_(
"Stereographic projection is conformal, unlike this Fisheye panorama projection.\nA conformal projection preserves angles around a point, which often makes it easier on the eye.");
3084 message =
_(
"Panoramas with stereographic projection and a very wide field of view stretch the image around the edges a lot.\nThe Fisheye panorama projection compresses it, so you can fit in a wide field of view and still have a reasonable coverage of the middle.");
3091 message =
_(
"Setting the panorama to rectilinear projection would keep the straight lines straight.");
3112 hugin_utils::HuginMessageBox(
_(
"You have hidden the infobar, which shows hints about selection of projection.\nIf you want to see the bar again, activate the bar in the preferences again."),
3115 cfg->Write(
"/GLPreviewFrame/ShowProjectionHints",
false);
3141 cfg->Write(
"/GLPreviewFrame/PreviewBackground", c);
3157 int selection=e.GetSelection();
3195 wxCommandEvent
dummy;
3218 wxApp::s_macExitMenuItemId =
XRCID(
"action_exit_preview");
3230 wxApp::s_macExitMenuItemId =
XRCID(
"action_exit_hugin");
3292 if (wxConfig::Get()->Read(
"/ShowFisheyeCropHint", 1l) == 1)
3296 wxXmlResource::Get()->LoadDialog(&
dlg,
NULL,
"fisheye_show_crop_dlg");
3303 wxConfig::Get()->Write(
"/ShowFisheyeCropHint", 0l);
3332 wxCommandEvent
dummy;
3337 std::vector<PanoCommand::PanoCommand*>
cmds;
3345 combinedCmd->setName(
"add and distribute images");
3352 HuginBase::FileMetaData::const_iterator
pos =
metaData.find(
"readProjectionFromDB");
3375 wxCommandEvent
dummy;
3387 bool optimize =
false;
3391 wxXmlResource::Get()->LoadDialog(&
dlg,
this,
"edit_cp_optimize_dialog");
3392 XRCCTRL(
dlg,
"edit_cp_text1",
wxStaticText)->SetLabel(wxString::Format(
_(
"%lu control points were removed from the panorama.\n\nShould the panorama now be re-optimized?"),
static_cast<unsigned long int>(
edit_cp_tool->
GetFoundCPs().size())));
3400 wxConfig::Get()->Write(
"/EditCPAfterAction", 1l);
3404 wxConfig::Get()->Write(
"/EditCPAfterAction", 2l);
3422#define MAX_DIMENSION 1600
3443 hugin_utils::HuginMessageBox(
_(
"The selected region contains no active image.\nPlease select a region which is covered by at least 2 images."),
3447 if (imgs.size() < 2)
3455 if (
hugin_utils::HuginMessageBox(
_(
"The selected rectangle is very big.\nThis function is only intended for smaller areas. Otherwise unwanted side effect can appear.\n\nProceed anyway?"),
3479 for (HuginBase::UIntSet::const_iterator
it = imgs.begin();
it != imgs.end(); ++
it)
3481 const size_t imgNr = *
it;
3482 if (!
progress.updateDisplayValue(
_(
"Remap image to panorama projection...")))
3489 ImageCache::ImageCacheRGB8Ptr
CachedImg = ImageCache::getInstance().getImage(
m_pano.
getImage(imgNr).getFilename())->get8BitImage();
3494 srcImg.setExposureValue(0);
3534 for (
size_t img1 = 0; img1 <
cpInfos.size() - 1; ++img1)
3536 if (!
progress.updateDisplayValue(
_(
"Matching interest points...")))
3540 vigra::Size2D size(
cpInfos[img1].image.width(),
cpInfos[img1].image.height());
3542 std::vector<vigra::Rect2D>
rects;
3549 rect &= vigra::Rect2D(size);
3550 if (
rect.width()>0 &&
rect.height()>0)
3562#pragma omp parallel for schedule(dynamic)
3563 for (
int i = 0;
i <
rects.size(); ++
i)
3573 if (
cpInfos[img1].mask(
it->second.x,
it->second.y)>0)
3582 for (
size_t img2 = img1 + 1; img2 <
cpInfos.size(); ++img2)
3594 if (
cpInfos[img2].mask(
it->second.x,
it->second.y) == 0)
3600 cpInfos[img2].image, vigra::RGBToGrayAccessor<vigra::RGBValue<vigra::UInt8> >(),
it->second,
sWidth);
3617 cpInfos[img1].image.resize(0, 0);
3618 cpInfos[img1].mask.resize(0, 0);
3655 if (!
progress.updateDisplayValue(
_(
"Checking results...")))
3666 cps.erase(cps.begin() + *
it);
3670 if (!
progress.updateDisplayValue())
3677 bool optimize =
false;
3683 wxXmlResource::Get()->LoadDialog(&
dlg,
this,
"edit_cp_optimize_dialog");
3684 XRCCTRL(
dlg,
"edit_cp_text1",
wxStaticText)->SetLabel(wxString::Format(
_(
"%lu control points were added to the panorama.\n\nShould the panorama now be re-optimized?"),
static_cast<unsigned long int>(cps.size())));
3692 wxConfig::Get()->Write(
"/EditCPAfterAction", 1l);
3696 wxConfig::Get()->Write(
"/EditCPAfterAction", 2l);
3720 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllMode", 0l);
3726 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllMode", 1l);
3732 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllMode", 2l);
3738 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllMode", 3l);
3744 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllKeepSelection",
true);
3750 wxConfig::Get()->Write(
"/GLPreviewFrame/SelectAllKeepSelection",
false);
algorithms for remove control points by statistic method
std::vector< FindStruct > FindVector
std::multimap< double, vigra::Diff2D > MapPoints
static hugin_omp::Lock cpLock
void ShowFisheyeCropHint()
declaration of functions to handle stacks and layers
void registerPTWXDlgFcn()
void deregisterPTWXDlgFcn()
Definition of PanoOperation class.
Definition of PanoOutputDialog class.
Definition of dialog for selecting and editing aspect ratios of crop.
void SetMode(OverviewMode mode)
virtual void SetLayoutScale(double scale)
virtual void SetLayoutMode(bool state)
The OpenGL preview frame.
void OnResetCrop(wxCommandEvent &e)
event handler to reset crop area
void OnImageContextMenu(wxContextMenuEvent &e)
show context menu on image buttons
void LoadImages(int preferredLensType)
void OnAutocrop(wxCommandEvent &e)
void EnableGroupCheckboxes(bool isShown)
changes the visibility of the group check boxes
PreviewProjectionGridTool * preview_projection_grid
PreviewControlPointTool * panosphere_control_point_tool
void OnProjectionChoice(wxCommandEvent &e)
PanosphereOverviewCameraTool * panosphere_overview_camera_tool
virtual void panoramaChanged(HuginBase::Panorama &pano)
Notification about a Panorama change.
void OnStraighten(wxCommandEvent &e)
void ResetTranslationPlaneParameters()
resets all translation plane parameters to zero
void OnCenterHorizontally(wxCommandEvent &e)
wxChoice * m_OverviewModeChoice
void KeyDown(wxKeyEvent &e)
void OnFitPano(wxCommandEvent &e)
void OnSelectResetSelection(wxCommandEvent &e)
PreviewControlPointTool * preview_control_point_tool
void OnClose(wxCloseEvent &e)
void OnCreateCP(wxCommandEvent &e)
handler for creating cp in pano space
wxMenu * m_filemenuSimple
void InitPreviews()
init previews
void OnBlendChoice(wxCommandEvent &e)
PreviewPanoMaskTool * pano_mask_tool
void OnRangeCompressionIncrease(wxSpinEvent &e)
void OnIncreaseExposure(wxSpinEvent &e)
void OnTrackChangeProjectionParam(wxScrollEvent &e)
void DragChoiceLayout(int index)
PreviewControlPointTool * plane_control_point_tool
void OnSetCropAspect(wxCommandEvent &e)
event handler to set fixed aspect ratio of crop
std::vector< ImageGroupButtonEventHandler * > toggle_group_button_event_handlers
PreviewDragTool * drag_tool
PreviewIdentifyTool * panosphere_overview_identify_tool
void OnSelectAllMenu(wxCommandEvent &e)
handle all options of select all context menu
void OnSelectDarkestMenu(wxCommandEvent &e)
wxColour m_preview_background_color
void OnStackAutocrop(wxCommandEvent &e)
wxToggleButton * m_identify_togglebutton
void TurnOffTools(std::set< Tool * > tools)
PlaneOverviewToolHelper * plane_overview_helper
bool m_showProjectionHints
PlaneOverviewOutlinesTool * plane_overview_outlines_tool
void OnSwitchPreviewGrid(wxCommandEvent &e)
event handler for switch on/off grid on preview
PreviewLayoutLinesTool * m_preview_layoutLinesTool
void UpdateRoiDisplay(const HuginBase::PanoramaOptions opts)
update display of ROI
void OnOverviewModeChoice(wxCommandEvent &e)
void OnEditCPTool(wxCommandEvent &e)
event handler when starting edit cp tool
wxToggleButton * m_colorpicker_togglebutton
void updateBlendMode()
Update tools and GUI elements according to blend mode choice.
virtual ~GLPreviewFrame()
dtor.
void OnDefaultExposure(wxCommandEvent &e)
void OnShowNone(wxCommandEvent &e)
void OnCreate(wxCommandEvent &e)
void MakePlaneOverviewTools(PlaneOverviewToolHelper *helper)
void OnShowEvent(wxShowEvent &e)
HuginBase::UIntSet GetDragGroupImages()
wxInfoBar * m_infoBar
Bar for context sensitive projection information.
wxChoice * m_GuideChoiceCrop
wxTextCtrl * m_ROILeftTxt
wxTextCtrl * m_ROIRightTxt
void ClearDragGroupImages(bool update_check_box=true)
void FillBlendChoice()
fills the blend wxChoice with all valid blend modes and restore the last used one
void SetGuiLevel(GuiLevel newLevel)
sets the gui level
PreviewIdentifyTool * identify_tool
void OnOverviewToggle(wxCommandEvent &e)
wxSpinButton * m_exposureSpinBut
PreviewDifferenceTool * panosphere_difference_tool
HuginBase::Panorama & m_pano
wxNotebook * m_tool_notebook
wxChoice * m_GuideChoiceProj
PlaneOverviewCameraTool * plane_overview_camera_tool
void SetMode(int newMode)
PanosphereOverviewProjectionGridTool * overview_projection_grid
void OnExposureChanged(wxCommandEvent &e)
void MakePreviewTools(PreviewToolHelper *helper)
void ToggleImageInDragGroup(unsigned int image_nr, bool update_check_box=true)
wxPanel * m_overviewCommandPanel
PanosphereOverviewToolHelper * panosphere_overview_helper
PreviewToolHelper * preview_helper
void OnROIChanged(wxCommandEvent &e)
event handler for changed roi
void SetStatusMessage(wxString message)
wxBoxSizer * m_projParamSizer
HuginBase::UIntSet imageDragGroup
wxChoice * m_GuideChoiceDrag
wxColour GetPreviewBackgroundColor()
wxPanel * m_projection_panel
bool HasNonZeroTranslationPlaneParameters()
check, if panorama has non-zero translation plane parameters
bool individualDragging()
void LoadOpenGLLayout()
loads the layout of the OpenGL windows and restores it
wxToggleButton * m_editCP_togglebutton
void OnLoadImages(wxCommandEvent &e)
bool UpdateOverviewMode(int newMode)
updates the mode of the overview window
void OnDragChoice(wxCommandEvent &e)
wxMenu * m_filemenuAdvanced
SelectAllMode m_selectAllMode
void StorePositionAndSize()
store position and size of window in wxConfig
wxStaticBoxSizer * m_ToggleButtonSizer
PreviewColorPickerTool * color_picker_tool
std::vector< wxCheckBox * > m_GroupToggleButtons
wxChoice * m_DragModeChoice
PreviewIdentifyTool * plane_overview_identify_tool
void AddUserDefinedSequence(int id, const wxString &desc, const wxString &help)
adds the given user defined output sequence to SplitButton menu
void RemoveImageFromDragGroup(unsigned int image_nr, bool update_check_box=true)
void OnControlPoint(wxCommandEvent &e)
void OnProjParameterChanged(wxCommandEvent &e)
void redrawPreview()
Display an updated version of the preview images.
wxChoice * m_BlendModeChoice
void OnUserExit(wxCommandEvent &e)
user wants to quit program
void OnDecreaseExposure(wxSpinEvent &e)
void OnShowAll(wxCommandEvent &e)
void AddUserDefinedAssistant(int id, const wxString &desc, const wxString &help)
adds the given user defined assistant to SplitButton menu
void OnAutocropOutside(wxCommandEvent &e)
void UpdateIdentifyTools(std::set< unsigned int > new_image_set)
PreviewDifferenceTool * plane_difference_tool
void SetDragGroupImages(HuginBase::UIntSet imageDragGroup_in, bool update_check_box=true)
void OnFullScreen(wxCommandEvent &e)
event handler for full screen
void OnSelectKeepSelection(wxCommandEvent &e)
void OnPreviewBackgroundColorChanged(wxColourPickerEvent &e)
event handler when user changes background color
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &changed)
notifies about changes to images
void OnHideProjectionHints(wxCommandEvent &e)
event handler when user hides the infobar
wxScrolledWindow * m_ButtonPanel
std::vector< wxSlider * > m_projParamSlider
int non_layout_blend_mode
void OnSelectBrightestMenu(wxCommandEvent &e)
void OnShowMainFrame(wxCommandEvent &e)
event handler to show main frame
void OnChangeProjectionParam(wxScrollEvent &e)
void AddImageToDragGroup(unsigned int image_nr, bool update_check_box=true)
void OnRangeCompressionChanged(wxCommandEvent &e)
PanosphereOverviewOutlinesTool * overview_outlines_tool
std::vector< wxPanel * > m_ToggleButtonPanel
SplitButton * m_createButton
GLOverview * m_GLOverview
std::vector< ImageToogleButtonEventHandler * > toogle_button_event_handlers
void OnIdentify(wxCommandEvent &e)
bool m_selectKeepSelection
void OnRemoveImage(wxCommandEvent &e)
void OnRemoveCP(wxCommandEvent &e)
handler to remove cp
wxChoice * m_ProjectionChoice
PreviewDifferenceTool * difference_tool
PreviewCameraTool * camera_tool
wxTextCtrl * m_rangeCompressionTextCtrl
void OnColorPicker(wxCommandEvent &e)
event handler when starting color picker
GLwxAuiManager * m_mgr
The dock manager.
void OnVFOVChanged(wxCommandEvent &e)
SplitButton * m_selectAllButton
PreviewCropTool * crop_tool
void ResetPreviewZoom()
reset zoom level for preview window
void OnLayoutScaleChange(wxCommandEvent &e)
event handler for change scale of layout mode
std::vector< wxTextCtrl * > m_projParamTextCtrl
void OnNumTransform(wxCommandEvent &e)
void MakePanosphereOverviewTools(PanosphereOverviewToolHelper *helper)
wxSpinButton * m_rangeCompressionSpinBut
void OnPhotometric(wxCommandEvent &e)
OverviewDragTool * overview_drag_tool
void ShowProjectionWarnings()
Tell the user anything suspicious about the projection choice.
void CleanButtonColours()
@ SELECT_BRIGHTEST_IMAGES
void UpdateGlobalWhiteBalance(double redFactor, double blueFactor)
updates the global white balance
SplitButton * m_loadImagesButton
PreviewEditCPTool * edit_cp_tool
void OnProjParameterReset(wxCommandEvent &e)
event handler for reset projection parameters
void OnGuideChanged(wxCommandEvent &e)
event handler when user selects different guide
SplitButton * m_alignButton
std::vector< wxStaticText * > m_projParamNamesLabel
wxTextCtrl * m_exposureTextCtrl
void OnSelectMode(wxNotebookEvent &e)
event handler for selection of new mode
wxBoxSizer * m_ButtonSizer
PreviewLayoutLinesTool * m_plane_layoutLinesTool
void OnToolModeChanging(wxNotebookEvent &e)
event handler for blocking changing mode when panorama contains no images
PreviewLayoutLinesTool * m_panosphere_layoutLinesTool
void KeyUp(wxKeyEvent &e)
void SetImageButtonColour(unsigned int image_nr, unsigned char red, unsigned char green, unsigned char blue)
void OnSelectMedianMenu(wxCommandEvent &e)
std::vector< wxToggleButton * > m_ToggleButtons
GLPreviewFrame(wxFrame *frame, HuginBase::Panorama &pano)
ctor.
void SetShowProjectionHints(bool new_value)
set status if projection hints should be shown or not
wxTextCtrl * m_ROIBottomTxt
void OnHFOVChanged(wxCommandEvent &e)
PreviewGuideTool * preview_guide_tool
wxBitmapButton * m_defaultExposureBut
PanosphereSphereTool * panosphere_sphere_tool
void OnRangeCompressionDecrease(wxSpinEvent &e)
void OnAlign(wxCommandEvent &e)
virtual void SetLayoutMode(bool state)
void SetActive(bool active)
wxGLContext * GetContext()
VisualizationState * m_visualization_state
virtual void SetLayoutScale(double scale)
void SetPhotometricCorrect(bool state)
void SetViewerBackground(wxColour col)
void Resized(wxSizeEvent &e)
static ViewState * m_view_state
subclass for a floating frame of the dock manager
GLwxAuiFloatingFrame(wxWindow *parent, GLwxAuiManager *owner_mgr, const wxAuiPaneInfo &pane, wxWindowID id=wxID_ANY, long style=wxRESIZE_BORDER|wxSYSTEM_MENU|wxCAPTION|wxFRAME_FLOAT_ON_PARENT|wxCLIP_CHILDREN)
void OnActivate(wxActivateEvent &evt)
customized subclass of the dock manager, created just for the purpose to create a workaround for the ...
GLwxAuiFloatingFrame * CreateFloatingFrame(wxWindow *parent, const wxAuiPaneInfo &p)
virtual double getResultHorizontalFOV()
virtual double getResultHeight()
static double calcMeanExposure(const PanoramaData &pano)
represents a control point
struct to hold a image state for stitching
virtual void run()
runs the algorithm.
void setHFOV(double h, bool keepView=true)
set the horizontal field of view.
void setProjection(ProjectionFormat f)
set the Projection format and adjust the hfov/vfov if nessecary
bool fovCalcSupported(ProjectionFormat f) const
true, if FOV calcuations are supported for projection f
const std::vector< double > & getProjectionParameters() const
Get the optional projection parameters.
const vigra::Rect2D & getROI() const
void setWidth(unsigned int w, bool keepView=true)
set panorama width keep the HFOV, if keepView=true
void setROI(const vigra::Rect2D &val)
unsigned int getWidth() const
void resetProjectionParameters()
sets the optional parameters to their default values
PanoramaOptions::ProjectionFormat getProjection() const
double outputExposureValue
ProjectionFormat
Projection of final panorama.
void setProjectionParameters(const std::vector< double > ¶ms)
set the optional parameters (they need to be of the correct size)
double outputRangeCompression
pano_projection_features m_projFeatures
vigra::Size2D getSize() const
get size of output image
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
const PanoramaOptions & getOptions() const
returns the options for this panorama
void setCtrlPoints(const CPVector &points)
set all control points (Ippei: Is this supposed to be 'add' method?)
void addObserver(PanoramaObserver *o)
add a panorama observer.
SrcPanoImage getSrcImage(unsigned imgNr) const
get a description of a source image
std::size_t getNrOfCtrlPoints() const
number of control points
VariableMapVector getVariables() const
get variables of this panorama
const CPVector & getCtrlPoints() const
get all control point of this Panorama
Panorama getSubset(const UIntSet &imgs) const
get a subset of the panorama
bool removeObserver(PanoramaObserver *observer)
remove a panorama observer.
Panorama duplicate() const
duplicate the panorama
UIntSet getActiveImages() const
get active images
bool needsOptimization()
true if control points or lens variables have been changed after the last optimisation
std::size_t getNrOfImages() const
number of images.
All variables of a source image.
bool isCircularCrop() const
returns true, if projection requires cicular crop
class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on...
std::vector< HuginBase::UIntSet > Components
stores the components of the graph
wxFileHistory * GetFileHistory()
static MainFrame * Get()
hack.. kind of a pseudo singleton...
void OnDoStitch(wxCommandEvent &e)
void RunAssistant(wxWindow *mainWin, const wxString &userdefinedAssistant=wxEmptyString)
void ShowMaskEditor(size_t imgNr, bool switchToCropMode=false)
opens the mask/crop editor with the given image selected
add multiple control points
center panorama horizontically
PanoCommand to combine other PanoCommands.
std::string getLastCommandName() const
returns the name of the last command
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history.
distributes all images above the sphere, for the assistant
static GlobalCmdHist & getInstance()
Base class for all panorama commands.
remove several control points
remove an image from a panorama
straighten panorama horizontically
update variables of a group of images
update global white balance
simple class that forward the drop to the mainframe
PanoOperation to add several user selected images to the panorama.
virtual PanoCommand::PanoCommand * GetCommand(wxWindow *parent, HuginBase::Panorama &pano, HuginBase::UIntSet images, GuiLevel guiLevel)
returns the appropriate PanoCommand::PanoCommand to be inserted into GlobalCmdHistory,...
Dialog for setting output parameters for simple user interface.
HuginBase::Panorama & m_pano
wxChoice * m_ProjectionChoice
Handle EVT_KILL_FOCUS and convert it to a EVT_TEXT_ENTER event.
void SetOptions(const HuginBase::PanoramaOptions *new_opts)
void SetZoomLevel(const float new_zoom)
void ForceRequireRedraw()
static huginApp * Get()
hack.. kind of a pseudo singleton...
#define HUGIN_PREVIEW_BACKGROUND
#define HUGIN_ASS_AUTO_ALIGN
#define HUGIN_SHOW_PROJECTION_HINTS
wxString Components2Str(const HuginGraph::ImageGraph::Components &comp)
#define DEBUG_ASSERT(cond)
UIntSet getCPoutsideLimit(Panorama pano, double n, bool skipOptimisation, bool includeLineCp)
optimises the whole panorama and removes all control points with error > mean+n*sigma
std::vector< ControlPoint > CPVector
std::vector< HuginBase::UIntVector > getSortedStacks(const HuginBase::Panorama *pano)
returns vector of UIntVector with image numbers of each stack sorted by exposure
UIntSet getImagesinROI(const PanoramaData &pano, const UIntSet activeImages)
returns set of images which are visible in output ROI
std::set< unsigned int > UIntSet
std::map< std::string, std::string > FileMetaData
typedef for general map for storing metadata in files
bool str2double(const wxString &s, double &d)
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
std::string doubleToString(double d, int digits)
convert a double to a string, suitable for display within a GUI.
int gcd(int a, int b)
function to calculate greated common divisor using Euclidean algorithm both arguments should be >=0
bool stringToDouble(const STR &str_, double &dest)
convert a string to a double, ignore localisation.
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
void findInterestPointsPartial(vigra::triple< ImageIter, ImageIter, ImageAcc > img, const vigra::Rect2D &rect, double scale, unsigned nPoints, std::multimap< double, vigra::Diff2D > &points)
CorrelationResult PointFineTune(const IMAGET &templImg, ACCESSORT access_t, vigra::Diff2D templPos, int templSize, const IMAGES &searchImg, ACCESSORS access_s, vigra::Diff2D searchPos, int sWidth)
fine tune a point with normalized cross correlation
include file for the hugin project
include file for the hugin project
bool set_contains(const _Container &c, const typename _Container::key_type &key)
void fill_set(_Container &c, typename _Container::key_type begin, typename _Container::key_type end)
Maximum of correlation, position and value.
hugin_utils::FDiff2D maxpos
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
wxwindows specific panorama commands