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>
51 #endif // _HSI_IGNORE_SECTION
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(); }
124 #undef image_variable
127 #define image_variable( name, type, default_value ) \
128 const ImageVariable<type > & get##name##IV() const { return m_##name; }
130 #undef image_variable
133 #define image_variable( name, type, default_value ) \
134 void set##name(type data) { m_##name.setData(data); }
136 #undef image_variable
143 #define image_variable( name, type, default_value ) \
144 void link##name (BaseSrcPanoImage * target) \
145 { m_##name.linkWith(&(target->m_##name)); }
147 #undef image_variable
153 #define image_variable( name, type, default_value ) \
154 void unlink##name () \
155 { m_##name.removeLinks(); }
157 #undef image_variable
162 #define image_variable( name, type, default_value ) \
163 bool name##isLinked () const \
164 { return m_##name.isLinked(); }
166 #undef image_variable
172 #define image_variable( name, type, default_value ) \
173 bool name##isLinkedWith (const BaseSrcPanoImage & image) const \
174 { return m_##name.isLinkedWith(&(image.m_##name)); }
176 #undef image_variable
180 #define image_variable( name, type, default_value ) \
181 ImageVariable<type> m_##name {ImageVariable<type>(default_value)};
183 #undef image_variable
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();
310 m_RadialVigCorrCenterShift.removeLinks();
311 m_VigCorrMode.removeLinks();
318 m_EMoRParams.removeLinks();
319 m_ResponseType.removeLinks();
326 m_RadialVigCorrCoeff.linkWith(&(target->m_RadialVigCorrCoeff));
327 m_VigCorrMode.linkWith(&(target->m_VigCorrMode));
334 m_RadialVigCorrCenterShift.linkWith(&(target->m_RadialVigCorrCenterShift));
335 m_VigCorrMode.linkWith(&(target->m_VigCorrMode));
342 m_EMoRParams.linkWith(&(target->m_EMoRParams));
343 m_ResponseType.linkWith(&(target->m_ResponseType));
347 { m_Stack.linkWith(&(target->m_Stack)); }
350 bool checkImageSizeKnown();
355 bool applyEXIFValues(
bool applyEVValue=
true);
364 static double calcCropFactor(
SrcPanoImage::Projection proj,
double hfov,
double focalLength, vigra::Size2D imageSize);
367 double calcExifExposureValue();
370 void updateFocalLength(
double newFocalLength);
372 void updateCropFactor(
double focalLength,
double newCropFactor);
377 bool readCropfactorFromDB();
384 bool readProjectionFromDB(
const bool ignoreFovRectilinear=
true);
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();
430 #endif // PANOIMAGE_H
void unlinkEMoRParams()
unlinking the EMOR parameters should unlink the correction mode.
misc math function & classes used by other parts of the program
void linkRadialVigCorrCoeff(SrcPanoImage *target)
linking vignetting parameters should link the vignetting correction mode
declaration of classes to work with mask
int getHeight() const
Get the height of the image in pixels.
SrcPanoImage(const BaseSrcPanoImage::Projection projection, const double hfov, const vigra::Size2D size)
void unlinkRadialVigCorrCenterShift()
unlinking vignetting parameters should unlink the vignetting correction mode
void linkRadialVigCorrCenterShift(SrcPanoImage *target)
linking vignetting parameters should link the vignetting correction mode
options getSize().area()) int wxCALLBACK SortFieldOfViewAscending(wxIntPtr item1
load response curve from file (not implemented yet)
VignettingCorrMode
vignetting correction mode (bitflags, no real enum)
int getWidth() const
Get the width of the image in pixels.
MaskType
enumeration with type of possible masks
void linkEMoRParams(SrcPanoImage *target)
linking the EMOR parameters should link the correction mode.
std::map< std::string, std::string > FileMetaData
typedef for general map for storing metadata in files
Base class containing all the variables, but missing some of the other important functions and with s...
void unlinkRadialVigCorrCoeff()
unlinking vignetting parameters should unlink the vignetting correction mode
virtual ~BaseSrcPanoImage()
std::map< std::string, Variable > VariableMap
Define & Implement the ImageVariable class.
a simple gamma response curve
HuginBase::BaseSrcPanoImage::CropMode CropMode
void resize(double x_dest, double y_dest, double *x_src, double *y_src, const _FuncParams ¶ms)
std::vector< SrcPanoImage > ImageVector
All variables of a source image.
This file specifies what image variables SrcPanoImg should have.
base class, which stores one mask polygon
void linkStack(SrcPanoImage *target)