Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
HuginBase::Panorama Class Reference

Model for a panorama. More...

#include <Panorama.h>

Inheritance diagram for HuginBase::Panorama:
Inheritance graph

Public Member Functions

 Panorama ()
 ctor.
 
 ~Panorama ()
 dtor.
 
Panorama getSubset (const UIntSet &imgs) const
 get a subset of the panorama
 
Panorama duplicate () const
 duplicate the panorama
 
PanoramaDatagetNewSubset (const UIntSet &imgs) const
 
PanoramaDatagetNewCopy () const
 
PanoramaDatagetUnlinkedSubset (UIntSetVector &imageGroups) const
 get a panorama, which does not contain images linked with positions, the cps are moved to the first image of each linked stacked
 
std::size_t getNrOfImages () const
 number of images.
 
const SrcPanoImagegetImage (std::size_t nr) const
 get a panorama image, counting starts with 0
 
void setImage (std::size_t nr, const SrcPanoImage &img)
 set a panorama image, counting starts with 0
 
unsigned int addImage (const SrcPanoImage &img)
 the the number for a specific image
 
void mergePanorama (const Panorama &newPano)
 merges the panorama with the given pano
 
void removeImage (unsigned int nr)
 creates an image, from filename, and a Lens, if needed
 
void swapImages (unsigned int img1, unsigned int img2)
 swap images.
 
void moveImage (size_t img1, size_t img2)
 moves images.
 
SrcPanoImage getSrcImage (unsigned imgNr) const
 get a description of a source image
 
void setSrcImage (unsigned int nr, const SrcPanoImage &img)
 set input image parameters
 
void setImageFilename (unsigned int img, const std::string &fname)
 set a new image filename
 
void activateImage (unsigned int imgNr, bool active=true)
 mark an image as active or inactive.
 
UIntSet getActiveImages () const
 get active images
 
std::size_t getNrOfCtrlPoints () const
 number of control points
 
const ControlPointgetCtrlPoint (std::size_t nr) const
 get a control point, counting starts with 0
 
const CPVectorgetCtrlPoints () const
 get all control point of this Panorama
 
std::vector< unsigned intgetCtrlPointsForImage (unsigned int imgNr) const
 return all control points for a given image.
 
CPointVector getCtrlPointsVectorForImage (unsigned int imgNr) const
 return a vector of std::pairs with global ctrl point nr and ControlPoint In the class ControlPoint the image with imgNr is always image1
 
void setCtrlPoints (const CPVector &points)
 set all control points (Ippei: Is this supposed to be 'add' method?)
 
unsigned int addCtrlPoint (const ControlPoint &point)
 add a new control point.
 
void removeCtrlPoint (unsigned int pNr)
 remove a control point.
 
void removeDuplicateCtrlPoints ()
 removes duplicates control points
 
void changeControlPoint (unsigned int pNr, const ControlPoint &point)
 change a control Point.
 
int getNextCPTypeLineNumber () const
 get the number of a control point
 
void updateLineCtrlPoints ()
 assign new mode line numbers, if required
 
void updateCtrlPointErrors (const CPVector &controlPoints)
 update control points distances.
 
void updateCtrlPointErrors (const UIntSet &imgs, const CPVector &cps)
 update control points for a subset of images.
 
const std::string getICCProfileDesc () const
 return description of icc profile used for pano
 
void setICCProfileDesc (const std::string &newDesc)
 sets the icc profile description for check of same profile
 
const int getNrOfBands () const
 return number of bands of first image (without alpha channel) so it can be 1 for grayscale or 3 for rgb images
 
void setNrOfBands (const int nrBands)
 sets the number of bands
 
VariableMapVector getVariables () const
 get variables of this panorama
 
const VariableMap getImageVariables (unsigned int imgNr) const
 Get the variables of an image.
 
virtual void updateVariables (const VariableMapVector &vars)
 Set the variables.
 
virtual void updateVariables (const UIntSet &imgs, const VariableMapVector &var)
 update variables for some specific images
 
virtual void updateVariables (unsigned int imgNr, const VariableMap &var)
 Set variables for a single picture.
 
virtual void updateVariable (unsigned int imgNr, const Variable &var)
 update a single variable
 
virtual void UpdateFocalLength (UIntSet imgs, double newFocalLength)
 updates the focal length by changing hfov
 
virtual void UpdateCropFactor (UIntSet imgs, double newCropFactor)
 updates the crop factor, try to keep focal length constant
 
virtual void updateWhiteBalance (double redFactor, double blueFactor)
 update the global white balace of the panorama by multiplying the red and blue factor of each image with given factors
 
const double getMaxExposureDifference () const
 returns the maximum exposure value difference of all images in the project
 
const bool hasPossibleStacks () const
 return true, if the metadata indicates that the projects is a bracketet project
 
void linkPossibleStacks (bool linkPosition)
 create automatically stacks as indicated by metadata
 
const OptimizeVectorgetOptimizeVector () const
 return the optimize settings stored inside panorama
 
void setOptimizeVector (const OptimizeVector &optvec)
 set optimize setting
 
const int getOptimizerSwitch () const
 returns optimizer master switch
 
void setOptimizerSwitch (const int newSwitch)
 set optimizer master switch
 
const int getPhotometricOptimizerSwitch () const
 return the photometric optimizer master switch
 
void setPhotometricOptimizerSwitch (const int newSwitch)
 sets the photometric optimizer master switch
 
const PanoramaOptionsgetOptions () const
 returns the options for this panorama
 
void setOptions (const PanoramaOptions &opt)
 set new output settings This is not used directly for optimizing/stiching, but it can be feed into runOptimizer() and runStitcher().
 
void printPanoramaScript (std::ostream &o, const OptimizeVector &optvars, const PanoramaOptions &options, const UIntSet &imgs, bool forPTOptimizer, const std::string &stripPrefix="") const
 create an optimizer script
 
void printStitcherScript (std::ostream &o, const PanoramaOptions &target, const UIntSet &imgs) const
 create the stitcher script
 
void addObserver (PanoramaObserver *o)
 add a panorama observer.
 
bool removeObserver (PanoramaObserver *observer)
 remove a panorama observer.
 
void clearObservers ()
 remove all panorama observers.
 
const bool hasPendingChanges () const
 return if the panorama class has pending changes normally all controls listen to panoramaChanges notification and react only there, but the fast preview window also reacts to changes in the Redraw procedure to handle the tools like drag or crop, use this as workaround (it does not include all changes)
 
void changeFinished (bool keepDirty)
 notify observers about changes in this class
 
void changeFinished ()
 notify observers about changes in this class
 
void imageChanged (unsigned int imgNr)
 mark image for change notification.
 
void updateMasksForImage (unsigned int imgNr, MaskPolygonVector newMasks)
 set complete mask list for image with number
 
void updateMasks (bool convertPosMaskToNeg=false)
 updates all active masks
 
void transferMask (MaskPolygon mask, unsigned int imgNr, const UIntSet &targetImgs)
 transfers given mask from image imgNr to all targetImgs
 
void updateOptimizeVector ()
 updates the optimize vector according to master switches
 
std::set< size_tgetRefImages ()
 returns set of reference image and images linked with reference images
 
void checkRefOptStatus (bool &linkRefImgsYaw, bool &linkRefImgsPitch, bool &linkRefImgsRoll)
 checks if yaw/pitch/roll of reference image can be check, it depends on number and type of control points
 
virtual PanoramaDataMementogetNewMemento () const
 get the internal state
 
virtual bool setMementoToCopyOf (const PanoramaDataMemento *const memento)
 set the internal state
 
PanoramaMemento getMemento () const
 get the internal state
 
void setMemento (const PanoramaMemento &memento)
 set the internal state
 
bool needsOptimization ()
 true if control points or lens variables have been changed after the last optimisation
 
void markAsOptimized (bool optimized=true)
 
bool ReadPTOFile (const std::string &filename, const std::string &prefix="")
 read pto file from the given filename into Panorama object it does some checks on the file and issues warnings to std::cerr
 
bool WritePTOFile (const std::string &filename, const std::string &prefix="")
 write data to given pto file
 
bool isDirty () const
 true if there are unsaved changes
 
virtual void clearDirty ()
 clear dirty flag.
 
void setFilePrefix (std::string prefix)
 sets the path prefix of the images reffered with relative paths
 
void reset ()
 clear the internal state.
 
- Public Member Functions inherited from HuginBase::ManagedPanoramaData
virtual ~ManagedPanoramaData ()
 
- Public Member Functions inherited from HuginBase::PanoramaData
virtual ~PanoramaData ()
 
- Public Member Functions inherited from AppBase::DocumentData
virtual ~DocumentData ()
 

Protected Member Functions

void setDirty (const bool &dirty=true)
 
std::string getFilePrefix () const
 
void adjustVarLinks ()
 adjust the links of the linked variables, must be called when a lens has been changed.
 

Private Member Functions

void centerCrop (unsigned int imgNr)
 center the crop for given image and all linked images
 
vigra::Rect2D centerCropImage (unsigned int imgNr)
 return the centered crop for given image
 
void updateCropMode (unsigned int imgNr)
 update the crop mode in dependence of crop rect and lens projection
 

Private Attributes

std::string imgFilePrefix
 
bool dirty
 this indicates that there are unsaved changes
 
PanoramaMemento state
 
std::list< PanoramaObserver * > observers
 
UIntSet changedImages
 the images that have been changed since the last changeFinished()
 
bool m_forceImagesUpdate
 
std::set< std::string > m_ptoptimizerVarNames
 

Detailed Description

Model for a panorama.

This class contains the properties of a panorama That is:

view and controller classes can get information about these with the getXXX Functions.

Images and Control points are numbered, and const references are handed out. this means that all interaction will be based on image/control point numbers. The references are not stable, they might disappear when other functions of this class are called, so its best to get a new reference whenever you need the object.

This also means that the whole object is not threadsafe and concurrent access has to be synchronized from the outside.

Changes should be made through command objects, not with direct calls.

Todo:
should the changer call the report() functions?
Todo:
should we add constraints for the simple / advanced functionality to the model? I have to think a bit more about that issue. maybe the contraints can be factored out into another class that corrects then when updating. or we could have different models.. SimplePanorama and AdvancedPanorama.

also, it is useful to use the memento pattern for the internal state, so that redo/undo for complex interactions can be implemented without too much pain.

Definition at line 152 of file Panorama.h.

Constructor & Destructor Documentation

◆ Panorama()

HuginBase::Panorama::Panorama ( )

ctor.

Definition at line 41 of file Panorama.cpp.

References m_ptoptimizerVarNames.

◆ ~Panorama()

HuginBase::Panorama::~Panorama ( )

dtor.

Definition at line 62 of file Panorama.cpp.

References DEBUG_TRACE, and reset().

Member Function Documentation

◆ activateImage()

void HuginBase::Panorama::activateImage ( unsigned int  imgNr,
bool  active = true 
)
virtual

mark an image as active or inactive.

This is only a flag, that can be turned on or off. If an image is marked active, then it should be used for optimizing and stitching.

However, this is not done automatically. One has to use getActiveImages() to get the numbers of the active images, and pass these to the respective functions that do the stitching or optimisation

Implements HuginBase::PanoramaData.

Definition at line 1575 of file Panorama.cpp.

References imageChanged(), HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by EnableImages(), main2(), and PanoCommand::SetActiveImagesCmd::processPanorama().

◆ addCtrlPoint()

unsigned int HuginBase::Panorama::addCtrlPoint ( const ControlPoint point)
virtual

◆ addImage()

unsigned int HuginBase::Panorama::addImage ( const SrcPanoImage img)
virtual

◆ addObserver()

void HuginBase::Panorama::addObserver ( PanoramaObserver o)
virtual

◆ adjustVarLinks()

void HuginBase::Panorama::adjustVarLinks ( )
protected

adjust the links of the linked variables, must be called when a lens has been changed.

◆ centerCrop()

void HuginBase::Panorama::centerCrop ( unsigned int  imgNr)
private

center the crop for given image and all linked images

Definition at line 1184 of file Panorama.cpp.

References centerCropImage(), getNrOfImages(), imageChanged(), HuginBase::PanoramaMemento::images, HuginBase::BaseSrcPanoImage::NO_CROP, state, and threshold().

Referenced by changeFinished().

◆ centerCropImage()

vigra::Rect2D HuginBase::Panorama::centerCropImage ( unsigned int  imgNr)
private

return the centered crop for given image

Definition at line 1167 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, HuginBase::BaseSrcPanoImage::NO_CROP, hugin_utils::roundi(), state, and threshold().

Referenced by centerCrop().

◆ changeControlPoint()

void HuginBase::Panorama::changeControlPoint ( unsigned int  pNr,
const ControlPoint point 
)
virtual

◆ changeFinished() [1/2]

void HuginBase::Panorama::changeFinished ( )
inlinevirtual

notify observers about changes in this class

This needs to be called explicitly by somebody after changes have been made. Allows to compress multiple changes into one notification.

Implements HuginBase::ManagedPanoramaData.

Definition at line 564 of file Panorama.h.

◆ changeFinished() [2/2]

void HuginBase::Panorama::changeFinished ( bool  keepDirty)

notify observers about changes in this class

This needs to be called explicitly by somebody after changes have been made. Allows to compress multiple changes into one notification.

Parameters
keepDirtydo not set dirty flag. useful for changing the dirty flag itself

Definition at line 831 of file Panorama.cpp.

References centerCrop(), changedImages, DEBUG_DEBUG, DEBUG_TRACE, dirty, HuginBase::PanoramaMemento::images, m_forceImagesUpdate, observers, AppBase::DocumentData::setDirty(), state, threshold(), updateCropMode(), updateMasks(), and updateOptimizeVector().

Referenced by MainFrame::OnIgnoreLineCp(), SetCropToImages(), MainFrame::SetOptimizeIgnoreLineCp(), and MainFrame::SetOptimizeOnlyActiveImages().

◆ checkRefOptStatus()

void HuginBase::Panorama::checkRefOptStatus ( bool linkRefImgsYaw,
bool linkRefImgsPitch,
bool linkRefImgsRoll 
)
virtual

◆ clearDirty()

virtual void HuginBase::Panorama::clearDirty ( )
inlinevirtual

clear dirty flag.

call after save

Implements HuginBase::ManagedPanoramaData.

Definition at line 645 of file Panorama.h.

References AppBase::DocumentData::clearDirty().

Referenced by MainFrame::OnSaveProject().

◆ clearObservers()

void HuginBase::Panorama::clearObservers ( )
virtual

remove all panorama observers.

Warning
this is a hack. it must not be used on normal Panorama's.

Implements HuginBase::ManagedPanoramaData.

Definition at line 1558 of file Panorama.cpp.

References observers.

◆ duplicate()

Panorama HuginBase::Panorama::duplicate ( ) const

◆ getActiveImages()

UIntSet HuginBase::Panorama::getActiveImages ( ) const
virtual

get active images

Implements HuginBase::PanoramaData.

Definition at line 1585 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by PreviewColorPickerTool::CalcCorrection(), PanoPanel::CheckHasImages(), PanoPanel::DoCalcFOV(), PanoPanel::DoCalcOptimalROI(), PanoPanel::DoCalcOptimalWidth(), PreviewEditCPTool::FindCPInRect(), HuginQueue::detail::GenerateFinalArgfile(), GenerateThumbnail(), ToolHelper::GetImagesUnderPos(), HuginQueue::GetStitchingCommandQueue(), HuginQueue::GetStitchingCommandQueueUserOutput(), main(), main2(), ImagesTreeCtrl::OnActivateImage(), GLPreviewFrame::OnAutocrop(), GLPreviewFrame::OnAutocropOutside(), GLPreviewFrame::OnCenterHorizontally(), PreviewFrame::OnCenterHorizontally(), ImageToogleButtonEventHandler::OnChange(), PreviewFrame::OnChangeDisplayedImgs(), GLPreviewFrame::OnCreateCP(), ImagesTreeCtrl::OnDeactivateImage(), GLPreviewFrame::OnDefaultExposure(), PreviewFrame::OnDefaultExposure(), ImageToogleButtonEventHandler::OnEnter(), ImageGroupButtonEventHandler::OnEnter(), GLPreviewFrame::OnFitPano(), PreviewFrame::OnFitPano(), ImageToogleButtonEventHandler::OnLeave(), ImageGroupButtonEventHandler::OnLeave(), OptimizePanel::OnOptimizeButton(), OptimizePhotometricPanel::OnOptimizeButton(), GLPreviewFrame::OnShowAll(), GLPreviewFrame::OnStackAutocrop(), PanoOutputDialog::PanoOutputDialog(), GLPreviewFrame::panoramaChanged(), PreviewFrame::panoramaChanged(), GLPreviewFrame::panoramaImagesChanged(), PreviewFrame::panoramaImagesChanged(), ImagesTreeCtrl::panoramaImagesChanged(), BrowsePTOFilesDialog::ParsePTOFile(), SetCrop(), PanoPanel::StackCheck(), RunStitchPanel::StitchProject(), PanoPanel::UpdateDisplay(), CPListCtrl::UpdateInternalCPList(), PreviewLayoutLinesTool::updateLineInformation(), and PreviewPanel::updatePreview().

◆ getCtrlPoint()

const ControlPoint & HuginBase::Panorama::getCtrlPoint ( std::size_t  nr) const
inlinevirtual

get a control point, counting starts with 0

Implements HuginBase::PanoramaData.

Definition at line 312 of file Panorama.h.

References threshold().

Referenced by CPImagesComboBox::CalcCPDistance(), CPListCtrl::OnGetItemText(), CPEditorPanel::ShowControlPoint(), and PreviewLayoutLinesTool::updateLineInformation().

◆ getCtrlPoints()

const CPVector & HuginBase::Panorama::getCtrlPoints ( ) const
inlinevirtual

◆ getCtrlPointsForImage()

std::vector< unsigned int > HuginBase::Panorama::getCtrlPointsForImage ( unsigned int  imgNr) const
virtual

return all control points for a given image.

Implements HuginBase::PanoramaData.

Definition at line 83 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, state, and threshold().

Referenced by main2(), and ImagesTreeCtrl::UpdateImageText().

◆ getCtrlPointsVectorForImage()

CPointVector HuginBase::Panorama::getCtrlPointsVectorForImage ( unsigned int  imgNr) const

return a vector of std::pairs with global ctrl point nr and ControlPoint In the class ControlPoint the image with imgNr is always image1

Definition at line 96 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, HuginBase::ControlPoint::mirror(), state, and threshold().

Referenced by PanoOperation::CelesteOperation::GetInternalCommand(), and main().

◆ getFilePrefix()

std::string HuginBase::Panorama::getFilePrefix ( ) const
inlineprotected

Definition at line 668 of file Panorama.h.

◆ getICCProfileDesc()

const std::string HuginBase::Panorama::getICCProfileDesc ( ) const

return description of icc profile used for pano

Definition at line 1598 of file Panorama.cpp.

References HuginBase::PanoramaMemento::iccProfileDesc, and state.

Referenced by PanoCommand::wxAddImagesCmd::processPanorama(), and PanoCommand::wxApplyTemplateCmd::processPanorama().

◆ getImage()

const SrcPanoImage & HuginBase::Panorama::getImage ( std::size_t  nr) const
inlinevirtual

get a panorama image, counting starts with 0

Implements HuginBase::PanoramaData.

Definition at line 211 of file Panorama.h.

References threshold().

Referenced by HuginLines::_getFilteredLines(), AddGeometricControlPoint(), PreviewEditCPTool::AddLineCP(), PreviewControlPointTool::AfterDrawImagesEvent(), alignStereoWindow(), PanoCommand::applyColorBalanceValue(), ApplyLensDBParameters(), ImageVariableDialog::ApplyNewVariables(), ApplyTemplate(), AutoPanoSift::automatch(), AutoPanoKolor::automatch(), AutoPanoSiftStack::automatch(), AutoPanoSiftMultiRowStack::automatch(), PanoDetector::buildMultiRowImageSets(), PreviewColorPickerTool::CalcCorrection(), PreviewColorPickerTool::CalcCorrectionForImage(), Parser::CalculateConstant(), CheckAndAddPoint(), CheckCondition(), CheckLensStacks(), CreateMissingImages(), MaskEditorPanel::DisplayCrop(), PanoOutputDialog::EnableOutputOptions(), CPEditorPanel::estimateAndAddOtherPoint(), FillPlaceholders(), PreviewEditCPTool::FindCPInRect(), ViewState::FinishedDraw(), PossiblePano::GeneratePanorama(), GenerateThumbnail(), HuginQueue::GetAssistantCommandQueueUserDefined(), HuginBase::getCPinMasks(), HuginBase::getCPoutsideLimit_pair(), getDefaultOutputName(), getDefaultProjectName(), PanoOperation::AddImagesSeriesOperation::GetInternalCommand(), PanoOperation::RemoveImageOperation::GetInternalCommand(), PanoOperation::ChangeLensOperation::GetInternalCommand(), PanoOperation::LoadLensOperation::GetInternalCommand(), PanoOperation::SaveLensOperation::GetInternalCommand(), PanoOperation::ResetOperation::GetInternalCommand(), PanoOperation::CelesteOperation::GetInternalCommand(), PanoOperation::ChangeStackOperation::GetInternalCommand(), GetNewProjectFilename(), getRefImages(), MaskEditorPanel::GetRot(), HuginQueue::GetStitchingCommandQueue(), HuginQueue::GetStitchingCommandQueueUserOutput(), getUnlinkedSubset(), ImageVariableDialog::InitValues(), GLPreviewFrame::LoadImages(), loadImgsAndExtractPoints(), main(), main2(), mergePanorama(), CPEditorPanel::NewPointChange(), ImagesTreeCtrl::OnBeginEdit(), CPEditorPanel::OnCelesteButton(), ImagesTreeCtrl::OnChar(), ImagesTreeCtrl::OnContextMenu(), GLPreviewFrame::OnCreateCP(), ImagesTreeCtrl::OnEndEdit(), MainFrame::OnFineTuneAll(), ImagesPanel::OnFocalLengthChanged(), ImagesPanel::OnLensTypeChanged(), MainFrame::OnLoadingFailed(), MaskEditorPanel::OnMaskCopy(), MaskEditorPanel::OnMaskLoad(), MaskEditorPanel::OnMaskPaste(), MaskEditorPanel::OnMaskSave(), LensCalFrame::OnSaveLens(), ImagesPanel::OnSelectionChanged(), ImageVariableDialog::OnShowDistortionGraph(), HuginBase::SortVectorByExposure::operator()(), SortVectorByExposure::operator()(), SortImageVectorEV::operator()(), LensCalFrame::Optimize(), Parser::PanoParseExpression(), GLPreviewFrame::panoramaChanged(), ViewState::panoramaChanged(), GLPreviewFrame::panoramaImagesChanged(), PreviewFrame::panoramaImagesChanged(), CPEditorPanel::panoramaImagesChanged(), MaskEditorPanel::panoramaImagesChanged(), CPEditorPanel::PointFineTune(), HuginQueue::detail::PrintDetailInfo(), PanoDetector::printFilenames(), PrintImageInfo(), PanoCommand::DistributeImagesCmd::processPanorama(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxApplyTemplateCmd::processPanorama(), PanoCommand::wxAddCtrlPointGridCmd::processPanorama(), PTOCopyMove(), ReadPanoramaOptionsFromIni(), GenerateSequenceDialog::ReadPTOFile(), AutoCtrlPointCreator::readUpdatedControlPoints(), GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), GLPlaneOverviewRenderer::Redraw(), HuginBase::LensDB::SaveLensDataFromPano(), SaveLensParameters(), ImagesTreeCtrl::SelectAllParameters(), SetCropToImages(), SetGeometricControlPointsOverlap(), SetGeometricControlPointsUnconnected(), MaskEditorPanel::setImage(), CPEditorPanel::setLeftImage(), CPEditorPanel::setRightImage(), transferMask(), ImagesTreeCtrl::UpdateGroupText(), MaskEditorPanel::UpdateImage(), ImagesTreeCtrl::UpdateImageText(), ImagesTreeCtrl::UpdateItemFont(), PreviewLayoutLinesTool::updateLineInformation(), ImagesPanel::UpdatePreviewImage(), Parser::UpdateSingleVar(), CPEditorPanel::UpdateTransforms(), and PanoDetector::writeKeyfile().

◆ getImageVariables()

const VariableMap HuginBase::Panorama::getImageVariables ( unsigned int  imgNr) const
virtual

Get the variables of an image.

Should not be used for most GUI stuff, use the getImage(imgNr).get* methods instead for each variable you want.

Todo:
change things using this to use getImage(imgNr).get*() instead.

Implements HuginBase::PanoramaData.

Definition at line 128 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by ApplyLensParameters(), PanoOperation::ResetOperation::GetInternalCommand(), CPEditorPanel::panoramaImagesChanged(), SaveLensParameters(), CPEditorPanel::setLeftImage(), and CPEditorPanel::setRightImage().

◆ getMaxExposureDifference()

const double HuginBase::Panorama::getMaxExposureDifference ( ) const

returns the maximum exposure value difference of all images in the project

Definition at line 2120 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by hasPossibleStacks(), and PanoCommand::wxAddImagesCmd::processPanorama().

◆ getMemento()

PanoramaMemento HuginBase::Panorama::getMemento ( ) const
inline

get the internal state

Definition at line 602 of file Panorama.h.

Referenced by getNewMemento(), and PanoCommand::wxApplyTemplateCmd::processPanorama().

◆ getNewCopy()

PanoramaData * HuginBase::Panorama::getNewCopy ( ) const
inlinevirtual

Implements HuginBase::PanoramaData.

Definition at line 189 of file Panorama.h.

◆ getNewMemento()

PanoramaDataMemento * HuginBase::Panorama::getNewMemento ( ) const
virtual

get the internal state

Implements HuginBase::ManagedPanoramaData.

Definition at line 1526 of file Panorama.cpp.

References getMemento().

◆ getNewSubset()

PanoramaData * HuginBase::Panorama::getNewSubset ( const UIntSet imgs) const
inlinevirtual

◆ getNextCPTypeLineNumber()

int HuginBase::Panorama::getNextCPTypeLineNumber ( ) const
virtual

get the number of a control point

get the next unused line number for t3, ... control point creation

Implements HuginBase::PanoramaData.

Definition at line 2010 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, state, and threshold().

Referenced by mergePanorama(), and CPEditorPanel::panoramaChanged().

◆ getNrOfBands()

const int HuginBase::Panorama::getNrOfBands ( ) const

return number of bands of first image (without alpha channel) so it can be 1 for grayscale or 3 for rgb images

Definition at line 1608 of file Panorama.cpp.

References HuginBase::PanoramaMemento::bands, and state.

Referenced by PanoCommand::wxAddImagesCmd::processPanorama(), and PanoCommand::wxApplyTemplateCmd::processPanorama().

◆ getNrOfCtrlPoints()

std::size_t HuginBase::Panorama::getNrOfCtrlPoints ( ) const
inlinevirtual

◆ getNrOfImages()

std::size_t HuginBase::Panorama::getNrOfImages ( ) const
inlinevirtual

number of images.

Implements HuginBase::PanoramaData.

Definition at line 205 of file Panorama.h.

Referenced by alignStereoWindow(), PanoCommand::applyColorBalanceValue(), ApplyTemplate(), AutoPanoSift::automatch(), AutoPanoSiftMultiRow::automatch(), AutoPanoSiftMultiRowStack::automatch(), AutoPanoSiftPreAlign::automatch(), AutoPanoSift::automatch(), AutoPanoSiftPreAlign::automatch(), centerCrop(), CheckCondition(), CheckLensStacks(), CheckProjectFile(), MeshManager::CheckUpdate(), TextureManager::CheckUpdate(), GLPreviewFrame::CleanButtonColours(), TextureManager::CleanTextures(), ImagesPanel::CPGenerate(), CreateMissingImages(), GenerateSequenceDialog::DoGeneratePanorama(), PanoPanel::DoSendToBatch(), PanoPanel::DoStitch(), PanoPanel::DoUserDefinedStitch(), EnableImages(), PanoOutputDialog::EnableOutputOptions(), FillPlaceholders(), ViewState::FinishedDraw(), GenerateSequenceDialog::GenerateFileList(), HuginQueue::detail::GenerateFinalArgfile(), PossiblePano::GeneratePanorama(), GenerateThumbnail(), HuginQueue::GetAssistantCommandQueue(), HuginQueue::GetAssistantCommandQueueUserDefined(), HuginBase::getCPoutsideLimit_pair(), getDefaultOutputName(), getDefaultProjectName(), ToolHelper::GetImagesUnderPos(), PanoOperation::AddImagesSeriesOperation::GetInternalCommand(), PanoOperation::ResetOperation::GetInternalCommand(), PanoOperation::AssignStacksOperation::GetInternalCommand(), GetNewProjectFilename(), LensCalFrame::GetPanorama(), getRefImages(), HuginBase::getSortedStacks(), getSubset(), getUnlinkedSubset(), GLPreviewFrame::HasNonZeroTranslationPlaneParameters(), Papywizard::ImportPapywizardFile(), PanoOperation::ImageVariablesExpressionOperation::IsEnabled(), PanoOperation::NewLensOperation::IsEnabled(), PanoOperation::ChangeLensOperation::IsEnabled(), PanoOperation::RemoveControlPointsOperation::IsEnabled(), PanoOperation::ResetOperation::IsEnabled(), PanoOperation::NewStackOperation::IsEnabled(), PanoOperation::ChangeStackOperation::IsEnabled(), PanoOperation::AssignStacksOperation::IsEnabled(), GenerateSequenceDialog::IsValidPanorama(), loadImgsAndExtractPoints(), PanoDetector::loadProject(), MainFrame::LoadProjectFile(), main(), main2(), PreviewControlPointTool::MakeTransforms(), PanoDetector::matchMultiRow(), mergePanorama(), DragTool::MouseButtonEvent(), moveImage(), ImagesTreeCtrl::OnBeginDrag(), PreviewFrame::OnChangeDisplayedImgs(), ImagesPanel::OnCropFactorChanged(), MainFrame::OnFineTuneAll(), ImagesPanel::OnFocalLengthChanged(), GenerateSequenceDialog::OnGeneratePreview(), ImagesTreeCtrl::OnLeftUp(), MainFrame::OnLoadingFailed(), CPEditorPanel::OnNextImg(), GLPreviewFrame::OnNumTransform(), PreviewFrame::OnNumTransform(), RawImportDialog::OnOk(), OptimizePanel::OnOptimizeButton(), OptimizePhotometricPanel::OnOptimizeButton(), CPEditorPanel::OnPrevImg(), iCPApp::OnRun(), MainFrame::OnSavePTStitcherAs(), GLPreviewFrame::OnShowAll(), PreviewFrame::OnShowAll(), GLPreviewFrame::OnShowNone(), PreviewFrame::OnShowNone(), GLPreviewFrame::OnStraighten(), PreviewFrame::OnStraighten(), GLPreviewFrame::OnToolModeChanging(), Parser::PanoParseExpression(), GLPreviewFrame::panoramaChanged(), ImagesTreeCtrl::panoramaChanged(), PreviewFrame::panoramaChanged(), ViewState::panoramaChanged(), GLPreviewFrame::panoramaImagesChanged(), PreviewFrame::panoramaImagesChanged(), CPEditorPanel::panoramaImagesChanged(), ImagesPanel::panoramaImagesChanged(), ImagesTreeCtrl::panoramaImagesChanged(), MainFrame::panoramaImagesChanged(), MaskEditorPanel::panoramaImagesChanged(), OptimizePanel::panoramaImagesChanged(), OptimizePhotometricPanel::panoramaImagesChanged(), BrowsePTOFilesDialog::ParsePTOFile(), PanoDetector::printFilenames(), PrintImageInfo(), PanoCommand::SetActiveImagesCmd::processPanorama(), PanoCommand::UpdateCropFactorCmd::processPanorama(), PanoCommand::DistributeImagesCmd::processPanorama(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxApplyTemplateCmd::processPanorama(), PTOCopyMove(), Project::ReadOptions(), ReadPanoramaOptionsFromIni(), GenerateSequenceDialog::ReadPTOFile(), GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), GLPlaneOverviewRenderer::Redraw(), VisualizationState::RequireRecalculateMesh(), GLPreviewFrame::ResetTranslationPlaneParameters(), PanoDetector::run(), MainFrame::RunAssistant(), HuginBase::LensDB::SaveLensDataFromPano(), ImagesTreeCtrl::SelectAllParameters(), SetCrop(), SetGeometricControlPointsOverlap(), SetGeometricControlPointsUnconnected(), ImagesTreeCtrl::SetGroupMode(), ViewState::SetOptions(), VisualizationState::SetScale(), MaskEditorPanel::SetSingleSelection(), UnLinkVars(), MeshManager::MeshInfo::Update(), GenerateSequenceDialog::UpdateCounters(), UpdateCropFactor(), UpdateFocalLength(), PreviewLayoutLinesTool::updateImageCentres(), PreviewLayoutLinesTool::updateLineInformation(), updateMasks(), updateOptimizeVector(), ImagesPanel::UpdatePreviewImage(), updateWhiteBalance(), ViewState::ViewState(), VisualizationState::VisualizationState(), work_on_triplets(), and WritePTOFile().

◆ getOptimizerSwitch()

const int HuginBase::Panorama::getOptimizerSwitch ( ) const
inlinevirtual

◆ getOptimizeVector()

const OptimizeVector & HuginBase::Panorama::getOptimizeVector ( ) const
inlinevirtual

◆ getOptions()

const PanoramaOptions & HuginBase::Panorama::getOptions ( ) const
inlinevirtual

returns the options for this panorama

Note
Is this the most appropriate way to remember which variables need optimisation? Can we have optimisation information in ImageVariables instead now?

Implements HuginBase::PanoramaData.

Definition at line 481 of file Panorama.h.

Referenced by AddGeometricControlPoint(), PreviewEditCPTool::AddLineCP(), PreviewDifferenceTool::AfterDrawImagesEvent(), alignStereoWindow(), PanoCommand::applyColorBalanceValue(), autoCrop(), AutoPanoSiftMultiRow::automatch(), TextureManager::Begin(), PanoPanel::BlenderChanged(), PreviewColorPickerTool::CalcCorrection(), PreviewColorPickerTool::CalcCorrectionForImage(), PanoPanel::CheckFreeSpace(), PanoPanel::CheckGoodSize(), checkRefOptStatus(), AutoCtrlPointCreator::Cleanup(), PanoPanel::DoCalcFOV(), PanoPanel::DoCalcOptimalROI(), PanoPanel::DoCalcOptimalWidth(), PreviewPanel::DrawPreview(), PanoPanel::FileFormatChanged(), FillPlaceholders(), PreviewEditCPTool::FindCPInRect(), ViewState::FinishedDraw(), HuginQueue::detail::GenerateFinalArgfile(), PossiblePano::GeneratePanorama(), PerspectiveImageCtrl::GenerateRemappedImage(), GenerateThumbnail(), HuginBase::getCPoutsideLimit_pair(), PanoOperation::ChangeAnchorImageOperation::GetInternalCommand(), PanoOperation::ChangeColorAnchorImageOperation::GetInternalCommand(), PanoOperation::ResetOperation::GetInternalCommand(), LensCalFrame::GetPanorama(), getRefImages(), PreviewEditCPTool::GetSelectedROI(), HuginQueue::GetStitchingCommandQueue(), HuginQueue::GetStitchingCommandQueueUserOutput(), getUnlinkedSubset(), CPEditorPanel::getVerticalCPBias(), GLPreviewFrame::GLPreviewFrame(), PanoPanel::HDRFileFormatChanged(), PanoPanel::HeightChanged(), PanoPanel::HFOVChanged(), main(), main2(), main2(), GLPreviewFrame::OnAutocrop(), GLPreviewFrame::OnAutocropOutside(), PanoPanel::OnBlenderOptions(), PreviewFrame::OnChangeFOV(), GLPreviewFrame::OnChangeProjectionParam(), GLPreviewFrame::OnCreateCP(), GLPreviewFrame::OnDecreaseExposure(), PreviewFrame::OnDecreaseExposure(), GLPreviewFrame::OnDefaultExposure(), PreviewFrame::OnDefaultExposure(), PanoPanel::OnEdgeFillChanged(), PanoPanel::OnEdgeFillOptions(), GLPreviewFrame::OnExposureChanged(), PreviewFrame::OnExposureTextChanged(), GLPreviewFrame::OnFitPano(), PreviewFrame::OnFitPano(), PanoPanel::OnFusionOptions(), PanoPanel::OnHDRMergeOptions(), PanoPanel::OnHDRTIFFCompression(), GLPreviewFrame::OnHFOVChanged(), GLPreviewFrame::OnIncreaseExposure(), PreviewFrame::OnIncreaseExposure(), PanoPanel::OnJPEGQualityText(), ImagesPanel::OnMaxEvDiffChanged(), ImagesPanel::OnMinimumOverlapChanged(), PanoPanel::OnNormalTIFFCompression(), PreviewFrame::OnOutputChoice(), PanoPanel::OnOutputFilesChanged(), GLPreviewFrame::OnProjectionChoice(), PreviewFrame::OnProjectionChoice(), GLPreviewFrame::OnProjParameterChanged(), GLPreviewFrame::OnProjParameterReset(), PreviewFrame::OnProjParameterReset(), GLPreviewFrame::OnRangeCompressionChanged(), GLPreviewFrame::OnRangeCompressionDecrease(), PreviewFrame::OnRangeCompressionDecrease(), GLPreviewFrame::OnRangeCompressionIncrease(), PreviewFrame::OnRangeCompressionIncrease(), PreviewFrame::OnRangeCompressionTextChanged(), PanoPanel::OnRemapperOptions(), GLPreviewFrame::OnResetCrop(), GLPreviewFrame::OnROIChanged(), MainFrame::OnSavePTStitcherAs(), GLPreviewFrame::OnSetCropAspect(), GLPreviewFrame::OnStackAutocrop(), PreviewFrame::OnTextCtrlChanged(), GLPreviewFrame::OnTrackChangeProjectionParam(), GLPreviewFrame::OnVFOVChanged(), PanoOutputDialog::PanoOutputDialog(), GLPreviewFrame::panoramaChanged(), ImagesPanel::panoramaChanged(), PanoPanel::panoramaChanged(), PreviewFrame::panoramaChanged(), PreviewPanel::panoramaChanged(), ViewState::panoramaChanged(), ImagesTreeCtrl::panoramaImagesChanged(), BrowsePTOFilesDialog::ParsePTOFile(), PanoCommand::CenterPanoCmd::processPanorama(), PanoCommand::StraightenPanoCmd::processPanorama(), PanoCommand::ResetToMeanExposure::processPanorama(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxNewProjectCmd::processPanorama(), PanoPanel::ProjectionChanged(), Project::ReadOptions(), ReadPanoramaOptionsFromIni(), PanoPanel::RemapperChanged(), PanoPanel::ROIChanged(), OptimizePhotometricPanel::runOptimizer(), ImagesTreeCtrl::SelectAllParameters(), GLPreviewFrame::ShowProjectionWarnings(), PanoPanel::StackCheck(), RunStitchPanel::StitchProject(), transferMask(), ImagesTreeCtrl::UpdateImageText(), PreviewPanel::updatePreview(), CPEditorPanel::UpdateTransforms(), PanoPanel::VFOVChanged(), ViewState::ViewState(), PanoPanel::WidthChanged(), work_on_triplets(), and WritePTOFile().

◆ getPhotometricOptimizerSwitch()

const int HuginBase::Panorama::getPhotometricOptimizerSwitch ( ) const
inlinevirtual

◆ getRefImages()

std::set< size_t > HuginBase::Panorama::getRefImages ( )
virtual

returns set of reference image and images linked with reference images

Implements HuginBase::PanoramaData.

Definition at line 1235 of file Panorama.cpp.

References getImage(), getNrOfImages(), getOptions(), HuginBase::PanoramaOptions::optimizeReferenceImage, and threshold().

Referenced by main(), and updateOptimizeVector().

◆ getSrcImage()

SrcPanoImage HuginBase::Panorama::getSrcImage ( unsigned  imgNr) const
virtual

◆ getSubset()

Panorama HuginBase::Panorama::getSubset ( const UIntSet imgs) const

◆ getUnlinkedSubset()

PanoramaData * HuginBase::Panorama::getUnlinkedSubset ( UIntSetVector imageGroups) const
virtual

get a panorama, which does not contain images linked with positions, the cps are moved to the first image of each linked stacked

Parameters
imageGroupscontains a mapping of the initial images to the new images

Implements HuginBase::PanoramaData.

Definition at line 1790 of file Panorama.cpp.

References HuginBase::FindStackNumberForImage(), getCtrlPoints(), getImage(), getNewSubset(), getNrOfImages(), getOptions(), HuginBase::PanoramaOptions::optimizeReferenceImage, threshold(), and HuginBase::ControlPoint::X_Y.

◆ getVariables()

VariableMapVector HuginBase::Panorama::getVariables ( ) const
virtual

◆ hasPendingChanges()

const bool HuginBase::Panorama::hasPendingChanges ( ) const

return if the panorama class has pending changes normally all controls listen to panoramaChanges notification and react only there, but the fast preview window also reacts to changes in the Redraw procedure to handle the tools like drag or crop, use this as workaround (it does not include all changes)

Definition at line 1563 of file Panorama.cpp.

References changedImages.

Referenced by GLViewer::Redraw().

◆ hasPossibleStacks()

const bool HuginBase::Panorama::hasPossibleStacks ( ) const

return true, if the metadata indicates that the projects is a bracketet project

Definition at line 2137 of file Panorama.cpp.

References fill_set(), HuginBase::getExposureLayers(), getMaxExposureDifference(), HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by PossiblePano::GeneratePanorama(), main(), and PanoCommand::wxAddImagesCmd::processPanorama().

◆ imageChanged()

void HuginBase::Panorama::imageChanged ( unsigned int  imgNr)
virtual

◆ isDirty()

bool HuginBase::Panorama::isDirty ( ) const
inlinevirtual

true if there are unsaved changes

Reimplemented from AppBase::DocumentData.

Definition at line 636 of file Panorama.h.

References DEBUG_WARN, and AppBase::DocumentData::isDirty().

Referenced by MainFrame::CloseProject(), and PanoPanel::DoSendToBatch().

◆ linkPossibleStacks()

void HuginBase::Panorama::linkPossibleStacks ( bool  linkPosition)

◆ markAsOptimized()

void HuginBase::Panorama::markAsOptimized ( bool  optimized = true)
inlinevirtual

◆ mergePanorama()

void HuginBase::Panorama::mergePanorama ( const Panorama newPano)

◆ moveImage()

void HuginBase::Panorama::moveImage ( size_t  img1,
size_t  img2 
)
virtual

◆ needsOptimization()

bool HuginBase::Panorama::needsOptimization ( )
inlinevirtual

true if control points or lens variables have been changed after the last optimisation

Implements HuginBase::ManagedPanoramaData.

Definition at line 614 of file Panorama.h.

Referenced by GLPreviewFrame::panoramaChanged().

◆ printPanoramaScript()

void HuginBase::Panorama::printPanoramaScript ( std::ostream &  o,
const OptimizeVector optvars,
const PanoramaOptions options,
const UIntSet imgs,
bool  forPTOptimizer,
const std::string &  stripPrefix = "" 
) const
virtual

◆ printStitcherScript()

void HuginBase::Panorama::printStitcherScript ( std::ostream &  o,
const PanoramaOptions target,
const UIntSet imgs 
) const
virtual

◆ ReadPTOFile()

bool HuginBase::Panorama::ReadPTOFile ( const std::string &  filename,
const std::string &  prefix = "" 
)

read pto file from the given filename into Panorama object it does some checks on the file and issues warnings to std::cerr

Parameters
filenamethe filename from which is pto file is read
prefixpath prefix to use for filepath mangling
Returns
true, if file could be successful read

Definition at line 2023 of file Panorama.cpp.

References HuginBase::PanoramaMemento::loadPTScript(), setFilePrefix(), setMemento(), and threshold().

Referenced by CheckProjectFile(), GenerateThumbnail(), PanoDetector::loadProject(), main(), HuginExecutor::OnRun(), BrowsePTOFilesDialog::ParsePTOFile(), PanoCommand::LoadPTProjectCmd::processPanorama(), processPTO(), and PTOCopyMove().

◆ removeCtrlPoint()

void HuginBase::Panorama::removeCtrlPoint ( unsigned int  pNr)
virtual

◆ removeDuplicateCtrlPoints()

void HuginBase::Panorama::removeDuplicateCtrlPoints ( )
virtual

removes duplicates control points

Implements HuginBase::PanoramaData.

Definition at line 406 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, imageChanged(), removeCtrlPoint(), state, threshold(), and updateLineCtrlPoints().

Referenced by mergePanorama().

◆ removeImage()

void HuginBase::Panorama::removeImage ( unsigned int  nr)
virtual

creates an image, from filename, and a Lens, if needed

add an Image to the panorama

Returns
image number remove an Image.

also deletes/updates all associated control points and the Lens, if it was only used by this image.

Implements HuginBase::PanoramaData.

Definition at line 329 of file Panorama.cpp.

References HuginBase::PanoramaOptions::colorReferenceImage, HuginBase::PanoramaMemento::ctrlPoints, DEBUG_DEBUG, DEBUG_TRACE, imageChanged(), HuginBase::PanoramaMemento::images, m_forceImagesUpdate, HuginBase::PanoramaOptions::optimizeReferenceImage, HuginBase::PanoramaMemento::options, HuginBase::PanoramaMemento::optvec, state, and threshold().

Referenced by PanoCommand::RemoveImageCmd::processPanorama(), and PanoCommand::RemoveImagesCmd::processPanorama().

◆ removeObserver()

bool HuginBase::Panorama::removeObserver ( PanoramaObserver observer)
virtual

◆ reset()

void HuginBase::Panorama::reset ( )

◆ setCtrlPoints()

void HuginBase::Panorama::setCtrlPoints ( const CPVector points)
virtual

◆ setDirty()

void HuginBase::Panorama::setDirty ( const bool dirty = true)
inlineprotectedvirtual

Reimplemented from AppBase::DocumentData.

Definition at line 652 of file Panorama.h.

References AppBase::DocumentData::setDirty().

◆ setFilePrefix()

void HuginBase::Panorama::setFilePrefix ( std::string  prefix)
inline

sets the path prefix of the images reffered with relative paths

Definition at line 664 of file Panorama.h.

Referenced by ReadPTOFile().

◆ setICCProfileDesc()

void HuginBase::Panorama::setICCProfileDesc ( const std::string &  newDesc)

◆ setImage()

void HuginBase::Panorama::setImage ( std::size_t  nr,
const SrcPanoImage img 
)
inlinevirtual

set a panorama image, counting starts with 0

Implements HuginBase::PanoramaData.

Definition at line 218 of file Panorama.h.

References threshold().

Referenced by PanoDetector::loadProject().

◆ setImageFilename()

void HuginBase::Panorama::setImageFilename ( unsigned int  img,
const std::string &  fname 
)
virtual

set a new image filename

It is assumed that it is of the same size as the old image.

Implements HuginBase::PanoramaData.

Definition at line 373 of file Panorama.cpp.

References DEBUG_ASSERT, imageChanged(), HuginBase::PanoramaMemento::images, m_forceImagesUpdate, state, and threshold().

Referenced by CreateMissingImages(), main(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), and PTOCopyMove().

◆ setMemento()

void HuginBase::Panorama::setMemento ( const PanoramaMemento memento)

◆ setMementoToCopyOf()

bool HuginBase::Panorama::setMementoToCopyOf ( const PanoramaDataMemento *const  memento)
virtual

set the internal state

Implements HuginBase::ManagedPanoramaData.

Definition at line 1484 of file Panorama.cpp.

References DEBUG_DEBUG, setMemento(), and threshold().

◆ setNrOfBands()

void HuginBase::Panorama::setNrOfBands ( const int  nrBands)

◆ setOptimizerSwitch()

void HuginBase::Panorama::setOptimizerSwitch ( const int  newSwitch)
virtual

◆ setOptimizeVector()

void HuginBase::Panorama::setOptimizeVector ( const OptimizeVector optvec)
virtual

◆ setOptions()

void HuginBase::Panorama::setOptions ( const PanoramaOptions opt)
virtual

◆ setPhotometricOptimizerSwitch()

void HuginBase::Panorama::setPhotometricOptimizerSwitch ( const int  newSwitch)
virtual

◆ setSrcImage()

void HuginBase::Panorama::setSrcImage ( unsigned int  nr,
const SrcPanoImage img 
)
virtual

◆ swapImages()

void HuginBase::Panorama::swapImages ( unsigned int  img1,
unsigned int  img2 
)
virtual

◆ transferMask()

void HuginBase::Panorama::transferMask ( MaskPolygon  mask,
unsigned int  imgNr,
const UIntSet targetImgs 
)
virtual

◆ UpdateCropFactor()

void HuginBase::Panorama::UpdateCropFactor ( UIntSet  imgs,
double  newCropFactor 
)
virtual

updates the crop factor, try to keep focal length constant

Definition at line 254 of file Panorama.cpp.

References getNrOfImages(), imageChanged(), HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by PanoCommand::UpdateCropFactorCmd::processPanorama().

◆ updateCropMode()

void HuginBase::Panorama::updateCropMode ( unsigned int  imgNr)
private

update the crop mode in dependence of crop rect and lens projection

Definition at line 1147 of file Panorama.cpp.

References HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, HuginBase::PanoramaMemento::images, HuginBase::BaseSrcPanoImage::NO_CROP, and state.

Referenced by changeFinished().

◆ updateCtrlPointErrors() [1/2]

void HuginBase::Panorama::updateCtrlPointErrors ( const CPVector controlPoints)
virtual

update control points distances.

updates control distances and position in final panorama usually used to set the changes from the optimization. The control points must be the same as in

Implements HuginBase::PanoramaData.

Definition at line 160 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, imageChanged(), state, and threshold().

Referenced by PanoCommand::UpdateVariablesCPCmd::processPanorama(), and PanoCommand::UpdateVariablesCPSetCmd::processPanorama().

◆ updateCtrlPointErrors() [2/2]

void HuginBase::Panorama::updateCtrlPointErrors ( const UIntSet imgs,
const CPVector cps 
)
virtual

update control points for a subset of images.

Usually, the control point subset is created using subset() The number and ordering and control points must not be changed between the call to subset() and this function.

Implements HuginBase::PanoramaData.

Definition at line 135 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, imageChanged(), set_contains(), state, and threshold().

◆ UpdateFocalLength()

void HuginBase::Panorama::UpdateFocalLength ( UIntSet  imgs,
double  newFocalLength 
)
virtual

updates the focal length by changing hfov

Definition at line 227 of file Panorama.cpp.

References getNrOfImages(), imageChanged(), HuginBase::PanoramaMemento::images, state, and threshold().

Referenced by PanoCommand::UpdateFocalLengthCmd::processPanorama().

◆ updateLineCtrlPoints()

void HuginBase::Panorama::updateLineCtrlPoints ( )
virtual

assign new mode line numbers, if required

Implements HuginBase::PanoramaData.

Definition at line 471 of file Panorama.cpp.

References HuginBase::PanoramaMemento::ctrlPoints, imageChanged(), state, and threshold().

Referenced by changeControlPoint(), removeCtrlPoint(), removeDuplicateCtrlPoints(), and setCtrlPoints().

◆ updateMasks()

void HuginBase::Panorama::updateMasks ( bool  convertPosMaskToNeg = false)
virtual

◆ updateMasksForImage()

void HuginBase::Panorama::updateMasksForImage ( unsigned int  imgNr,
MaskPolygonVector  newMasks 
)
virtual

set complete mask list for image with number

Implements HuginBase::PanoramaData.

Definition at line 882 of file Panorama.cpp.

References DEBUG_ASSERT, imageChanged(), HuginBase::PanoramaMemento::images, m_forceImagesUpdate, state, and threshold().

Referenced by main(), mergePanorama(), and PanoCommand::UpdateMaskForImgCmd::processPanorama().

◆ updateOptimizeVector()

void HuginBase::Panorama::updateOptimizeVector ( )
virtual

◆ updateVariable()

void HuginBase::Panorama::updateVariable ( unsigned int  imgNr,
const Variable var 
)
virtual

update a single variable

It knows lenses etc and updates other images when the variable is linked

Implements HuginBase::PanoramaData.

Definition at line 200 of file Panorama.cpp.

References DEBUG_ERROR, HuginBase::Variable::getName(), HuginBase::Variable::getValue(), HuginBase::PanoramaMemento::images, HuginBase::PanoramaMemento::needsOptimization, and state.

Referenced by PanoCommand::SetVariableCmd::processPanorama(), Parser::UpdateSingleVar(), and updateVariables().

◆ updateVariables() [1/3]

void HuginBase::Panorama::updateVariables ( const UIntSet imgs,
const VariableMapVector var 
)
virtual

update variables for some specific images

Implements HuginBase::PanoramaData.

Definition at line 181 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, state, threshold(), and updateVariables().

◆ updateVariables() [2/3]

void HuginBase::Panorama::updateVariables ( const VariableMapVector vars)
virtual

◆ updateVariables() [3/3]

void HuginBase::Panorama::updateVariables ( unsigned int  imgNr,
const VariableMap var 
)
virtual

Set variables for a single picture.

Implements HuginBase::PanoramaData.

Definition at line 191 of file Panorama.cpp.

References HuginBase::PanoramaMemento::images, state, threshold(), and updateVariable().

◆ updateWhiteBalance()

void HuginBase::Panorama::updateWhiteBalance ( double  redFactor,
double  blueFactor 
)
virtual

update the global white balace of the panorama by multiplying the red and blue factor of each image with given factors

Implements HuginBase::PanoramaData.

Definition at line 2090 of file Panorama.cpp.

References getNrOfImages(), imageChanged(), HuginBase::PanoramaMemento::images, set_contains(), state, and threshold().

Referenced by PanoCommand::UpdateWhiteBalance::processPanorama().

◆ WritePTOFile()

bool HuginBase::Panorama::WritePTOFile ( const std::string &  filename,
const std::string &  prefix = "" 
)

Member Data Documentation

◆ changedImages

UIntSet HuginBase::Panorama::changedImages
private

the images that have been changed since the last changeFinished()

Definition at line 697 of file Panorama.h.

Referenced by changeFinished(), getSubset(), hasPendingChanges(), and imageChanged().

◆ dirty

bool HuginBase::Panorama::dirty
private

this indicates that there are unsaved changes

Definition at line 692 of file Panorama.h.

Referenced by changeFinished(), getSubset(), and reset().

◆ imgFilePrefix

std::string HuginBase::Panorama::imgFilePrefix
private

Definition at line 689 of file Panorama.h.

Referenced by getSubset().

◆ m_forceImagesUpdate

bool HuginBase::Panorama::m_forceImagesUpdate
private

◆ m_ptoptimizerVarNames

std::set<std::string> HuginBase::Panorama::m_ptoptimizerVarNames
private

Definition at line 701 of file Panorama.h.

Referenced by getSubset(), Panorama(), and printStitcherScript().

◆ observers

std::list<PanoramaObserver *> HuginBase::Panorama::observers
private

Definition at line 695 of file Panorama.h.

Referenced by addObserver(), changeFinished(), clearObservers(), duplicate(), and removeObserver().

◆ state

PanoramaMemento HuginBase::Panorama::state
private

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