27#ifndef _PANODATA_MASK_H
28#define _PANODATA_MASK_H
60 Mask_Stack_negative=2,
61 Mask_Stack_positive=3,
71 int getTotalWindingNumber()
const;
79 bool isPositive()
const;
85 unsigned int getImgNr()
const {
return m_imgNr; };
99 void removePoint(
const unsigned int index);
113 bool clipPolygon(
const vigra::Rect2D
rect);
132 bool parsePolygonString(
const std::string&
polygonStr);
136 void printPolygonLine(std::ostream & o,
const unsigned int newImgNr)
const;
141 void calcBoundingBox();
162template <
class SrcImageIterator,
class SrcAccessor>
165 const vigra::Diff2D
imgSize = img.second - img.first;
170#pragma omp parallel for schedule(dynamic)
171 for(
int y=0; y <
imgSize.y; ++y)
base class, which stores one mask polygon
void scale(const double factor)
scales x and y axis equally by factor
VectorPolygon getMaskPolygon() const
returns vector with coordinates of the polygon
void setImgNr(const unsigned int newImgNr)
sets the associated image number, only used when loading a project, otherwise discarded
MaskType getMaskType() const
returns mask type
vigra::Rect2D m_boundingBox
unsigned int getImgNr() const
returns the associated image number, only used when loading a project, otherwise discarded
bool isInverted() const
returns if mask is inverted
void setMaskType(const MaskType newType)
sets mask type
void setInverted(const bool inverted)
set mask to normal or inverted
MaskType
enumeration with type of possible masks
misc math function & classes used by other parts of the program
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::vector< MaskPolygon > MaskPolygonVector
const int maskOffset
polygon can exceed the image maximal maskOffset pixels in each direction bigger polygons will be clip...
void LoadMaskFromStream(std::istream &stream, vigra::Size2D &imageSize, MaskPolygonVector &newMasks, size_t imgNr)
load the mask from stream
void SaveMaskToStream(std::ostream &stream, vigra::Size2D imageSize, MaskPolygon &maskToWrite, size_t imgNr)
save the mask into stream
std::vector< hugin_utils::FDiff2D > VectorPolygon
vector, which stores coordinates of one polygon
void applyMask(vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > img, HuginBase::MaskPolygonVector masks)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.