[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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:

Inheritance graph
[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< ImageVariableEnumm_variables
 The set of variables which make up this group.
const PanoramaDatam_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

enum HuginBase::ConstImageVariableGroup::ImageVariableEnum
 

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:
  1. Member variables: ImageVarianle<[type]> m_[name];
  2. Accessor functions: [type] get[name]() const;
  3. Set functions: void set[name](const [type] data);
  4. Link functions: void link[name](SrcPanoImg)
  5. Unlink functions: void unlink[name]();
The arguments work as follows:
  1. the name of the variable
  2. the type of the variable
  3. 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

HuginBase::ConstImageVariableGroup::ConstImageVariableGroup std::set< ImageVariableEnum variables,
const PanoramaData pano
 

constructor

Assign the ImageVariableGroup the image variables and the panorama that it should be handling.

HuginBase::ConstImageVariableGroup::~ConstImageVariableGroup  )  [virtual]
 

destructor


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

std::vector<unsigned int> HuginBase::ConstImageVariableGroup::m_image_part_numbers [protected]
 

The part numbers for each image.

The image number is used as an index.

unsigned int HuginBase::ConstImageVariableGroup::m_num_parts [protected]
 

const PanoramaData& HuginBase::ConstImageVariableGroup::m_pano [protected]
 

The panorama this group works on.

std::set<ImageVariableEnum> HuginBase::ConstImageVariableGroup::m_variables [protected]
 

The set of variables which make up this group.


The documentation for this class was generated from the following files:

Generated on Mon Sep 20 01:01:36 2010 for Hugintrunk by doxygen 1.3.9.1