Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
HuginBase::ConstStandardImageVariableGroups Class Reference

Make an ImageVariableGroup for lenses and other common concepts. More...

#include <StandardImageVariableGroups.h>

Inheritance diagram for HuginBase::ConstStandardImageVariableGroups:
Inheritance graph

Public Member Functions

 ConstStandardImageVariableGroups (const PanoramaData &pano)
 constructor. More...
 
ConstImageVariableGroupgetLenses ()
 Get the ImageVariableGroup representing the group of lens variables. More...
 
Lens getLens (std::size_t lens_number)
 A panorama.getLens equivalent, not for new code. More...
 
Lens getLensForImage (std::size_t imgNr)
 Get the lens object for a specific image, also not for new code. More...
 
ConstImageVariableGroupgetStacks ()
 Get the ImageVariableGroup representing the group of stack variables. More...
 
void update ()
 Update part numbers for each variable group. More...
 

Static Public Member Functions

static const std::set
< ConstImageVariableGroup::ImageVariableEnum > & 
getLensVariables ()
 Get the set of lens image variables. More...
 
static const std::set
< ConstImageVariableGroup::ImageVariableEnum > & 
getStackVariables ()
 Get the set of stack image variables. More...
 

Protected Attributes

ConstImageVariableGroup m_lenses
 the lens ImageVariableGroup. More...
 
ConstImageVariableGroup m_stacks
 the stack ImageVariableGroup. More...
 
const PanoramaDatam_pano
 

Detailed Description

Make an ImageVariableGroup for lenses and other common concepts.

Must be given a const panorama when created, this panorama remains with the object its entire life, but will never be changed by the StandardImageVariableGroups object. It can still react to changes in the panorama, to update part numbers use UpdatePartNumbers().

Definition at line 43 of file StandardImageVariableGroups.h.

Constructor & Destructor Documentation

HuginBase::ConstStandardImageVariableGroups::ConstStandardImageVariableGroups ( const PanoramaData pano)
explicit

constructor.

creates ImageVariableGroups for lenses, etc.

Parameters
panoThe panorama data to use for the lenses, etc.

Definition at line 92 of file StandardImageVariableGroups.cpp.

Member Function Documentation

Lens HuginBase::ConstStandardImageVariableGroups::getLens ( std::size_t  lens_number)

A panorama.getLens equivalent, not for new code.

This is a temporary solution to replace code that used Panorama.getLens. It will generate a lens on the spot using the SrcPanoImg object. New code should instead use the ImageVariableGroup returned by getLenses(), as it does not generate the lens object on the fly.

Parameters
lens_numberthe number of the lens.
Returns
A lens object for the specified lens number. The lens number of each image can be found by getLenses().getPartNumber(imageNr). Lens numbers are allocated from 0, and the number of them is returned by getLenses().getNumberOfParts().
Todo:
replace everything using this and remove the function.

Definition at line 111 of file StandardImageVariableGroups.cpp.

References DEBUG_ASSERT, DEBUG_ERROR, getLensForImage(), HuginBase::PanoramaData::getNrOfImages(), HuginBase::ConstImageVariableGroup::getNumberOfParts(), HuginBase::ConstImageVariableGroup::getPartNumber(), m_lenses, and m_pano.

Referenced by PanoOperation::ChangeLensOperation::GetInternalCommand().

ConstImageVariableGroup& HuginBase::ConstStandardImageVariableGroups::getLenses ( )
inline

Get the ImageVariableGroup representing the group of lens variables.

Use this to manipulate lens variable links, and to find lens numbers.

Returns
a reference to the lens ImageVariableGroup.

Definition at line 58 of file StandardImageVariableGroups.h.

Referenced by main(), OptimizePhotometricPanel::runOptimizer(), HuginBase::LensDB::SaveLensDataFromPano(), MaskEditorPanel::UpdateCrop(), and HuginBase::Panorama::updateMasks().

Lens HuginBase::ConstStandardImageVariableGroups::getLensForImage ( std::size_t  imgNr)

Get the lens object for a specific image, also not for new code.

Called by getLens.

Parameters
imgNrthe number of the image to generate a Lens object for.
Returns
a Lens object for the specified image.
Todo:
replace everything using this and remove the function.

Referenced by getLens(), and SaveLensParameters().

const std::set< ConstImageVariableGroup::ImageVariableEnum > & HuginBase::ConstStandardImageVariableGroups::getLensVariables ( )
static
ConstImageVariableGroup& HuginBase::ConstStandardImageVariableGroups::getStacks ( )
inline

Get the ImageVariableGroup representing the group of stack variables.

Use this to manipulate angle links, and to find stack numbers.

Returns
a reference to the stack ImageVariableGroup.

Definition at line 99 of file StandardImageVariableGroups.h.

Referenced by HuginBase::getHDRStacks(), HuginBase::getSortedStacks(), and main().

const std::set< ConstImageVariableGroup::ImageVariableEnum > & HuginBase::ConstStandardImageVariableGroups::getStackVariables ( )
static
void HuginBase::ConstStandardImageVariableGroups::update ( )

Update part numbers for each variable group.

Should be called when the panorama images change

Definition at line 163 of file StandardImageVariableGroups.cpp.

References m_lenses, m_stacks, and HuginBase::ConstImageVariableGroup::updatePartNumbers().

Referenced by MaskEditorPanel::panoramaImagesChanged(), and HuginBase::StandardImageVariableGroups::update().

Member Data Documentation

ConstImageVariableGroup HuginBase::ConstStandardImageVariableGroups::m_lenses
protected

the lens ImageVariableGroup.

See Also
StandardImageVariableGroups.cpp for a list of lens variables.

Definition at line 119 of file StandardImageVariableGroups.h.

Referenced by getLens(), and update().

const PanoramaData& HuginBase::ConstStandardImageVariableGroups::m_pano
protected

Definition at line 127 of file StandardImageVariableGroups.h.

Referenced by getLens().

ConstImageVariableGroup HuginBase::ConstStandardImageVariableGroups::m_stacks
protected

the stack ImageVariableGroup.

See Also
StandardImageVariableGroups.cpp for a list of stack variables.

Definition at line 125 of file StandardImageVariableGroups.h.

Referenced by update().


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