45 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"mask_load_dialog"));
48 wxIconBundle myIcons(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.ico"),wxBITMAP_TYPE_ICO);
51 wxIcon myIcon(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.png"),wxBITMAP_TYPE_PNG);
56 m_image->setPreviewOnly();
58 wxColour defaultColour;
60 wxColour colour=wxConfigBase::Get()->Read(wxT(
"/MaskEditorPanel/ColourPolygonNegative"),defaultColour.GetAsString(wxC2S_HTML_SYNTAX));
61 m_image->SetUserColourPolygonNegative(colour);
63 colour=wxConfigBase::Get()->Read(wxT(
"/MaskEditorPanel/ColourPolygonPositive"),defaultColour.GetAsString(wxC2S_HTML_SYNTAX));
64 m_image->SetUserColourPolygonPositive(colour);
66 colour=wxConfigBase::Get()->Read(wxT(
"/MaskEditorPanel/ColourPointSelected"),defaultColour.GetAsString(wxC2S_HTML_SYNTAX));
67 m_image->SetUserColourPointSelected(colour);
69 colour=wxConfigBase::Get()->Read(wxT(
"/MaskEditorPanel/ColourPointUnselected"),defaultColour.GetAsString(wxC2S_HTML_SYNTAX));
70 m_image->SetUserColourPointUnselected(colour);
72 m_maskScaleMode=XRCCTRL(*
this,
"mask_rescale",wxRadioBox);
73 m_maskRotateMode=XRCCTRL(*
this,
"mask_rotate",wxRadioBox);
76 if(GetSize().GetWidth()<400)
77 SetClientSize(400,GetSize().GetHeight());
100 XRCCTRL(*
this,
"label_image_size",wxStaticText)->SetLabel(wxString::Format(wxT(
"%d x %d"),
m_imageSize.width(),
m_imageSize.height()));
101 XRCCTRL(*
this,
"label_mask_size",wxStaticText)->SetLabel(wxString::Format(wxT(
"%d x %d"),
m_maskSize.width(),
m_maskSize.height()));
105 wxCommandEvent dummy;
wxRadioBox * m_maskScaleMode
const int maskOffset
polygon can exceed the image maximal maskOffset pixels in each direction bigger polygons will be clip...
include file for the hugin project
static huginApp * Get()
hack.. kind of a pseudo singleton...
HuginBase::MaskPolygonVector m_processedMask
wxRadioBox * m_maskRotateMode
void setImage(const std::string &filename, HuginBase::MaskPolygonVector newMask, HuginBase::MaskPolygonVector masksToDraw, ImageRotation rot)
set the current image and mask list, this loads also the image from cache
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename)
Store window size and position in configfile/registry.
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename)
Restore window size and position from configfile/registry.
std::vector< MaskPolygon > MaskPolygonVector
virtual ~MaskLoadDialog()
#define HUGIN_MASK_COLOUR_POINT_UNSELECTED
Dialog for loading masks.
void setNewMasks(HuginBase::MaskPolygonVector newMasks, HuginBase::MaskPolygonVector masksToDraw)
updates masks for currently selected image
include file for the hugin project
void UpdatePreviewImage()
void setScale(double factor)
set the scaling factor for mask editing display.
#define HUGIN_MASK_COLOUR_POINT_SELECTED
#define HUGIN_MASK_COLOUR_POLYGON_NEGATIVE
void ProcessMask(wxCommandEvent &e)
Definition of mask load dialog.
vigra::Size2D m_imageSize
#define HUGIN_MASK_COLOUR_POLYGON_POSITIVE
All variables of a source image.
void initValues(const HuginBase::SrcPanoImage image, const HuginBase::MaskPolygonVector newMask, const vigra::Size2D maskSize)
sets the default values
HuginBase::MaskPolygonVector m_loadedMask