30#ifndef _PANODATA_SRCPANOIMAGE_H
31#define _PANODATA_SRCPANOIMAGE_H
36#ifndef _HSI_IGNORE_SECTION
39#include <hugin_config.h>
42#include <vigra/diff2d.hxx>
75 FULL_FRAME_FISHEYE = 3,
77 FISHEYE_ORTHOGRAPHIC = 8,
78 FISHEYE_STEREOGRAPHIC = 10,
79 FISHEYE_EQUISOLID = 21,
94 VIGCORR_FLATFIELD = 2,
121#define image_variable( name, type, default_value ) \
122 type get##name() const { return m_##name.getData(); }
127#define image_variable( name, type, default_value ) \
128 const ImageVariable<type > & get##name##IV() const { return m_##name; }
133#define image_variable( name, type, default_value ) \
134 void set##name(type data) { m_##name.setData(data); }
143#define image_variable( name, type, default_value ) \
144 void link##name (BaseSrcPanoImage * target) \
145 { m_##name.linkWith(&(target->m_##name)); }
153#define image_variable( name, type, default_value ) \
154 void unlink##name () \
155 { m_##name.removeLinks(); }
162#define image_variable( name, type, default_value ) \
163 bool name##isLinked () const \
164 { return m_##name.isLinked(); }
172#define image_variable( name, type, default_value ) \
173 bool name##isLinkedWith (const BaseSrcPanoImage & image) const \
174 { return m_##name.isLinkedWith(&(image.m_##name)); }
180#define image_variable( name, type, default_value ) \
181 ImageVariable<type> m_##name {ImageVariable<type>(default_value)};
203 setProjection(projection);
221 bool isInside(vigra::Point2D p,
bool ignoreMasks=
false)
const;
224 bool horizontalWarpNeeded();
231 bool getCorrectTCA()
const;
241 bool isCircularCrop()
const;
247 void setSize(vigra::Size2D val);
255 double getExposure()
const;
256 void setExposure(
const double & val);
279 double getVar(
const std::string & name)
const;
281 void setVar(
const std::string & name,
double val);
296 const int getExifDateTime(
struct tm*
datetime)
const;
302 m_RadialVigCorrCoeff.removeLinks();
303 m_VigCorrMode.removeLinks();
311 m_VigCorrMode.removeLinks();
326 m_RadialVigCorrCoeff.linkWith(&(target->m_RadialVigCorrCoeff));
327 m_VigCorrMode.linkWith(&(target->m_VigCorrMode));
335 m_VigCorrMode.linkWith(&(target->m_VigCorrMode));
347 { m_Stack.linkWith(&(target->m_Stack)); }
350 bool checkImageSizeKnown();
367 double calcExifExposureValue();
377 bool readCropfactorFromDB();
388 bool readDistortionFromDB();
392 bool readVignettingFromDB();
395 std::string getDBLensName()
const;
398 bool hasMasks()
const;
400 bool hasPositiveMasks()
const;
402 bool hasActiveMasks()
const;
408 void clearActiveMasks();
412 void deleteMask(
unsigned int index);
414 void deleteAllMasks();
416 void printMaskLines(std::ostream &o,
unsigned int newImgNr)
const;
418 bool isInsideMasks(vigra::Point2D p)
const;
423 bool trustExivOrientation();
options getSize().area()) int wxCALLBACK SortFieldOfViewAscending(wxIntPtr item1
Define & Implement the ImageVariable class.
declaration of classes to work with mask
Base class containing all the variables, but missing some of the other important functions and with s...
VignettingCorrMode
vignetting correction mode (bitflags, no real enum)
virtual ~BaseSrcPanoImage()
@ RESPONSE_GAMMA
a simple gamma response curve
@ RESPONSE_LINEAR
linear response
@ RESPONSE_FILE
load response curve from file (not implemented yet)
base class, which stores one mask polygon
MaskType
enumeration with type of possible masks
All variables of a source image.
void linkEMoRParams(SrcPanoImage *target)
linking the EMOR parameters should link the correction mode.
void linkStack(SrcPanoImage *target)
void unlinkRadialVigCorrCenterShift()
unlinking vignetting parameters should unlink the vignetting correction mode
void linkRadialVigCorrCoeff(SrcPanoImage *target)
linking vignetting parameters should link the vignetting correction mode
int getWidth() const
Get the width of the image in pixels.
void linkRadialVigCorrCenterShift(SrcPanoImage *target)
linking vignetting parameters should link the vignetting correction mode
void unlinkEMoRParams()
unlinking the EMOR parameters should unlink the correction mode.
SrcPanoImage(const BaseSrcPanoImage::Projection projection, const double hfov, const vigra::Size2D size)
void unlinkRadialVigCorrCoeff()
unlinking vignetting parameters should unlink the vignetting correction mode
int getHeight() const
Get the height of the image in pixels.
misc math function & classes used by other parts of the program
This file specifies what image variables SrcPanoImg should have.
HuginBase::BaseSrcPanoImage::CropMode CropMode
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::map< std::string, Variable > VariableMap
std::vector< SrcPanoImage > ImageVector
std::map< std::string, std::string > FileMetaData
typedef for general map for storing metadata in files
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.