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

Memento class for a Panorama object. More...

#include <Panorama.h>

Inheritance diagram for HuginBase::PanoramaMemento:
Inheritance graph

Public Member Functions

 PanoramaMemento ()
 
 PanoramaMemento (const PanoramaMemento &o)
 copy ctor.
 
PanoramaMementooperator= (const PanoramaMemento &o)
 assignment operator
 
virtual ~PanoramaMemento ()
 
bool loadPTScript (std::istream &i, int &ptoVersion, const std::string &prefix="")
 load a Hugin file
 
- Public Member Functions inherited from HuginBase::PanoramaDataMemento
virtual ~PanoramaDataMemento ()
 

Private Types

enum  PTParseState {
  P_NONE , P_OUTPUT , P_MODIFIER , P_IMAGE ,
  P_OPTIMIZE , P_CP
}
 

Private Member Functions

void deleteAllImages ()
 

Private Attributes

std::vector< SrcPanoImage * > images
 The images inside the panorama.
 
std::string iccProfileDesc
 description of the icc profile
 
int bands = 0
 number of bands of first image (without alpha channel), currently we can't mix grayscale and RGB images
 
CPVector ctrlPoints
 
PanoramaOptions options
 
OptimizeVector optvec
 
int optSwitch
 stores the optimizer switch, use OR of HuginBase::OptimizerSwitches
 
int optPhotoSwitch
 stores the photometric optimizer switch, use OR of HuginBase::OptimizerSwitches
 
bool needsOptimization
 

Friends

class Panorama
 

Additional Inherited Members

- Protected Member Functions inherited from HuginBase::PanoramaDataMemento
 PanoramaDataMemento ()
 force pure abstract behaviour
 

Detailed Description

Memento class for a Panorama object.

Holds the internal state of a Panorama. Used when other objects need to get/set the state without knowing anything about the internals.

Definition at line 49 of file Panorama.h.

Member Enumeration Documentation

◆ PTParseState

Enumerator
P_NONE 
P_OUTPUT 
P_MODIFIER 
P_IMAGE 
P_OPTIMIZE 
P_CP 

Definition at line 74 of file Panorama.h.

Constructor & Destructor Documentation

◆ PanoramaMemento() [1/2]

HuginBase::PanoramaMemento::PanoramaMemento ( )
inline

Definition at line 55 of file Panorama.h.

◆ PanoramaMemento() [2/2]

HuginBase::PanoramaMemento::PanoramaMemento ( const PanoramaMemento o)

copy ctor.

Definition at line 2240 of file Panorama.cpp.

◆ ~PanoramaMemento()

HuginBase::PanoramaMemento::~PanoramaMemento ( )
virtual

Definition at line 2305 of file Panorama.cpp.

References deleteAllImages().

Member Function Documentation

◆ deleteAllImages()

void HuginBase::PanoramaMemento::deleteAllImages ( )
private

Definition at line 2310 of file Panorama.cpp.

References images, and threshold().

Referenced by operator=(), HuginBase::Panorama::reset(), and ~PanoramaMemento().

◆ loadPTScript()

bool HuginBase::PanoramaMemento::loadPTScript ( std::istream &  i,
int ptoVersion,
const std::string &  prefix = "" 
)

load a Hugin file

initializes the PanoramaMemento from a script file

Todo:
What is the PTGUI special case? What images use the lens created here?
Todo:
Warn the user when the script links variables in a way not expressable by SrcPanoImage.

Definition at line 2322 of file Panorama.cpp.

References HuginBase::PTScriptParsing::ImgInfo::autoCenterCrop, HuginBase::PanoramaOptions::blendMode, check_stack_link, HuginBase::PanoramaOptions::colorReferenceImage, HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, HuginBase::PTScriptParsing::ImgInfo::cropFactor, ctrlPoints, DEBUG_ASSERT, DEBUG_DEBUG, DEBUG_ERROR, DEBUG_TRACE, DEBUG_WARN, HuginBase::PanoramaOptions::EDGE_FILL_SOLID, HuginBase::PanoramaOptions::edgeFillMode, HuginBase::PTScriptParsing::ImgInfo::enabled, HuginBase::PanoramaOptions::ENBLEND_BLEND, HuginBase::PanoramaOptions::enblendOptions, HuginBase::PanoramaOptions::enfuseOptions, HuginBase::PTScriptParsing::ImgInfo::filename, HuginBase::fillVariableMap(), HuginBase::PTScriptParsing::getDoubleParam(), HuginBase::PanoramaOptions::getFormatFromName(), HuginBase::PTScriptParsing::getIntParam(), HuginBase::PanoramaOptions::getProjectionParameters(), HuginBase::PTScriptParsing::getPTParam(), HuginBase::PanoramaOptions::hdrmergeOptions, HuginBase::PTScriptParsing::ImgInfo::height, HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, images, HuginBase::PanoramaOptions::INTERNAL_BLEND, HuginBase::PanoramaOptions::interpolator, HuginBase::PanoramaOptions::JPEG, HuginBase::PanoramaOptions::JPEG_m, HuginBase::PanoramaOptions::keepEdgeFillInput, map_get(), HuginBase::maskOffset, HuginBase::ControlPoint::mirror(), HuginBase::ControlPoint::mode, HuginBase::PanoramaOptions::NO_BLEND, HuginBase::PanoramaOptions::NO_EDGE_FILL, HuginBase::PanoramaOptions::NONA, HuginBase::PanoramaOptions::optimizeReferenceImage, options, optPhotoSwitch, optSwitch, optvec, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputFormat, HuginBase::PanoramaOptions::outputHDRBlended, HuginBase::PanoramaOptions::outputHDRLayers, HuginBase::PanoramaOptions::outputHDRStacks, HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeCompression, HuginBase::PanoramaOptions::outputImageTypeHDR, HuginBase::PanoramaOptions::outputImageTypeHDRCompression, HuginBase::PanoramaOptions::outputLayersCompression, HuginBase::PanoramaOptions::outputLayersExposureDiff, HuginBase::PanoramaOptions::outputLDRBlended, HuginBase::PanoramaOptions::outputLDRExposureBlended, HuginBase::PanoramaOptions::outputLDRExposureLayers, HuginBase::PanoramaOptions::outputLDRExposureLayersFused, HuginBase::PanoramaOptions::outputLDRExposureRemapped, HuginBase::PanoramaOptions::outputLDRLayers, HuginBase::PanoramaOptions::outputLDRStacks, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputPixelType, HuginBase::PanoramaOptions::outputRangeCompression, HuginBase::PanoramaOptions::outputStacksMinOverlap, Pitch, HuginBase::PanoramaOptions::PTBLENDER_BLEND, HuginBase::PanoramaOptions::PTMASKER_BLEND, HuginBase::PanoramaOptions::PTMENDER, HuginBase::PanoramaOptions::quality, HuginBase::PanoramaOptions::remapper, HuginBase::PanoramaOptions::reset(), Roll, HuginBase::PanoramaOptions::saveCoordImgs, HuginBase::Lens::setCropFactor(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Lens::setImageSize(), HuginBase::MaskPolygon::setImgNr(), HuginBase::Lens::setProjection(), HuginBase::PanoramaOptions::setProjection(), HuginBase::PanoramaOptions::setProjectionParameters(), HuginBase::PanoramaOptions::setROI(), HuginBase::SrcPanoImage::setSize(), HuginBase::PanoramaOptions::setWidth(), HuginBase::PanoramaOptions::SMARTBLEND_BLEND, hugin_utils::stringToInt(), hugin_utils::stringToUInt(), threshold(), HuginBase::PanoramaOptions::TIFF, HuginBase::PanoramaOptions::TIFF_m, HuginBase::PanoramaOptions::TIFF_mask, HuginBase::PanoramaOptions::TIFF_multilayer, HuginBase::PanoramaOptions::TIFF_multilayer_mask, HuginBase::PanoramaOptions::tiff_saveROI, HuginBase::PanoramaOptions::tiffCompression, TranslationPlanePitch, TranslationPlaneYaw, HuginBase::Lens::variableNames, HuginBase::Lens::variables, HuginBase::PTScriptParsing::ImgInfo::varnames, HuginBase::PanoramaOptions::verdandiOptions, HuginBase::PTScriptParsing::ImgInfo::width, X, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, Y, HuginBase::ControlPoint::y1, HuginBase::ControlPoint::y2, and Z.

Referenced by RunStitchPanel::DetectProject(), MainFrame::OnMergeProject(), iCPApp::OnRun(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), Project::ReadOptions(), GenerateSequenceDialog::ReadPTOFile(), HuginBase::Panorama::ReadPTOFile(), AutoCtrlPointCreator::readUpdatedControlPoints(), and RunStitchPanel::StitchProject().

◆ operator=()

PanoramaMemento & HuginBase::PanoramaMemento::operator= ( const PanoramaMemento o)

assignment operator

Todo:
This is quite inefficent, maybe we should store the links as a vector of sets of image numbers for each variable to speed up this? Links / unlinks should all go through the Panorama object, so we could keep track of them easily.

Definition at line 2246 of file Panorama.cpp.

References bands, ctrlPoints, deleteAllImages(), iccProfileDesc, images, needsOptimization, options, optPhotoSwitch, optSwitch, optvec, and threshold().

Friends And Related Symbol Documentation

◆ Panorama

Definition at line 52 of file Panorama.h.

Member Data Documentation

◆ bands

int HuginBase::PanoramaMemento::bands = 0
private

number of bands of first image (without alpha channel), currently we can't mix grayscale and RGB images

Definition at line 95 of file Panorama.h.

Referenced by HuginBase::Panorama::getNrOfBands(), operator=(), and HuginBase::Panorama::setNrOfBands().

◆ ctrlPoints

CPVector HuginBase::PanoramaMemento::ctrlPoints
private

◆ iccProfileDesc

std::string HuginBase::PanoramaMemento::iccProfileDesc
private

description of the icc profile

Definition at line 92 of file Panorama.h.

Referenced by HuginBase::Panorama::getICCProfileDesc(), operator=(), and HuginBase::Panorama::setICCProfileDesc().

◆ images

std::vector<SrcPanoImage *> HuginBase::PanoramaMemento::images
private

The images inside the panorama.

The image variables are stored inside. We use pointers to the real objects so that the memory addresses of them remain constant when we remove and swap the order of images. We should create and free images when necessary.

Definition at line 90 of file Panorama.h.

Referenced by HuginBase::Panorama::activateImage(), HuginBase::Panorama::addImage(), HuginBase::Panorama::centerCrop(), HuginBase::Panorama::centerCropImage(), HuginBase::Panorama::changeFinished(), deleteAllImages(), HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImageVariables(), HuginBase::Panorama::getMaxExposureDifference(), HuginBase::Panorama::getSrcImage(), HuginBase::Panorama::getSubset(), HuginBase::Panorama::getVariables(), HuginBase::Panorama::hasPossibleStacks(), HuginBase::Panorama::linkPossibleStacks(), loadPTScript(), HuginBase::Panorama::moveImage(), operator=(), HuginBase::Panorama::printPanoramaScript(), HuginBase::Panorama::printStitcherScript(), HuginBase::Panorama::removeImage(), HuginBase::Panorama::setImageFilename(), HuginBase::Panorama::setMemento(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setSrcImage(), HuginBase::Panorama::swapImages(), HuginBase::Panorama::transferMask(), HuginBase::Panorama::UpdateCropFactor(), HuginBase::Panorama::updateCropMode(), HuginBase::Panorama::UpdateFocalLength(), HuginBase::Panorama::updateMasks(), HuginBase::Panorama::updateMasksForImage(), HuginBase::Panorama::updateOptimizeVector(), HuginBase::Panorama::updateVariable(), HuginBase::Panorama::updateVariables(), HuginBase::Panorama::updateVariables(), HuginBase::Panorama::updateVariables(), and HuginBase::Panorama::updateWhiteBalance().

◆ needsOptimization

bool HuginBase::PanoramaMemento::needsOptimization
private

◆ options

PanoramaOptions HuginBase::PanoramaMemento::options
private

◆ optPhotoSwitch

int HuginBase::PanoramaMemento::optPhotoSwitch
private

◆ optSwitch

int HuginBase::PanoramaMemento::optSwitch
private

◆ optvec

OptimizeVector HuginBase::PanoramaMemento::optvec
private

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