HuginBase::MaskPolygon Class Reference
base class, which stores one polygon More...
#include <Mask.h>
Public Types | |
| enum | MaskType { Mask_negative = 0, Mask_positive = 1 } |
| enumeration with type of possible masks More... | |
Public Member Functions | |
| MaskPolygon () | |
| constructor | |
| bool | isInside (const FDiff2D p) const |
| checks if given point is inside of the stored polygon | |
| int | getWindingNumber (const FDiff2D p) const |
| returns the winding number of the polygon around point p | |
| int | getTotalWindingNumber () const |
| returns the total winding number of the polygon | |
| MaskType | getMaskType () const |
| returns mask type | |
| void | setMaskType (const MaskType newType) |
| sets mask type | |
| VectorPolygon | getMaskPolygon () const |
| returns vector with coordinates of the polygon | |
| void | setMaskPolygon (const VectorPolygon newMask) |
| set complete vector wit all corrdinates of the polygon | |
| unsigned int | getImgNr () const |
| returns the associated image number, only used when loading a project, otherwise discarded | |
| void | setImgNr (const unsigned int newImgNr) |
| sets the associated image number, only used when loading a project, otherwise discarded | |
| void | setInverted (const bool inverted) |
| set mask to normal or inverted | |
| bool | isInverted () const |
| returns if mask is inverted | |
| void | addPoint (const FDiff2D p) |
| adds point at the end to the polygon | |
| void | insertPoint (const unsigned int index, const FDiff2D p) |
| insert point at the position index into the polygon | |
| void | removePoint (const unsigned int index) |
| removes point at the position index from the polygon | |
| void | movePointTo (const unsigned int index, const FDiff2D p) |
| moves the point at position index to the new absolute position p | |
| void | movePointBy (const unsigned int index, const FDiff2D diff) |
| relativ moves the point at position index by diff | |
| void | scale (const double factorx, const double factory) |
| scales all polygon coordinates by factorx for x position and factory for y position | |
| void | scale (const double factor) |
| scales x and y axis equally by factor | |
| void | transformPolygon (const PTools::Transform &trans) |
| transforms the polygon coordinates by the given transformation | |
| bool | clipPolygon (const vigra::Rect2D rect) |
| clips the polygon to the given rectangle | |
| void | rotate90 (bool clockwise, unsigned int maskWidth, unsigned int maskHeight) |
| rotate the polygon by 90 degrees | |
| void | subSample (const double max_distance) |
| subsamples the polygon, so that the longest distance between 2 points is max_distance | |
| unsigned int | FindPointNearPos (const FDiff2D p, const double tol) |
| search a point which lies near the polygon line and return the index for inserting the new point | |
| MaskPolygon & | operator= (const MaskPolygon otherPoly) |
| assign operator | |
| const bool | operator== (const MaskPolygon &otherPoly) const |
| comparision operator | |
| bool | parsePolygonString (const std::string polygonStr) |
| parses the x and y positions from the given string | |
| void | printPolygonLine (std::ostream &o, const unsigned int newImgNr) const |
| writes the complete k line which describes the mask to the stream, using the given newImgNr for the i parameter | |
Detailed Description
base class, which stores one polygon
Member Enumeration Documentation
|
|
enumeration with type of possible masks
|
Constructor & Destructor Documentation
|
|
constructor
|
Member Function Documentation
|
|
adds point at the end to the polygon
|
|
|
clips the polygon to the given rectangle
|
|
||||||||||||
|
search a point which lies near the polygon line and return the index for inserting the new point
|
|
|
returns the associated image number, only used when loading a project, otherwise discarded
|
|
|
returns vector with coordinates of the polygon
|
|
|
returns mask type
|
|
|
returns the total winding number of the polygon
|
|
|
returns the winding number of the polygon around point p
|
|
||||||||||||
|
insert point at the position index into the polygon
|
|
|
checks if given point is inside of the stored polygon
|
|
|
returns if mask is inverted
|
|
||||||||||||
|
relativ moves the point at position index by diff
|
|
||||||||||||
|
moves the point at position index to the new absolute position p
|
|
|
assign operator
|
|
|
comparision operator
|
|
|
parses the x and y positions from the given string
|
|
||||||||||||
|
writes the complete k line which describes the mask to the stream, using the given newImgNr for the i parameter
|
|
|
removes point at the position index from the polygon
|
|
||||||||||||||||
|
rotate the polygon by 90 degrees
|
|
|
scales x and y axis equally by factor
|
|
||||||||||||
|
scales all polygon coordinates by factorx for x position and factory for y position
|
|
|
sets the associated image number, only used when loading a project, otherwise discarded
|
|
|
set mask to normal or inverted
|
|
|
set complete vector wit all corrdinates of the polygon
|
|
|
sets mask type
|
|
|
subsamples the polygon, so that the longest distance between 2 points is max_distance
|
|
|
transforms the polygon coordinates by the given transformation
|
The documentation for this class was generated from the following files:
1.3.9.1