[75c70a]: src / hugin_base / panodata / image_variables.h Maximize Restore History

Download this file

image_variables.h    161 lines (139 with data), 6.1 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// -*- c-basic-offset: 4 -*-
/** @file image_variables.h
*
* @author James Legg
*
* @brief This file specifies what image variables SrcPanoImg should have.
*
* This file is #included multiple times after defining a macro for
* image_variable. The idea is to reduce the amount of tedoius code copy &
* pasted for each image variable. The list will be used to generate things the
* following:
* -# Member variables:
* ImageVariable<[type]> m_[name];
* -# Accessor functions:
* [type] get[name]() const;
* -# Set functions:
* void set[name](const [type] data);
* -# Link functions:
* void link[name](SrcPanoImg)
* -# Unlink functions:
* void unlink[name]();
* @par
* The arguments work as follows:
* -# the name of the variable
* -# the type of the variable
* -# the default value
*
* @par
* There is some non automatic stuff in ImageVariableTranslate.h that will need
* changing if this list changes. That file handles the translation to and from
* PTO file format style variables.
* @see ImageVariableTranslate.h
*/
/* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/* Hmmm... I'ld like commas in template arguments, but < and > aren't real
* brackets so the template arguments will be interprated as separate macro
* arguments instead.
* Solution: Have an object in ImageVariableTranslate.h which handles all the
* pto conversion code. We can generate the code in SrcPanoImg.h automatically
* as ImageVariableTranslate.h typedefs PTOVariableConverterFor[name] for each
* variable.
* So we don't have a parameter that specifies the codes to use in a PTO file.
*/
// file variables
image_variable( Filename, std::string, "" )
image_variable( Size, vigra::Size2D , vigra::Size2D(0,0) )
// projection variables
image_variable( Projection, HuginBase::BaseSrcPanoImage::Projection, RECTILINEAR )
image_variable( HFOV, double, 50.0 )
// colour response variables
image_variable( ResponseType, HuginBase::BaseSrcPanoImage::ResponseType, RESPONSE_EMOR )
image_variable( EMoRParams, std::vector<float>, std::vector<float>(5, 0.0) )
image_variable( ExposureValue, double, 0.0 )
image_variable( Gamma, double, 1.0 )
image_variable( WhiteBalanceRed, double, 1.0 )
image_variable( WhiteBalanceBlue, double, 1.0 )
// orientation in degrees
image_variable( Roll, double , 0.0 )
image_variable( Pitch, double , 0.0 )
image_variable( Yaw, double, 0.0 )
image_variable( X, double , 0.0 )
image_variable( Y, double , 0.0 )
image_variable( Z, double, 1.0 )
image_variable( Spin, double , 0.0 )
image_variable( Tilt, double , 0.0 )
image_variable( Rotate, double, 0.0 )
// stack information
// Currently only the link information is used, the value means nothing.
image_variable( Stack, double, 0.0 )
// radial lens distortion
image_variable( RadialDistortion, std::vector<double>, distortion_default )
// radial lens distortion (red, blue channel), for TCA correction
image_variable( RadialDistortionRed, std::vector<double>, distortion_default )
image_variable( RadialDistortionBlue, std::vector<double>, distortion_default )
// Center shift
image_variable( RadialDistortionCenterShift, hugin_utils::FDiff2D, hugin_utils::FDiff2D(0.0, 0.0) )
// shear
image_variable( Shear, hugin_utils::FDiff2D, hugin_utils::FDiff2D(0, 0) )
// crop description
image_variable( CropMode, HuginBase::BaseSrcPanoImage::CropMode, NO_CROP )
image_variable( CropRect, vigra::Rect2D, vigra::Rect2D(0, 0, 0, 0) )
image_variable( AutoCenterCrop, bool, true )
// vignetting correction
image_variable( VigCorrMode, int, VIGCORR_RADIAL|VIGCORR_DIV )
// coefficients for vignetting correction (even degrees: 0,2,4,6, ...)
image_variable( FlatfieldFilename, std::string, "" )
image_variable( RadialVigCorrCoeff, std::vector<double>, RadialVigCorrCoeff_default )
image_variable( RadialVigCorrCenterShift, hugin_utils::FDiff2D, hugin_utils::FDiff2D(0.0, 0.0) )
// linear pixel transform
// (doesn't seem to be used, removing with #if 0)
#if 0
image_variable( ka, std::vector<double>, , )
image_variable( kb, std::vector<double>, , )
#endif
// store camera information from exif tags...
image_variable( ExifModel, std::string, "" )
image_variable( ExifMake, std::string, "" )
image_variable( ExifLens, std::string, "" )
image_variable( ExifCropFactor, double, 0 )
image_variable( ExifFocalLength, double, 0 )
image_variable( ExifOrientation, double, 0 )
image_variable( ExifAperture, double, 0 )
image_variable( ExifISO, double, 0 )
image_variable( ExifDistance, double, 0 )
image_variable( ExifFocalLength35, double, 0)
image_variable( ExifExposureTime, double, 0)
image_variable( ExifDate, std::string, "")
image_variable( ExifExposureMode, int, 0)
#if 0
//
// panotools options, currently not used
//
// width of feather for stitching.
image_variable( FeatherWidth, unsigned int, 10 )
// Morph-to-fit using control points.
image_variable( Morph, bool, false )
#endif
// mask handling
// Masks is list of loaded or created textures
image_variable( Masks, HuginBase::MaskPolygonVector, defaultMaskVector)
// ActiveMasks contains list of all negative masks, which should be applied to
// a given image, this is used to propagate positive masks
image_variable( ActiveMasks, HuginBase::MaskPolygonVector, defaultMaskVector)
// If the image is selected to be used in the preview and for optimisation.
image_variable( Active, bool, true )