#include <MaskEditorPanel.h>
Inheritance diagram for MaskEditorPanel:

Public Member Functions | |
| MaskEditorPanel () | |
| ctor. | |
| 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 (PT::Panorama *pano) |
| virtual | ~MaskEditorPanel () |
| dtor. | |
| void | SetPano (PT::Panorama *panorama) |
| void | setImage (unsigned int imgNr, bool updateListSelection=false) |
| sets the image, which is currently edited | |
| void | setMask (unsigned int maskNr) |
| sets active mask number, set to UINT_MAX, if no mask is currently editing | |
| void | UpdateMask () |
| called when mask where changed in MaskImageCtrl | |
| void | AddMask () |
| called when new mask added in MaskImageCtrl | |
| void | SelectMask (unsigned int newMaskNr) |
| selects the mask with index newMaskNr in the listbox | |
| void | UpdateCrop (bool updateFromImgCtrl=false) |
| updated the crop in the Panorama object with the current values from GUI | |
| void | UpdateCropFromImage () |
| updates the displayed crop in the text boxes (for dragging) | |
| void | panoramaChanged (PT::Panorama &pano) |
| called when the panorama changes and we should update our display | |
| void | panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet &imgNr) |
| void | OnImageSelect (wxListEvent &e) |
| called when user selected an other image | |
| void | OnMaskSelect (wxListEvent &e) |
| called when user selected an other mask | |
| void | OnMaskTypeChange (wxCommandEvent &e) |
| handler when mask type was changed | |
| void | OnMaskAdd (wxCommandEvent &e) |
| called when user wants to create new polygon | |
| void | OnMaskSave (wxCommandEvent &e) |
| called when user wants to save active mask | |
| void | OnMaskLoad (wxCommandEvent &e) |
| called when user wants to load a mask into the selected image | |
| void | OnMaskCopy (wxCommandEvent &e) |
| called when user wants to copy a mask to clipboard | |
| void | OnMaskPaste (wxCommandEvent &e) |
| called when user wants to paste a mask from clipboard | |
| void | OnMaskDelete (wxCommandEvent &e) |
| called when user wants to delete active mask | |
| void | OnZoom (wxCommandEvent &e) |
| sets the actual zoom factor | |
| void | OnColourChanged (wxColourPickerEvent &e) |
| event handler for changing colours | |
| void | OnShowActiveMasks (wxCommandEvent &e) |
| event handler for changing option if active masks should be drawn | |
| void | OnResetButton (wxCommandEvent &e) |
| void | OnSetLeft (wxCommandEvent &e) |
| void | OnSetRight (wxCommandEvent &e) |
| void | OnSetTop (wxCommandEvent &e) |
| void | OnSetBottom (wxCommandEvent &e) |
| void | OnAutoCenter (wxCommandEvent &e) |
| void | OnModeChanged (wxNotebookEvent &e) |
Private Member Functions | |
| void | UpdateMaskList (bool restoreSelection=false) |
| updates the display after another image has been selected. | |
| unsigned int | GetSelectedMask () |
| return index of currently selected masks, return UINT_MAX if no mask is selected | |
| void | OnColumnWidthChange (wxListEvent &e) |
| called, when column with of mask list box was changed | |
| MaskImageCtrl::ImageRotation | GetRot (const unsigned int imgNr) |
| determines, if the image should be rotated for display | |
| void | DisplayCrop (int imgNr) |
| copies the crop information from the Panorama object to GUI | |
| void | UpdateCropDisplay () |
| update GUI display | |
| void | CenterCrop () |
| size_t | GetImgNr () |
| DECLARE_EVENT_TABLE () | |
Private Attributes | |
| MaskImageCtrl * | m_editImg |
| ImagesListMask * | m_imagesListMask |
| wxListCtrl * | m_maskList |
| wxChoice * | m_maskType |
| wxNotebook * | m_maskCropCtrl |
| PT::Panorama * | m_pano |
| HuginBase::MaskPolygonVector | m_currentMasks |
| HuginBase::MaskPolygon::MaskType | m_defaultMaskType |
| bool | m_maskMode |
| HuginBase::UIntSet | m_selectedImages |
| unsigned int | m_MaskNr |
| std::string | m_File |
| wxTextCtrl * | m_left_textctrl |
| wxTextCtrl * | m_right_textctrl |
| wxTextCtrl * | m_top_textctrl |
| wxTextCtrl * | m_bottom_textctrl |
| wxCheckBox * | m_autocenter_cb |
| HuginBase::SrcPanoImage::CropMode | m_cropMode |
| vigra::Rect2D | m_cropRect |
| bool | m_autoCenterCrop |
| vigra::Point2D | m_cropCenter |
This panel is used to create/change/edit masks
Definition at line 44 of file MaskEditorPanel.h.
|
|
ctor.
|
|
|
dtor.
Definition at line 208 of file MaskEditorPanel.cpp. References DEBUG_TRACE, m_bottom_textctrl, m_defaultMaskType, m_left_textctrl, m_pano, m_right_textctrl, m_top_textctrl, and HuginBase::Panorama::removeObserver(). |
|
|
called when new mask added in MaskImageCtrl
Definition at line 317 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), GetImgNr(), GlobalCmdHist::getInstance(), MaskImageCtrl::getNewMask(), m_currentMasks, m_defaultMaskType, m_editImg, m_pano, MaskImageCtrl::selectAllMarkers(), and SelectMask(). Referenced by MaskImageCtrl::OnLeftMouseDblClick(), and MaskImageCtrl::OnRightMouseUp(). |
|
|
Definition at line 883 of file MaskEditorPanel.cpp. References m_cropCenter, and m_cropRect. Referenced by OnAutoCenter(), OnSetBottom(), OnSetLeft(), OnSetRight(), and OnSetTop(). |
|
||||||||||||||||||||||||||||
|
|
|
|
|
copies the crop information from the Panorama object to GUI
Definition at line 730 of file MaskEditorPanel.cpp. References HuginBase::Panorama::getImage(), m_autoCenterCrop, m_cropCenter, m_cropMode, m_cropRect, m_pano, hugin_utils::roundi(), and UpdateCropDisplay(). Referenced by OnImageSelect(), and panoramaImagesChanged(). |
|
|
Definition at line 220 of file MaskEditorPanel.cpp. References m_selectedImages. Referenced by AddMask(), OnImageSelect(), OnMaskAdd(), OnMaskCopy(), OnMaskDelete(), OnMaskLoad(), OnMaskPaste(), OnMaskSave(), OnMaskTypeChange(), OnModeChanged(), panoramaImagesChanged(), SelectMask(), setImage(), setMask(), UpdateMask(), and UpdateMaskList(). |
|
|
determines, if the image should be rotated for display
Definition at line 687 of file MaskEditorPanel.cpp. References HuginBase::Panorama::getImage(), and m_pano. Referenced by setImage(). |
|
|
return index of currently selected masks, return UINT_MAX if no mask is selected
Definition at line 671 of file MaskEditorPanel.cpp. References m_maskList. Referenced by OnMaskSelect(), and UpdateMaskList(). |
|
|
Definition at line 200 of file MaskEditorPanel.cpp. References HuginBase::Panorama::addObserver(), ImagesListMask::Init(), m_imagesListMask, and m_pano. |
|
|
Definition at line 872 of file MaskEditorPanel.cpp. References CenterCrop(), m_autoCenterCrop, UpdateCrop(), and UpdateCropDisplay(). |
|
|
event handler for changing colours
Definition at line 605 of file MaskEditorPanel.cpp. References m_editImg, MaskImageCtrl::SetUserColourPointSelected(), MaskImageCtrl::SetUserColourPointUnselected(), MaskImageCtrl::SetUserColourPolygonNegative(), and MaskImageCtrl::SetUserColourPolygonPositive(). |
|
|
called, when column with of mask list box was changed
Definition at line 681 of file MaskEditorPanel.cpp. References m_maskList. |
|
|
called when user selected an other image
Definition at line 379 of file MaskEditorPanel.cpp. References DisplayCrop(), GetImgNr(), ImagesList::GetSelected(), m_bottom_textctrl, m_imagesListMask, m_left_textctrl, m_right_textctrl, m_selectedImages, m_top_textctrl, setImage(), and setMask(). |
|
|
called when user wants to create new polygon
Definition at line 413 of file MaskEditorPanel.cpp. References MainFrame::Get(), GetImgNr(), m_editImg, m_maskList, m_MaskNr, setMask(), and MaskImageCtrl::startNewPolygon(). |
|
|
called when user wants to copy a mask to clipboard
Definition at line 502 of file MaskEditorPanel.cpp. References HuginBase::Panorama::getImage(), GetImgNr(), m_currentMasks, m_MaskNr, m_pano, and HuginBase::SaveMaskToStream(). |
|
|
called when user wants to delete active mask
Definition at line 560 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), GetImgNr(), GlobalCmdHist::getInstance(), m_MaskNr, and m_pano. Referenced by MaskImageCtrl::OnKeyUp(). |
|
|
called when user wants to load a mask into the selected image
Definition at line 458 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), MainFrame::Get(), HuginBase::Panorama::getImage(), GetImgNr(), GlobalCmdHist::getInstance(), MaskLoadDialog::getProcessedMask(), HUGIN_CONV_FILENAME, MaskLoadDialog::initValues(), HuginBase::LoadMaskFromStream(), m_currentMasks, and m_pano. |
|
|
called when user wants to paste a mask from clipboard
Definition at line 518 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), HuginBase::Panorama::getImage(), GetImgNr(), GlobalCmdHist::getInstance(), MaskLoadDialog::getProcessedMask(), MaskLoadDialog::initValues(), HuginBase::LoadMaskFromStream(), m_currentMasks, and m_pano. |
|
|
called when user wants to save active mask
Definition at line 426 of file MaskEditorPanel.cpp. References HuginBase::Panorama::getImage(), GetImgNr(), HUGIN_CONV_FILENAME, m_currentMasks, m_MaskNr, m_pano, and HuginBase::SaveMaskToStream(). |
|
|
called when user selected an other mask
Definition at line 398 of file MaskEditorPanel.cpp. References GetSelectedMask(), and setMask(). |
|
|
handler when mask type was changed
Definition at line 403 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), GetImgNr(), GlobalCmdHist::getInstance(), m_currentMasks, m_defaultMaskType, m_MaskNr, and m_pano. |
|
|
Definition at line 890 of file MaskEditorPanel.cpp. References GetImgNr(), m_editImg, m_imagesListMask, m_maskCropCtrl, m_maskMode, m_selectedImages, SelectMask(), ImagesList::SelectSingleImage(), MaskImageCtrl::SetMaskMode(), and ImagesListMask::SetSingleSelect(). |
|
|
Definition at line 861 of file MaskEditorPanel.cpp. References m_autoCenterCrop, m_cropMode, m_cropRect, UpdateCrop(), and UpdateCropDisplay(). |
|
|
Definition at line 804 of file MaskEditorPanel.cpp. References CenterCrop(), m_bottom_textctrl, m_cropRect, UpdateCrop(), and UpdateCropDisplay(). |
|
|
Definition at line 823 of file MaskEditorPanel.cpp. References CenterCrop(), m_cropRect, m_left_textctrl, UpdateCrop(), and UpdateCropDisplay(). |
|
|
Definition at line 842 of file MaskEditorPanel.cpp. References CenterCrop(), m_cropRect, m_right_textctrl, UpdateCrop(), and UpdateCropDisplay(). |
|
|
Definition at line 785 of file MaskEditorPanel.cpp. References CenterCrop(), m_cropRect, m_top_textctrl, UpdateCrop(), and UpdateCropDisplay(). |
|
|
event handler for changing option if active masks should be drawn
Definition at line 725 of file MaskEditorPanel.cpp. References m_editImg, and MaskImageCtrl::setDrawingActiveMasks(). |
|
|
sets the actual zoom factor
Definition at line 571 of file MaskEditorPanel.cpp. References DEBUG_ERROR, m_editImg, and MaskImageCtrl::setScale(). Referenced by Create(). |
|
|
called when the panorama changes and we should update our display
Definition at line 339 of file MaskEditorPanel.cpp. |
|
||||||||||||
|
Definition at line 343 of file MaskEditorPanel.cpp. References DisplayCrop(), HuginBase::Panorama::getImage(), GetImgNr(), HuginBase::Panorama::getNrOfImages(), m_currentMasks, m_selectedImages, SelectMask(), set_contains(), setImage(), and UpdateCropDisplay(). |
|
|
selects the mask with index newMaskNr in the listbox
Definition at line 330 of file MaskEditorPanel.cpp. References GetImgNr(), m_currentMasks, m_maskList, and m_MaskNr. Referenced by AddMask(), MaskImageCtrl::FindPolygon(), OnModeChanged(), and panoramaImagesChanged(). |
|
||||||||||||
|
sets the image, which is currently edited
Definition at line 232 of file MaskEditorPanel.cpp. References DEBUG_TRACE, hugin_utils::FDiff2D, MaskImageCtrl::getCurrentRotation(), HuginBase::Panorama::getImage(), GetImgNr(), HuginBase::SrcPanoImage::getRadialDistortionCenter(), GetRot(), HuginBase::SrcPanoImage::isCircularCrop(), m_currentMasks, m_editImg, m_File, m_imagesListMask, m_MaskNr, m_pano, m_selectedImages, ImagesList::SelectSingleImage(), MaskImageCtrl::setCrop(), MaskImageCtrl::setImage(), setMask(), MaskImageCtrl::setNewMasks(), and UpdateMaskList(). Referenced by OnImageSelect(), panoramaImagesChanged(), and MainFrame::ShowMaskEditor(). |
|
|
sets active mask number, set to UINT_MAX, if no mask is currently editing
Definition at line 294 of file MaskEditorPanel.cpp. References GetImgNr(), m_currentMasks, m_defaultMaskType, m_editImg, m_MaskNr, m_maskType, and MaskImageCtrl::setActiveMask(). Referenced by OnImageSelect(), OnMaskAdd(), OnMaskSelect(), and setImage(). |
|
|
Definition at line 59 of file MaskEditorPanel.h. References m_pano. |
|
|
updated the crop in the Panorama object with the current values from GUI
Definition at line 746 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), MaskImageCtrl::getCrop(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getSrcImage(), m_autoCenterCrop, m_cropRect, m_editImg, m_pano, m_selectedImages, HuginBase::BaseSrcPanoImage::setAutoCenterCrop(), and HuginBase::BaseSrcPanoImage::setCropRect(). Referenced by OnAutoCenter(), MaskImageCtrl::OnLeftMouseUp(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), and OnSetTop(). |
|
|
update GUI display
Definition at line 774 of file MaskEditorPanel.cpp. References DEBUG_TRACE, m_autocenter_cb, m_autoCenterCrop, m_bottom_textctrl, m_cropRect, m_left_textctrl, m_right_textctrl, and m_top_textctrl. Referenced by DisplayCrop(), OnAutoCenter(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), OnSetTop(), panoramaImagesChanged(), and UpdateCropFromImage(). |
|
|
updates the displayed crop in the text boxes (for dragging)
Definition at line 767 of file MaskEditorPanel.cpp. References MaskImageCtrl::getCrop(), m_cropRect, m_editImg, and UpdateCropDisplay(). Referenced by MaskImageCtrl::OnMouseMove(). |
|
|
called when mask where changed in MaskImageCtrl
Definition at line 308 of file MaskEditorPanel.cpp. References CommandHistory::addCommand(), GetImgNr(), GlobalCmdHist::getInstance(), MaskImageCtrl::getNewMask(), m_currentMasks, m_editImg, and m_pano. Referenced by MaskImageCtrl::OnKeyUp(), MaskImageCtrl::OnLeftMouseUp(), and MaskImageCtrl::OnRightMouseUp(). |
|
|
updates the display after another image has been selected. updates mask list and editor panel Definition at line 632 of file MaskEditorPanel.cpp. References GetImgNr(), GetSelectedMask(), m_currentMasks, m_maskList, and m_maskType. Referenced by setImage(). |
|
|
Definition at line 172 of file MaskEditorPanel.h. Referenced by Create(), and UpdateCropDisplay(). |
|
|
Definition at line 175 of file MaskEditorPanel.h. Referenced by DisplayCrop(), OnAutoCenter(), OnResetButton(), UpdateCrop(), and UpdateCropDisplay(). |
|
|
Definition at line 171 of file MaskEditorPanel.h. Referenced by Create(), OnImageSelect(), OnSetBottom(), UpdateCropDisplay(), and ~MaskEditorPanel(). |
|
|
Definition at line 176 of file MaskEditorPanel.h. Referenced by CenterCrop(), and DisplayCrop(). |
|
|
Definition at line 173 of file MaskEditorPanel.h. Referenced by DisplayCrop(), and OnResetButton(). |
|
|
Definition at line 174 of file MaskEditorPanel.h. Referenced by CenterCrop(), DisplayCrop(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), OnSetTop(), UpdateCrop(), UpdateCropDisplay(), and UpdateCropFromImage(). |
|
|
Definition at line 156 of file MaskEditorPanel.h. Referenced by AddMask(), OnMaskCopy(), OnMaskLoad(), OnMaskPaste(), OnMaskSave(), OnMaskTypeChange(), panoramaImagesChanged(), SelectMask(), setImage(), setMask(), UpdateMask(), and UpdateMaskList(). |
|
|
Definition at line 157 of file MaskEditorPanel.h. Referenced by AddMask(), Create(), OnMaskTypeChange(), setMask(), and ~MaskEditorPanel(). |
|
|
Definition at line 147 of file MaskEditorPanel.h. Referenced by AddMask(), Create(), OnColourChanged(), OnMaskAdd(), OnModeChanged(), OnShowActiveMasks(), OnZoom(), setImage(), setMask(), UpdateCrop(), UpdateCropFromImage(), and UpdateMask(). |
|
|
Definition at line 165 of file MaskEditorPanel.h. Referenced by Create(), and setImage(). |
|
|
Definition at line 148 of file MaskEditorPanel.h. Referenced by Create(), Init(), OnImageSelect(), OnModeChanged(), and setImage(). |
|
|
Definition at line 168 of file MaskEditorPanel.h. Referenced by Create(), OnImageSelect(), OnSetLeft(), UpdateCropDisplay(), and ~MaskEditorPanel(). |
|
|
Definition at line 151 of file MaskEditorPanel.h. Referenced by Create(), and OnModeChanged(). |
|
|
Definition at line 149 of file MaskEditorPanel.h. Referenced by Create(), GetSelectedMask(), OnColumnWidthChange(), OnMaskAdd(), SelectMask(), and UpdateMaskList(). |
|
|
Definition at line 159 of file MaskEditorPanel.h. Referenced by Create(), and OnModeChanged(). |
|
|
Definition at line 163 of file MaskEditorPanel.h. Referenced by Create(), OnMaskAdd(), OnMaskCopy(), OnMaskDelete(), OnMaskSave(), OnMaskTypeChange(), SelectMask(), setImage(), and setMask(). |
|
|
Definition at line 150 of file MaskEditorPanel.h. Referenced by Create(), setMask(), and UpdateMaskList(). |
|
|
Definition at line 154 of file MaskEditorPanel.h. Referenced by AddMask(), DisplayCrop(), GetRot(), Init(), OnMaskCopy(), OnMaskDelete(), OnMaskLoad(), OnMaskPaste(), OnMaskSave(), OnMaskTypeChange(), setImage(), SetPano(), UpdateCrop(), UpdateMask(), and ~MaskEditorPanel(). |
|
|
Definition at line 169 of file MaskEditorPanel.h. Referenced by Create(), OnImageSelect(), OnSetRight(), UpdateCropDisplay(), and ~MaskEditorPanel(). |
|
|
Definition at line 161 of file MaskEditorPanel.h. Referenced by Create(), GetImgNr(), OnImageSelect(), OnModeChanged(), panoramaImagesChanged(), setImage(), and UpdateCrop(). |
|
|
Definition at line 170 of file MaskEditorPanel.h. Referenced by Create(), OnImageSelect(), OnSetTop(), UpdateCropDisplay(), and ~MaskEditorPanel(). |
1.3.9.1