[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MaskImageCtrl Class Reference

mask editor More...

#include <MaskImageCtrl.h>

List of all members.

Public Types

enum  ImageRotation { ROT0 = 0, ROT90, ROT180, ROT270 }
 image rotation. More...

Public Member Functions

 MaskImageCtrl ()
 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 (MaskEditorPanel *parent)
void setPreviewOnly ()
 if called, the mouse handlers are deactivated
void setImage (const std::string &filename, HuginBase::MaskPolygonVector newMask, ImageRotation rot)
 set the current image and mask list, this loads also the image from cache
void setNewMasks (HuginBase::MaskPolygonVector newMasks)
 updates masks for currently selected image
void setActiveMask (unsigned int newMask, bool doUpdate=true)
 mark mask with image as beeing editing
HuginBase::MaskPolygonVector getNewMask () const
 returns the vector of all mask (including new created mask)
void selectAllMarkers ()
 select all points of active mask
void mouseMoveEvent (wxMouseEvent &mouse)
 event handler when mouse is moving
void mousePressLMBEvent (wxMouseEvent &mouse)
 event handler when left mouse button is pressed
void mouseReleaseLMBEvent (wxMouseEvent &mouse)
 event handler when right mouse button is released
void mouseDblClickLeftEvent (wxMouseEvent &mouse)
 event handler for left double click
void mousePressRMBEvent (wxMouseEvent &mouse)
 event handler when right mouse button is pressed
void mouseReleaseRMBEvent (wxMouseEvent &mouse)
 event handler when right mouse button is released
void OnKeyUp (wxKeyEvent &e)
 event handler for keyboard
void OnCaptureLost (wxMouseCaptureLostEvent &e)
 event handler, when mouse capture is lost, e.g.
void OnKillFocus (wxFocusEvent &e)
 event handler, when editor lost focus, mainly cancels creating new polygon
void startNewPolygon ()
 starts creating a new polygon
wxSize DoGetBestSize () const
 returns size of currently scaled image
void setScale (double factor)
 set the scaling factor for mask editing display.
double getScale ()
 return scale factor, 0 for autoscale
ImageRotation getCurrentRotation ()
 returns the current rotation of displayed image
void update ()
 initiate redraw
void SetUserColourPolygonNegative (wxColour newColour)
 sets the colour for different parts
void SetUserColourPolygonPositive (wxColour newColour)
void SetUserColourPointSelected (wxColour newColour)
void SetUserColourPointUnselected (wxColour newColour)

Protected Member Functions

void OnDraw (wxDC &dc)
 drawing routine
void OnSize (wxSizeEvent &e)
 handler called when size of control was changed
double getScaleFactor () const
 get scale factor (calculates factor when fit to window is active)
double calcAutoScaleFactor (wxSize size)
 calculate new scale factor for this image
void rescaleImage ()
 rescale the image


Detailed Description

mask editor

This class handles all mask editing.


Member Enumeration Documentation

enum MaskImageCtrl::ImageRotation
 

image rotation.

Useful to display images depending on their roll setting. rotation is clockwise

Enumeration values:
ROT0 
ROT90 
ROT180 
ROT270 


Constructor & Destructor Documentation

MaskImageCtrl::MaskImageCtrl  )  [inline]
 

ctor.


Member Function Documentation

double MaskImageCtrl::calcAutoScaleFactor wxSize  size  )  [protected]
 

calculate new scale factor for this image

bool MaskImageCtrl::Create wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel")
 

wxSize MaskImageCtrl::DoGetBestSize  )  const
 

returns size of currently scaled image

ImageRotation MaskImageCtrl::getCurrentRotation  )  [inline]
 

returns the current rotation of displayed image

HuginBase::MaskPolygonVector MaskImageCtrl::getNewMask  )  const [inline]
 

returns the vector of all mask (including new created mask)

double MaskImageCtrl::getScale  )  [inline]
 

return scale factor, 0 for autoscale

double MaskImageCtrl::getScaleFactor  )  const [protected]
 

get scale factor (calculates factor when fit to window is active)

void MaskImageCtrl::Init MaskEditorPanel parent  ) 
 

void MaskImageCtrl::mouseDblClickLeftEvent wxMouseEvent &  mouse  ) 
 

event handler for left double click

void MaskImageCtrl::mouseMoveEvent wxMouseEvent &  mouse  ) 
 

event handler when mouse is moving

void MaskImageCtrl::mousePressLMBEvent wxMouseEvent &  mouse  ) 
 

event handler when left mouse button is pressed

void MaskImageCtrl::mousePressRMBEvent wxMouseEvent &  mouse  ) 
 

event handler when right mouse button is pressed

void MaskImageCtrl::mouseReleaseLMBEvent wxMouseEvent &  mouse  ) 
 

event handler when right mouse button is released

void MaskImageCtrl::mouseReleaseRMBEvent wxMouseEvent &  mouse  ) 
 

event handler when right mouse button is released

void MaskImageCtrl::OnCaptureLost wxMouseCaptureLostEvent &  e  ) 
 

event handler, when mouse capture is lost, e.g.

user click outside of window cancels creating of new mask

void MaskImageCtrl::OnDraw wxDC &  dc  )  [protected]
 

drawing routine

void MaskImageCtrl::OnKeyUp wxKeyEvent &  e  ) 
 

event handler for keyboard

void MaskImageCtrl::OnKillFocus wxFocusEvent &  e  ) 
 

event handler, when editor lost focus, mainly cancels creating new polygon

void MaskImageCtrl::OnSize wxSizeEvent &  e  )  [protected]
 

handler called when size of control was changed

void MaskImageCtrl::rescaleImage  )  [protected]
 

rescale the image

void MaskImageCtrl::selectAllMarkers  ) 
 

select all points of active mask

void MaskImageCtrl::setActiveMask unsigned int  newMask,
bool  doUpdate = true
 

mark mask with image as beeing editing

void MaskImageCtrl::setImage const std::string &  filename,
HuginBase::MaskPolygonVector  newMask,
ImageRotation  rot
 

set the current image and mask list, this loads also the image from cache

void MaskImageCtrl::setNewMasks HuginBase::MaskPolygonVector  newMasks  ) 
 

updates masks for currently selected image

void MaskImageCtrl::setPreviewOnly  )  [inline]
 

if called, the mouse handlers are deactivated

void MaskImageCtrl::setScale double  factor  ) 
 

set the scaling factor for mask editing display.

Parameters:
factor zoom factor, 0 means fit to window.

void MaskImageCtrl::SetUserColourPointSelected wxColour  newColour  )  [inline]
 

void MaskImageCtrl::SetUserColourPointUnselected wxColour  newColour  )  [inline]
 

void MaskImageCtrl::SetUserColourPolygonNegative wxColour  newColour  )  [inline]
 

sets the colour for different parts

void MaskImageCtrl::SetUserColourPolygonPositive wxColour  newColour  )  [inline]
 

void MaskImageCtrl::startNewPolygon  ) 
 

starts creating a new polygon

void MaskImageCtrl::update  ) 
 

initiate redraw


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

Generated on Mon Sep 20 01:01:34 2010 for Hugintrunk by doxygen 1.3.9.1