From: <hug...@li...> - 2013-02-21 21:31:21
|
branch: 2011.4 details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/1fab1b57ff76 changeset: 6171:1fab1b57ff76 user: Dev Ghosh <dg...@no...> date: Tue Aug 14 09:35:40 2012 -0500 description: Mosaic Mode 1.0 diffstat: src/hugin1/hugin/AssistantPanel.cpp | 22 +- src/hugin1/hugin/ImagesList.cpp | 23 +- src/hugin1/hugin/ImagesPanel.cpp | 174 +++++++++---- src/hugin1/hugin/MainFrame.cpp | 2 +- src/hugin1/hugin/OptimizePanel.cpp | 175 ++++++++++++- src/hugin1/hugin/OptimizePanel.h | 17 + src/hugin1/hugin/OptimizePhotometricPanel.cpp | 23 + src/hugin1/hugin/OptimizePhotometricPanel.h | 4 + src/hugin1/hugin/PanoPanel.cpp | 71 +++++- src/hugin1/hugin/PanoPanel.h | 4 + src/hugin1/hugin/ViewState.cpp | 3 + src/hugin1/hugin/xrc/assistant_panel.xrc | 4 +- src/hugin1/hugin/xrc/images_panel.xrc | 79 +++++- src/hugin1/hugin/xrc/optimize_panel.xrc | 148 ++++++++--- src/hugin1/hugin/xrc/optimize_photo_panel.xrc | 12 + src/hugin1/hugin/xrc/pano_panel.xrc | 23 +- src/hugin_base/algorithms/basic/CalculateOptimalScale.cpp | 4 + src/hugin_base/panodata/Panorama.cpp | 72 +++++- src/hugin_base/panodata/Panorama.h | 39 ++- src/hugin_base/panodata/PanoramaOptions.cpp | 43 +++ src/hugin_base/panodata/PanoramaOptions.h | 33 ++ src/hugin_base/panodata/StandardImageVariableGroups.cpp | 5 +- src/hugin_base/panotools/PanoToolsInterface.cpp | 82 ++++++- src/hugin_base/panotools/PanoToolsInterface.h | 53 ++++- src/hugin_cpfind/cpfind/PanoDetector.cpp | 25 +- 25 files changed, 962 insertions(+), 178 deletions(-) diffs (truncated from 2241 to 500 lines): diff -r 1e70b7c7f635 -r 1fab1b57ff76 src/hugin1/hugin/AssistantPanel.cpp --- a/src/hugin1/hugin/AssistantPanel.cpp Tue Jul 17 19:10:45 2012 -0500 +++ b/src/hugin1/hugin/AssistantPanel.cpp Tue Aug 14 09:35:40 2012 -0500 @@ -225,7 +225,11 @@ if (pano.getNrOfImages() == 0) { m_createButton->Disable(); - m_imagesText->SetLabel(_("Please load images by pressing on the Load images button.")); + + m_imagesText->SetLabel(_("Please load images by pressing on the Load images button. \n\nTo make a mosaic, after loading images, select Mosaic Assembly from the Optimizer tab. Don't use 2. Align and 3. Create Panorama buttons below.")); + m_imagesText->Wrap(600); + + m_exifToggle->Disable(); XRCCTRL(*this, "ass_lens_group", wxPanel)->Disable(); m_noImage = true; @@ -344,6 +348,22 @@ m_panel->Layout(); m_panel->FitInside(); + // Dev: always tell user whether hugin is in pano or mosaic mode + if (m_pano->isMosaicNotPano()) { + XRCCTRL(*this, "mosaic_warning_text", wxStaticText)->SetLabel(wxString::Format(wxT("Hugin is in MOSAIC mode. \nAlign and Create Panorama buttons are disabled below. Use the Control Points, Optimizer, Exposure, and Stitcher tabs to create your mosaic."))); + XRCCTRL(*this, "mosaic_warning_text", wxStaticText)->Wrap(600); + + m_alignButton->Disable(); + m_alignBatchButton->Disable(); + m_createButton->Disable(); + + } + else { + XRCCTRL(*this, "mosaic_warning_text", wxStaticText)->SetLabel(wxString::Format(wxT("Hugin is in PANORAMA mode."))); + } + + + // TODO: update meaningful help text and dynamic links to relevant tabs } diff -r 1e70b7c7f635 -r 1fab1b57ff76 src/hugin1/hugin/ImagesList.cpp --- a/src/hugin1/hugin/ImagesList.cpp Tue Jul 17 19:10:45 2012 -0500 +++ b/src/hugin1/hugin/ImagesList.cpp Tue Aug 14 09:35:40 2012 -0500 @@ -447,9 +447,14 @@ InsertColumn( 7, _("X (TrX)"), wxLIST_FORMAT_RIGHT, 60 ); InsertColumn( 8, _("Y (TrY)"), wxLIST_FORMAT_RIGHT, 60 ); InsertColumn( 9, _("Z (TrZ)"), wxLIST_FORMAT_RIGHT, 60 ); - InsertColumn( 10, _("Anchor"), wxLIST_FORMAT_RIGHT, 60 ); - InsertColumn( 11, _("# Ctrl Pnts"), wxLIST_FORMAT_RIGHT, 60); - InsertColumn( 12, _("Stack Number"), wxLIST_FORMAT_RIGHT, 60); + + InsertColumn( 10, _("Spin (Te0)"), wxLIST_FORMAT_RIGHT, 60 ); + InsertColumn( 11, _("Tilt (Te1)"), wxLIST_FORMAT_RIGHT, 60 ); + InsertColumn( 12, _("Rotate (Te2)"), wxLIST_FORMAT_RIGHT, 75 ); + + InsertColumn( 13, _("Anchor"), wxLIST_FORMAT_RIGHT, 60 ); + InsertColumn( 14, _("# Ctrl Pnts"), wxLIST_FORMAT_RIGHT, 60); + InsertColumn( 15, _("Stack Number"), wxLIST_FORMAT_RIGHT, 60); //get saved width for ( int j=0; j < GetColumnCount() ; j++ ) @@ -485,6 +490,12 @@ SetItem(imgNr, 7, doubleTowxString(img.getX(), m_distDigits)); SetItem(imgNr, 8, doubleTowxString(img.getY(), m_distDigits)); SetItem(imgNr, 9, doubleTowxString(img.getZ(), m_distDigits)); + + SetItem(imgNr, 10, doubleTowxString(img.getSpin(), m_distDigits)); + SetItem(imgNr, 11, doubleTowxString(img.getTilt(), m_distDigits)); + SetItem(imgNr, 12, doubleTowxString(img.getRotate(), m_distDigits)); + + wxChar flags[] = wxT("--"); if (pano->getOptions().optimizeReferenceImage == imgNr) { flags[0]='A'; @@ -492,7 +503,7 @@ if (pano->getOptions().colorReferenceImage == imgNr) { flags[1]='C'; } - SetItem(imgNr,10, wxString(flags, wxConvLocal)); + SetItem(imgNr,13, wxString(flags, wxConvLocal)); // urgh.. slow.. stupid.. traverse control point list for each image.. const CPVector & cps = pano->getCtrlPoints(); int nCP=0; @@ -501,13 +512,13 @@ nCP++; } } - SetItem(imgNr, 11, wxString::Format(wxT("%d"), nCP)); + SetItem(imgNr, 14, wxString::Format(wxT("%d"), nCP)); } void ImagesListImage::UpdatePartNumbersForItem(unsigned int imgNr) { unsigned int stackNumber = variable_groups->getStacks().getPartNumber(imgNr); - SetItem(imgNr, 12, wxString::Format(wxT("%d"), stackNumber)); + SetItem(imgNr, 15, wxString::Format(wxT("%d"), stackNumber)); } IMPLEMENT_DYNAMIC_CLASS(ImagesListImage, ImagesList) diff -r 1e70b7c7f635 -r 1fab1b57ff76 src/hugin1/hugin/ImagesPanel.cpp --- a/src/hugin1/hugin/ImagesPanel.cpp Tue Jul 17 19:10:45 2012 -0500 +++ b/src/hugin1/hugin/ImagesPanel.cpp Tue Aug 14 09:35:40 2012 -0500 @@ -102,6 +102,12 @@ EVT_TEXT_ENTER ( XRCID("images_text_X"), ImagesPanel::OnVarTextChanged ) EVT_TEXT_ENTER ( XRCID("images_text_Y"), ImagesPanel::OnVarTextChanged ) EVT_TEXT_ENTER ( XRCID("images_text_Z"), ImagesPanel::OnVarTextChanged ) + + EVT_TEXT_ENTER ( XRCID("images_text_S"), ImagesPanel::OnVarTextChanged ) + EVT_TEXT_ENTER ( XRCID("images_text_T"), ImagesPanel::OnVarTextChanged ) + EVT_TEXT_ENTER ( XRCID("images_text_R"), ImagesPanel::OnVarTextChanged ) + + EVT_CHECKBOX ( XRCID("images_check_link"), ImagesPanel::OnImageLinkChanged ) EVT_COMMAND (wxID_ANY, EVT_IMAGE_ADD, ImagesPanel::OnAddImages ) EVT_COMMAND (wxID_ANY, EVT_IMAGE_DEL, ImagesPanel::OnRemoveImages ) @@ -172,6 +178,10 @@ XRCCTRL(*this, "images_text_Y", wxTextCtrl)->PushEventHandler(new TextKillFocusHandler(this)); XRCCTRL(*this, "images_text_Z", wxTextCtrl)->PushEventHandler(new TextKillFocusHandler(this)); + XRCCTRL(*this, "images_text_S", wxTextCtrl)->PushEventHandler(new TextKillFocusHandler(this)); + XRCCTRL(*this, "images_text_T", wxTextCtrl)->PushEventHandler(new TextKillFocusHandler(this)); + XRCCTRL(*this, "images_text_R", wxTextCtrl)->PushEventHandler(new TextKillFocusHandler(this)); + m_empty.Create(0,0); // m_empty.LoadFile(huginApp::Get()->GetXRCPath() + // wxT("data/") + wxT("transparent.png"), @@ -215,6 +225,10 @@ XRCCTRL(*this, "images_text_X", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "images_text_Y", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "images_text_Z", wxTextCtrl)->PopEventHandler(true); + + XRCCTRL(*this, "images_text_S", wxTextCtrl)->PopEventHandler(true); + XRCCTRL(*this, "images_text_T", wxTextCtrl)->PopEventHandler(true); + XRCCTRL(*this, "images_text_R", wxTextCtrl)->PopEventHandler(true); /* delete(m_tkf); */ @@ -393,7 +407,7 @@ double val; - const char vars[] = "rpyXYZ"; + const char vars[] = "rpyXYZSTR"; for (const char * var = vars; *var; var++) { wxString ctrl_name(wxT("images_text_")); ctrl_name.Append(wxChar(*var)); @@ -407,10 +421,28 @@ // hack to add the T to the x. This should really use SrcPanoImage instead.. char name[4]; - if (*var > 'Z') { + if (*var > 'Z') { // var is 'r', 'p', or 'y' name[0] = *var; name[1] = 0; } else { - name[0] = 'T'; name[1]='r'; name[2]=*var; name[3] = 0; + if (*var > 'T') { // var is 'X', 'Y', or 'Z' + name[0] = 'T'; name[1]='r'; name[2]=*var; name[3] = 0; // variable name is TrX, TrY, TrZ + } + else { // var must be 'S', 'T', or 'R' + name[0] = 'T'; name[1]='e'; name[3] = 0; // variable name is Te0, Te1, Te2 (spin, tilt, rotate) + switch (*var) { + case 'S': + name[2] = '0'; + break; + case 'T': + name[2] = '1'; + break; + case 'R': + name[2] = '2'; + break; + } + + } + } if (!str2double(text, val)){ DEBUG_NOTICE("Value (" << text << ") for var " << name << " must be numeric."); @@ -524,6 +556,11 @@ XRCCTRL(*this, "images_text_X", wxTextCtrl) ->Disable(); XRCCTRL(*this, "images_text_Y", wxTextCtrl) ->Disable(); XRCCTRL(*this, "images_text_Z", wxTextCtrl) ->Disable(); + + XRCCTRL(*this, "images_text_S", wxTextCtrl) ->Disable(); + XRCCTRL(*this, "images_text_T", wxTextCtrl) ->Disable(); + XRCCTRL(*this, "images_text_R", wxTextCtrl) ->Disable(); + m_smallImgCtrl->SetBitmap(m_empty); m_smallImgCtrl->GetParent()->Layout(); m_smallImgCtrl->Refresh(); @@ -548,6 +585,12 @@ XRCCTRL(*this, "images_text_X", wxTextCtrl) ->Enable(); XRCCTRL(*this, "images_text_Y", wxTextCtrl) ->Enable(); XRCCTRL(*this, "images_text_Z", wxTextCtrl) ->Enable(); + + XRCCTRL(*this, "images_text_S", wxTextCtrl) ->Enable(); + XRCCTRL(*this, "images_text_T", wxTextCtrl) ->Enable(); + XRCCTRL(*this, "images_text_R", wxTextCtrl) ->Enable(); + + m_moveDownButton->Enable(); m_moveUpButton->Enable(); XRCCTRL(*this, "images_reset_pos", wxButton)->Enable(); @@ -582,6 +625,16 @@ val = doubleToString(const_map_get(vars,"TrZ").getValue(),m_degDigits); XRCCTRL(*this, "images_text_Z", wxTextCtrl) ->SetValue(wxString(val.c_str(), wxConvLocal)); + val = doubleToString(const_map_get(vars,"Te0").getValue(),m_degDigits); + XRCCTRL(*this, "images_text_S", wxTextCtrl) ->SetValue(wxString(val.c_str(), wxConvLocal)); + + val = doubleToString(const_map_get(vars,"Te1").getValue(),m_degDigits); + XRCCTRL(*this, "images_text_T", wxTextCtrl) ->SetValue(wxString(val.c_str(), wxConvLocal)); + + val = doubleToString(const_map_get(vars,"Te2").getValue(),m_degDigits); + XRCCTRL(*this, "images_text_R", wxTextCtrl) ->SetValue(wxString(val.c_str(), wxConvLocal)); + + m_linkCheckBox->SetValue(pano->getImage(imgNr).YawisLinked()); ShowExifInfo(imgNr); @@ -686,6 +739,10 @@ XRCCTRL(*this, "images_text_Y", wxTextCtrl) ->Clear(); XRCCTRL(*this, "images_text_Z", wxTextCtrl) ->Clear(); + XRCCTRL(*this, "images_text_S", wxTextCtrl) ->Clear(); + XRCCTRL(*this, "images_text_T", wxTextCtrl) ->Clear(); + XRCCTRL(*this, "images_text_R", wxTextCtrl) ->Clear(); + m_smallImgCtrl->SetBitmap(m_empty); m_smallImgCtrl->GetParent()->Layout(); m_smallImgCtrl->Refresh(); @@ -845,7 +902,12 @@ vars[i].insert(make_pair("r", Variable("r",pano->getSrcImage(*it).getExifOrientation()))); vars[i].insert(make_pair("TrX", Variable("TrX",0.0))); vars[i].insert(make_pair("TrY", Variable("TrY",0.0))); - vars[i].insert(make_pair("TrZ", Variable("TrZ",0.0))); + vars[i].insert(make_pair("TrZ", Variable("TrZ",1.0))); + + vars[i].insert(make_pair("Te0X", Variable("Te0",0.0))); + vars[i].insert(make_pair("Te1", Variable("Te1",0.0))); + vars[i].insert(make_pair("Te2", Variable("Te2",0.0))); + i++; } GlobalCmdHist::getInstance().addCommand( @@ -923,63 +985,63 @@ void ImagesPanel::OnMoveImageDown(wxCommandEvent & e) { UIntSet selImg = images_list->GetSelected(); - size_t num = selImg.size(); - if(num>0) - { - //last selected image - unsigned int i1 = *selImg.rbegin(); - //image to move into - unsigned int i2 = i1+1; - //Test if there is room to move images down - if (i2 < pano->getNrOfImages() ) - { - //Group repeated move commands within undo history - std::vector<PanoCommand*> cmds; - for (size_t i=0; i<num; i++) - { - cmds.push_back(new SwapImagesCmd(*pano,i2, i1)); - i1--; - i2--; - } - GlobalCmdHist::getInstance().addCommand( - new PT::CombinedPanoCommand(*pano, cmds)); - // set new selection - images_list->SelectImageRange(*selImg.begin()+1,*selImg.begin()+num); - // Bring the focus back to the button. - m_moveDownButton->SetFocus(); - }; - }; + size_t num = selImg.size(); + if(num>0) + { + //last selected image + unsigned int i1 = *selImg.rbegin(); + //image to move into + unsigned int i2 = i1+1; + //Test if there is room to move images down + if (i2 < pano->getNrOfImages() ) + { + //Group repeated move commands within undo history + std::vector<PanoCommand*> cmds; + for (size_t i=0; i<num; i++) + { + cmds.push_back(new SwapImagesCmd(*pano,i2, i1)); + i1--; + i2--; + } + GlobalCmdHist::getInstance().addCommand( + new PT::CombinedPanoCommand(*pano, cmds)); + // set new selection + images_list->SelectImageRange(*selImg.begin()+1,*selImg.begin()+num); + // Bring the focus back to the button. + m_moveDownButton->SetFocus(); + }; + }; }; void ImagesPanel::OnMoveImageUp(wxCommandEvent & e) { UIntSet selImg = images_list->GetSelected(); - size_t num = selImg.size(); - if(num>0) - { - //first selected image - size_t i1 = *selImg.begin(); - //image to move into. - size_t i2 = i1-1; - //Test if there is room to move images up - if (i1 > 0 ) - { - //Group repeated move commands within undo history - std::vector<PanoCommand*> cmds; - for (size_t i=0; i<num; i++) - { - cmds.push_back(new SwapImagesCmd(*pano,i2, i1)); - i1++; - i2++; - } - GlobalCmdHist::getInstance().addCommand( - new PT::CombinedPanoCommand(*pano, cmds)); - // set new selection - images_list->SelectImageRange(*selImg.begin()-1,*selImg.begin()+num-2); - // Bring the focus back to the button. - m_moveUpButton->SetFocus(); - }; - }; + size_t num = selImg.size(); + if(num>0) + { + //first selected image + size_t i1 = *selImg.begin(); + //image to move into. + size_t i2 = i1-1; + //Test if there is room to move images up + if (i1 > 0 ) + { + //Group repeated move commands within undo history + std::vector<PanoCommand*> cmds; + for (size_t i=0; i<num; i++) + { + cmds.push_back(new SwapImagesCmd(*pano,i2, i1)); + i1++; + i2++; + } + GlobalCmdHist::getInstance().addCommand( + new PT::CombinedPanoCommand(*pano, cmds)); + // set new selection + images_list->SelectImageRange(*selImg.begin()-1,*selImg.begin()+num-2); + // Bring the focus back to the button. + m_moveUpButton->SetFocus(); + }; + }; }; void ImagesPanel::ReloadCPDetectorSettings() diff -r 1e70b7c7f635 -r 1fab1b57ff76 src/hugin1/hugin/MainFrame.cpp --- a/src/hugin1/hugin/MainFrame.cpp Tue Jul 17 19:10:45 2012 -0500 +++ b/src/hugin1/hugin/MainFrame.cpp Tue Aug 14 09:35:40 2012 -0500 @@ -1877,7 +1877,7 @@ void MainFrame::RestoreLayoutOnNextResize() { - cout << "MainFrame::RestoreLayoutOnNextResize()" << endl; + //cout << "MainFrame::RestoreLayoutOnNextResize()" << endl; m_doRestoreLayout = true; //crop_panel->RestoreLayoutOnNextResize(); //images_panel->RestoreLayoutOnNextResize(); diff -r 1e70b7c7f635 -r 1fab1b57ff76 src/hugin1/hugin/OptimizePanel.cpp --- a/src/hugin1/hugin/OptimizePanel.cpp Tue Jul 17 19:10:45 2012 -0500 +++ b/src/hugin1/hugin/OptimizePanel.cpp Tue Aug 14 09:35:40 2012 -0500 @@ -133,30 +133,31 @@ topsizer->Add(panel, 1, wxEXPAND, 0); SetSizer( topsizer ); + // Dev: mosaic_params_sizer holds wxCheckListBox, wxStaticText titles, and all/none buttons + //m_mosaic_params_sizer->Add(topsizer,1,wxEXPAND,0); + //SetSizer( m_mosaic_params_sizer); + m_only_active_images_cb = XRCCTRL(*this, "optimizer_only_active_images", wxCheckBox); DEBUG_ASSERT(m_only_active_images_cb); m_only_active_images_cb->SetValue(wxConfigBase::Get()->Read(wxT("/OptimizePanel/OnlyActiveImages"),1l) != 0); + m_optPanelMosaicModeText = XRCCTRL(*this, "opt_panel_mosaic_text", wxStaticText); + m_yaw_list = XRCCTRL(*this, "optimizer_yaw_list", wxCheckListBox); m_pitch_list = XRCCTRL(*this, "optimizer_pitch_list", wxCheckListBox); m_roll_list = XRCCTRL(*this, "optimizer_roll_list", wxCheckListBox); - // Dev: Create checkbox lists for spin,tilt,rot - //m_spin_list = XRCCTRL(*this, "optimizer_spin_list", wxCheckListBox); - //m_tilt_list = XRCCTRL(*this, "optimizer_tilt_list", wxCheckListBox); - //m_rot_list = XRCCTRL(*this, "optimizer_rot_list", wxCheckListBox); - - + m_x_list = XRCCTRL(*this, "optimizer_x_list", wxCheckListBox); m_y_list = XRCCTRL(*this, "optimizer_y_list", wxCheckListBox); m_z_list = XRCCTRL(*this, "optimizer_z_list", wxCheckListBox); - m_spin_list = XRCCTRL(*this, "optimizer_spin_list", wxCheckListBox); + // Dev: Create checkbox lists for spin,tilt,rot + m_spin_list = XRCCTRL(*this, "optimizer_spin_list", wxCheckListBox); m_tilt_list = XRCCTRL(*this, "optimizer_tilt_list", wxCheckListBox); m_rot_list = XRCCTRL(*this, "optimizer_rot_list", wxCheckListBox); - m_v_list = XRCCTRL(*this, "optimizer_v_list", wxCheckListBox); m_a_list = XRCCTRL(*this, "optimizer_a_list", wxCheckListBox); m_b_list = XRCCTRL(*this, "optimizer_b_list", wxCheckListBox); @@ -334,6 +335,59 @@ } +// Dev: Hide all Mosaic optimization controls from Optimize Panel (see ShowMosaicOptControls()) +void OptimizePanel::HideMosaicOptControls() +{ + XRCCTRL(*this, "opt_panel_mosaic_text", wxStaticText)->SetLabel(wxString::Format(wxT("Hugin is in PANORAMA mode."))); + /*XRCCTRL(*this, "opt_spin_select", wxButton)->Hide(); + XRCCTRL(*this, "opt_tilt_select", wxButton)->Hide(); + XRCCTRL(*this, "opt_rot_select", wxButton)->Hide(); + + XRCCTRL(*this, "opt_spin_clear", wxButton)->Hide(); + XRCCTRL(*this, "opt_tilt_clear", wxButton)->Hide(); + XRCCTRL(*this, "opt_rot_clear", wxButton)->Hide(); + + XRCCTRL(*this, "opt_spin_label", wxStaticText)->Hide(); + XRCCTRL(*this, "opt_tilt_label", wxStaticText)->Hide(); + XRCCTRL(*this, "opt_rot_label", wxStaticText)->Hide(); + + m_spin_list->Hide(); + m_tilt_list->Hide(); + m_rot_list->Hide(); + */ + + //XRCCTRL(*this, "mosaic_params_sizer", wxBoxSizer)->Hide(*m_mosaic_params_sizer,false,true); + //m_mosaic_params_sizer->Show(this->m_mosaic_params_sizer,false,true); + //m_mosaic_params_sizer->Layout(); +} + +// Dev: Show all Mosaic optimization controls from Optimize Panel (see HideMosaicOptControls()) +void OptimizePanel::ShowMosaicOptControls() +{ + //m_mosaic_params_sizer->Show(*this,true); + //m_mosaic_params_sizer->Layout(); + + XRCCTRL(*this, "opt_spin_select", wxButton)->Show(); + XRCCTRL(*this, "opt_tilt_select", wxButton)->Show(); + XRCCTRL(*this, "opt_rot_select", wxButton)->Show(); + + XRCCTRL(*this, "opt_spin_clear", wxButton)->Show(); + XRCCTRL(*this, "opt_tilt_clear", wxButton)->Show(); + XRCCTRL(*this, "opt_rot_clear", wxButton)->Show(); + + XRCCTRL(*this, "opt_spin_label", wxStaticText)->Show(); + XRCCTRL(*this, "opt_tilt_label", wxStaticText)->Show(); + XRCCTRL(*this, "opt_rot_label", wxStaticText)->Show(); + + m_spin_list->Show(); + m_tilt_list->Show(); + m_rot_list->Show(); +} + + + + + OptimizeVector OptimizePanel::getOptimizeVector() { @@ -416,9 +470,23 @@ variable_groups->update(); setOptimizeVector(pano.getOptimizeVector()); + //Dev + if (m_pano->isMosaicNotPano()) { + //cout << "Dev: mosaic not pano flag TRUE in OptimizePanel::panoramaChanged()" << endl; + m_mode_cb->SetSelection(OPT_STR_XYZ); // 11 == Dev's mosaic mode + XRCCTRL(*this, "opt_panel_mosaic_text", wxStaticText)->SetLabel(wxString::Format(wxT("Hugin is in MOSAIC mode."))); + } + else { + XRCCTRL(*this, "opt_panel_mosaic_text", wxStaticText)->SetLabel(wxString::Format(wxT("Hugin is in PANORAMA mode."))); + } + + // update accordingly to the choosen mode wxCommandEvent dummy; dummy.SetInt(m_mode_cb->GetSelection()); + + //cout << "Dev: in OptimizePanel::panoramaChanged(), m_mode_cb = " << m_mode_cb->GetSelection() << endl; + OnChangeMode(dummy); } @@ -626,7 +694,15 @@ void OptimizePanel::setModeCustom() |