Hugintrunk
0.1
|
Parent class to anything that aids conversion between PTO file variables and the image variables of SrcPanoImg. More...
#include <ImageVariableTranslate.h>
Static Public Member Functions | |
static bool | checkApplicability (const std::string &name) |
Check if a given pto format variable name applies to this image variable. More... | |
template<class T > | |
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. More... | |
template<class T > | |
static void | setValueFromVariable (const std::string &name, ImageVariable< T > &var, const double value) |
Set a ImageVariable in SrcPanoImg given the pto format variable. More... | |
template<class T > | |
static void | addToVariableMap (const ImageVariable< T > &var, VariableMap &map) |
Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap. More... | |
Parent class to anything that aids conversion between PTO file variables and the image variables of SrcPanoImg.
Although this class doesn't really do anything itself, it will be used when the variable in SrcPanoImg is not written to a file.
We derive children of these to handle more specific cases, which are usually templates to handle similar things (e.g. all vectors) We then typedef to make a convertor for each variable in SrcPanoImg.
Definition at line 41 of file ImageVariableTranslate.h.
|
inlinestatic |
Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap.
var | The image variable used in SrcPanoImg to get values from. |
map | The VariableMap |
T | The template parameter of ImageVariable var. |
Definition at line 105 of file ImageVariableTranslate.h.
|
inlinestatic |
Check if a given pto format variable name applies to this image variable.
name | The code used to identify the variable in the PTO file format. For example "Eev". |
Definition at line 51 of file ImageVariableTranslate.h.
|
inlinestatic |
Get a pto format variable's value, given its name and a reference to the variable in SrcPanoImg.
It is a precondition of this function that the checkApplicability function returns true when passed name.
name | The code used to identify the variable in the PTO file format. For example "Eev". |
var | Some ImageVariable used by SrcPanoImg to hold this variable. |
T | the template parameter of the ImageVariable var. |
Definition at line 70 of file ImageVariableTranslate.h.
|
inlinestatic |
Set a ImageVariable in SrcPanoImg given the pto format variable.
It is a precondition of this function that the checkApplicability function returns true when passed name.
name | The name used in the PTO format image variable. |
var | The image variable used in SrcPanoImg to change. |
value | The value specified in the PTO format image variable. |
T | The template parameter of ImageVariable var. |
Definition at line 89 of file ImageVariableTranslate.h.