HuginBase::ConstStandardImageVariableGroups Class Reference

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

#include <StandardImageVariableGroups.h>

Inheritance diagram for HuginBase::ConstStandardImageVariableGroups:

Inheritance graph
[legend]
List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

ConstImageVariableGroup m_lenses
 the lens ImageVariableGroup.
ConstImageVariableGroup m_stacks
 the stack ImageVariableGroup.
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  ) 

constructor.

creates ImageVariableGroups for lenses, etc.

Parameters:
pano The panorama data to use for the lenses, etc.

Definition at line 95 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_number the 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 114 of file StandardImageVariableGroups.cpp.

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

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.

Reimplemented in HuginBase::StandardImageVariableGroups.

Definition at line 58 of file StandardImageVariableGroups.h.

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:
imgNr the 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]

Get the set of lens image variables.

Returns:
A constant reference to the set of image variables used for the lens ImageVariableGroup.

Definition at line 103 of file StandardImageVariableGroups.cpp.

References HuginBase::lens_variables_set.

Referenced by ApplyLensDBParameters(), PanoOperation::ResetOperation::GetInternalCommand(), PanoOperation::ChangeLensOperation::GetInternalCommand(), PanoOperation::NewLensOperation::GetInternalCommand(), main(), ImagesTreeCtrl::OnEndDrag(), and ImagesTreeCtrl::UnLinkImageVariables().

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.

Reimplemented in HuginBase::StandardImageVariableGroups.

Definition at line 99 of file StandardImageVariableGroups.h.

const std::set< ConstImageVariableGroup::ImageVariableEnum > & HuginBase::ConstStandardImageVariableGroups::getStackVariables (  )  [static]

Get the set of stack image variables.

Returns:
A constant reference to the set of image variables used for the stack ImageVariableGroup. (yaw, pitch, roll, stack...)

Definition at line 109 of file StandardImageVariableGroups.cpp.

References HuginBase::stack_variables_set.

Referenced by PanoOperation::AssignStacksOperation::GetInternalCommand(), PanoOperation::ChangeStackOperation::GetInternalCommand(), PanoOperation::NewStackOperation::GetInternalCommand(), main(), ImagesTreeCtrl::OnEndDrag(), and ImagesTreeCtrl::UnLinkImageVariables().

void HuginBase::ConstStandardImageVariableGroups::update (  ) 

Update part numbers for each variable group.

Should be called when the panorama images change

Reimplemented in HuginBase::StandardImageVariableGroups.

Definition at line 323 of file StandardImageVariableGroups.cpp.


Member Data Documentation

ConstImageVariableGroup HuginBase::ConstStandardImageVariableGroups::m_lenses [protected]

the lens ImageVariableGroup.

See also:
StandardImageVariableGroups.cpp for a list of lens variables.

Reimplemented in HuginBase::StandardImageVariableGroups.

Definition at line 119 of file StandardImageVariableGroups.h.

Referenced by getLens().

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

Reimplemented in HuginBase::StandardImageVariableGroups.

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.

Reimplemented in HuginBase::StandardImageVariableGroups.

Definition at line 125 of file StandardImageVariableGroups.h.


The documentation for this class was generated from the following files:
Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7