24#ifndef _PANODATA_IMAGEVARIABLETRANSLATE_H
25#define _PANODATA_IMAGEVARIABLETRANSLATE_H
71 const std::string& name,
90 const std::string& name,
121template <
char code1,
char code2 = '\0',
char code3 = '\0',
class T =
double>
128 return ((std::string)
code) == name;
161template <
char base_code,
class T =
double,
size_t size = 4>
167 return name.size() == 2 && name[0] ==
base_code && name[1] >=
'a' && name[1] <
'a' +
char(size);
172 return var.getData()[name[1]-
'a'];
177 std::vector<T>
temp = var.getData();
178 temp[name[1]-
'a'] = value;
185 for (
size_t index = 0; index < size; index++,
s[1]++)
187 map.insert(std::make_pair(
s,
Variable(
s, (
double)var.getData()[index])));
202template <
class T =
double,
size_t size = 3>
208 return name[0] >=
'a' && name[0] <
'a' +
char(size);
213 return var.getData()[name[0]-
'a'];
218 std::vector<T>
temp = var.getData();
219 temp[name[0]-
'a'] = value;
226 for (
size_t index = 0; index < size; index++,
s[0]++)
228 map.insert(std::make_pair(
s,
Variable(
s, (
double)var.getData()[index])));
240template <
char code_x1,
char code_y1,
char code_x2 = '\0',
char code_y2 = '\0'>
248 return name == (std::string)
code_x || name == (std::string)
code_y;
An ImageVariable stores a value that can be linked to other ImageVariables of the same type.
Type getData() const
get the variable's value
void setData(const Type data)
Set the variable groups' value.
Object to group conversion functions for PTO format variables representing a hugin_utils::FDiff2D var...
static void setValueFromVariable(const std::string &name, ImageVariable< hugin_utils::FDiff2D > &var, const double value)
static bool checkApplicability(const std::string &name)
static void addToVariableMap(const ImageVariable< hugin_utils::FDiff2D > &var, VariableMap &map)
static double getValueFromVariable(const std::string &name, const ImageVariable< hugin_utils::FDiff2D > &var)
Parent class to anything that aids conversion between PTO file variables and the image variables of S...
static bool checkApplicability(const std::string &name)
Check if a given pto format variable name applies to this image variable.
static void addToVariableMap(const ImageVariable< T > &var, VariableMap &map)
Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap.
static double getValueFromVariable(const std::string &name, const ImageVariable< T > &var)
Get a pto format variable's value, given its name and a reference to the variable in SrcPanoImg.
static void setValueFromVariable(const std::string &name, ImageVariable< T > &var, const double value)
Set a ImageVariable in SrcPanoImg given the pto format variable.
Object to group conversion functions for PTO format variables of up to three characters representing ...
static void addToVariableMap(const ImageVariable< T > &var, VariableMap &map)
static void setValueFromVariable(const std::string &name, ImageVariable< T > &var, const double value)
static double getValueFromVariable(const std::string &name, const ImageVariable< T > &var)
static bool checkApplicability(const std::string &name)
Object to group conversion functions for PTO format variables representing a std::vector variable in ...
static void addToVariableMap(const ImageVariable< std::vector< T > > &var, VariableMap &map)
static bool checkApplicability(const std::string &name)
static void setValueFromVariable(const std::string &name, ImageVariable< std::vector< T > > &var, const double value)
static double getValueFromVariable(const std::string &name, const ImageVariable< std::vector< T > > &var)
Object to group conversion functions for PTO format variables representing a std::vector variable in ...
static double getValueFromVariable(const std::string &name, const ImageVariable< std::vector< T > > &var)
static bool checkApplicability(const std::string &name)
static void setValueFromVariable(const std::string &name, ImageVariable< std::vector< T > > &var, const double value)
static void addToVariableMap(const ImageVariable< std::vector< T > > &var, VariableMap &map)
a variable has a value and a name.
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
PTOVariableConverterNoOp PTOVariableConverterForResponseType
PTOVariableConverterNoOp PTOVariableConverterForExifExposureMode
PTOVariableConverterSingle< 'T', 'r', 'Z'> PTOVariableConverterForZ
PTOVariableConverterNoOp PTOVariableConverterForVigCorrMode
PTOVariableConverterFDiff2D< 'd', 'e'> PTOVariableConverterForRadialDistortionCenterShift
PTOVariableConverterNoOp PTOVariableConverterForExifDistance
PTOVariableConverterNoOp PTOVariableConverterForGamma
PTOVariableConverterNoOp PTOVariableConverterForExifRedBalance
PTOVariableConverterNoOp PTOVariableConverterForFilename
PTOVariableConverterNoOp PTOVariableConverterForAutoCenterCrop
PTOVariableConverterNoOp PTOVariableConverterForExifAperture
PTOVariableConverterSingle< 'E', 'e', 'v'> PTOVariableConverterForExposureValue
PTOVariableConverterNoOp PTOVariableConverterForExifOrientation
PTOVariableConverterNoOp PTOVariableConverterForExifBlueBalance
PTOVariableConverterNoOp PTOVariableConverterForFlatfieldFilename
PTOVariableConverterNoOp PTOVariableConverterForExifExposureTime
PTOVariableConverterNoOp PTOVariableConverterForExifModel
PTOVariableConverterSingle< 'T', 'p', 'p'> PTOVariableConverterForTranslationPlanePitch
PTOVariableConverterSingle< 'y'> PTOVariableConverterForYaw
PTOVariableConverterNoOp PTOVariableConverterForCropFactor
PTOVariableConverterNoOp PTOVariableConverterForExifLens
PTOVariableConverterNoOp PTOVariableConverterForExifMake
PTOVariableConverterSingle< 'v'> PTOVariableConverterForHFOV
PTOVariableConverterNoOp PTOVariableConverterForExifDate
PTOVariableConverterNoOp PTOVariableConverterForExifCropFactor
PTOVariableConverterNoOp PTOVariableConverterForExifFocalLength35
PTOVariableConverterVectorChar< 'R', float, 5 > PTOVariableConverterForEMoRParams
PTOVariableConverterFDiff2D< 'g', 't'> PTOVariableConverterForShear
PTOVariableConverterNoOp PTOVariableConverterForProjection
PTOVariableConverterNoOp PTOVariableConverterForCropRect
PTOVariableConverterVectorChar< 'V', double, 4 > PTOVariableConverterForRadialVigCorrCoeff
PTOVariableConverterSingle< 'j'> PTOVariableConverterForStack
PTOVariableConverterNoOp PTOVariableConverterForMasks
std::map< std::string, Variable > VariableMap
PTOVariableConverterSingle< 'T', 'p', 'y'> PTOVariableConverterForTranslationPlaneYaw
PTOVariableConverterSingle< 'p'> PTOVariableConverterForPitch
PTOVariableConverterNoOp PTOVariableConverterForActiveMasks
PTOVariableConverterFDiff2D< 'V', 'V', 'x', 'y'> PTOVariableConverterForRadialVigCorrCenterShift
PTOVariableConverterSingle< 'T', 'r', 'Y'> PTOVariableConverterForY
PTOVariableConverterNoOp PTOVariableConverterForSize
PTOVariableConverterNoOp PTOVariableConverterForActive
PTOVariableConverterNoOp PTOVariableConverterForFileMetadata
PTOVariableConverterNoOp PTOVariableConverterForExifFocalLength
PTOVariableConverterNoOp PTOVariableConverterForCropMode
PTOVariableConverterNoOp PTOVariableConverterForRadialDistortionBlue
PTOVariableConverterSingle< 'E', 'r'> PTOVariableConverterForWhiteBalanceRed
PTOVariableConverterSingle< 'E', 'b'> PTOVariableConverterForWhiteBalanceBlue
PTOVariableConverterNoOp PTOVariableConverterForLensNr
PTOVariableConverterSingle< 'T', 'r', 'X'> PTOVariableConverterForX
PTOVariableConverterNoOp PTOVariableConverterForRadialDistortionRed
PTOVariableConverterVector< double, 3 > PTOVariableConverterForRadialDistortion
PTOVariableConverterSingle< 'r'> PTOVariableConverterForRoll
PTOVariableConverterNoOp PTOVariableConverterForExifISO
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.