HuginBase::ConstImageVariableGroup Class Reference
An
ImageVariableGroup is a collection of image variables that can have some shared variable values.
More...
#include <ImageVariableGroup.h>
Inheritance diagram for HuginBase::ConstImageVariableGroup:
[legend]List of all members.
|
Public Types |
| enum | ImageVariableEnum {
name,
type,
Filename,
string,
Size,
Size2D,
Size2D,
Projection,
Projection,
HFOV,
double,
ResponseType,
ResponseType,
EMoRParams,
float,
float,
ExposureValue,
double,
Gamma,
double,
WhiteBalanceRed,
double,
WhiteBalanceBlue,
double,
Roll,
double,
Pitch,
double,
Yaw,
double,
X,
double,
Y,
double,
Z,
double,
Stack,
double,
RadialDistortion,
double,
RadialDistortionRed,
double,
RadialDistortionBlue,
double,
RadialDistortionCenterShift,
FDiff2D,
FDiff2D,
Shear,
FDiff2D,
FDiff2D,
CropMode,
CropMode,
CropRect,
Rect2D,
Rect2D,
AutoCenterCrop,
bool,
VigCorrMode,
int,
FlatfieldFilename,
string,
RadialVigCorrCoeff,
double,
RadialVigCorrCenterShift,
FDiff2D,
FDiff2D,
ExifModel,
string,
ExifMake,
string,
ExifCropFactor,
double,
ExifFocalLength,
double,
ExifOrientation,
double,
ExifAperture,
double,
ExifISO,
double,
ExifDistance,
double,
ExifFocalLength35,
double,
ExifExposureTime,
double,
ExifDate,
string,
FeatherWidth,
int,
Morph,
bool,
Masks,
MaskPolygonVector,
ActiveMasks,
MaskPolygonVector,
Active,
bool,
true
} |
Public Member Functions |
| | ConstImageVariableGroup (std::set< ImageVariableEnum > variables, const PanoramaData &pano) |
| | constructor
|
| virtual | ~ConstImageVariableGroup () |
| | destructor
|
| unsigned int | getPartNumber (unsigned int imageNr) const |
| | Get a part number from an image number.
|
| std::size_t | getNumberOfParts () |
| | get the number of parts.
|
| bool | getVarLinkedInPart (ImageVariableEnum variable, std::size_t part) const |
| | Get the linked status of a particular variable for a given part number.
|
| void | updatePartNumbers () |
| | Update the part numbers, call this when the panorama changes.
|
Protected Member Functions |
| void | setPartNumbers () |
| | Set the part numbers in m_image_part_numbers, and notify observers of changes.
|
Protected Attributes |
| std::set< ImageVariableEnum > | m_variables |
| | The set of variables which make up this group.
|
| const PanoramaData & | m_pano |
| | The panorama this group works on.
|
| std::vector< unsigned int > | m_image_part_numbers |
| | The part numbers for each image.
|
| unsigned int | m_num_parts |
Detailed Description
An
ImageVariableGroup is a collection of image variables that can have some shared variable values.
It is useful to group the image variables to those that are shared because of the same setup: for example lens variables, sensor variables, exposures of particular brackets, positions of particular stacks.
We can partition the set of images in a panorama based on shared (linked) values for some of the variables in the group. (For example, we can Partion the images by Lens given that a lens consists of a projection type, horizontal field of view, and distortion coefficents.) The parts are assigned a number. (e.g. Lens number) We can also unlink a variable across a part, if it is part of the group of variables (For example, it might be necessary to unlink the centre shift of a particular lens). Note that if all the variables in a part are unlinked, this is equivalent to each image being in a separate part, which changes the part numbers. We can also switch an image into a different partition by changing what its variables are linked to.
Another object can listen to changes of part allocations in an ImageVariableGroup, it should inherit from ImageVariableGroupObserver, and register itself with the ImageVariableGroup(s) it wants to hear from.
Member Enumeration Documentation
|
|
- Enumeration values:
-
| name |
|
| type |
|
| Filename |
- Note:
- 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: ImageVarianle<[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]();
- The arguments work as follows:
- the name of the variable
- the type of the variable
- the default value
- 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 also:
- ImageVariableTranslate.h
|
| string |
|
| Size |
|
| Size2D |
|
| Size2D |
|
| Projection |
|
| Projection |
|
| HFOV |
|
| double |
|
| ResponseType |
|
| ResponseType |
|
| EMoRParams |
|
| float |
|
| float |
|
| ExposureValue |
|
| double |
|
| Gamma |
|
| double |
|
| WhiteBalanceRed |
|
| double |
|
| WhiteBalanceBlue |
|
| double |
|
| Roll |
|
| double |
|
| Pitch |
|
| double |
|
| Yaw |
|
| double |
|
| X |
|
| double |
|
| Y |
|
| double |
|
| Z |
|
| double |
|
| Stack |
|
| double |
|
| RadialDistortion |
|
| double |
|
| RadialDistortionRed |
|
| double |
|
| RadialDistortionBlue |
|
| double |
|
| RadialDistortionCenterShift |
|
| FDiff2D |
|
| FDiff2D |
|
| Shear |
|
| FDiff2D |
|
| FDiff2D |
|
| CropMode |
|
| CropMode |
|
| CropRect |
|
| Rect2D |
|
| Rect2D |
|
| AutoCenterCrop |
|
| bool |
|
| VigCorrMode |
|
| int |
|
| FlatfieldFilename |
|
| string |
|
| RadialVigCorrCoeff |
|
| double |
|
| RadialVigCorrCenterShift |
|
| FDiff2D |
|
| FDiff2D |
|
| ExifModel |
|
| string |
|
| ExifMake |
|
| string |
|
| ExifCropFactor |
|
| double |
|
| ExifFocalLength |
|
| double |
|
| ExifOrientation |
|
| double |
|
| ExifAperture |
|
| double |
|
| ExifISO |
|
| double |
|
| ExifDistance |
|
| double |
|
| ExifFocalLength35 |
|
| double |
|
| ExifExposureTime |
|
| double |
|
| ExifDate |
|
| string |
|
| FeatherWidth |
|
| int |
|
| Morph |
|
| bool |
|
| Masks |
|
| MaskPolygonVector |
|
| ActiveMasks |
|
| MaskPolygonVector |
|
| Active |
|
| bool |
|
| true |
|
|
Constructor & Destructor Documentation
|
|
constructor
Assign the ImageVariableGroup the image variables and the panorama that it should be handling. |
Member Function Documentation
| std::size_t HuginBase::ConstImageVariableGroup::getNumberOfParts |
( |
|
) |
|
|
|
|
get the number of parts.
- Returns:
- the number of unlinked parts in the associated panorama's images.
|
| unsigned int HuginBase::ConstImageVariableGroup::getPartNumber |
( |
unsigned int |
imageNr |
) |
const |
|
|
|
Get a part number from an image number.
- Returns:
- a number unique to a subset in a partition of the images, such that there is at least of the variables in this group linked.
|
| bool HuginBase::ConstImageVariableGroup::getVarLinkedInPart |
( |
ImageVariableEnum |
variable, |
|
|
std::size_t |
part |
|
) |
const |
|
|
|
Get the linked status of a particular variable for a given part number.
- Parameters:
-
| variable | the variable to check |
| part | the part number to check |
- Returns:
- true if there is only one image in this part or the first image in this part has links. False otherwise.
- Note:
- If there is only one image in the given part, true is returned. This should make sense as variables are linked by default.
|
| void HuginBase::ConstImageVariableGroup::setPartNumbers |
( |
|
) |
[protected] |
|
|
|
Set the part numbers in m_image_part_numbers, and notify observers of changes.
This should be called whenever the images change. |
| void HuginBase::ConstImageVariableGroup::updatePartNumbers |
( |
|
) |
|
|
|
|
Update the part numbers, call this when the panorama changes.
|
Member Data Documentation
|
|
The part numbers for each image.
The image number is used as an index. |
|
|
The panorama this group works on.
|
|
|
The set of variables which make up this group.
|
The documentation for this class was generated from the following files: