24 #ifndef _PANODATA_PANORAMA_H 
   25 #define _PANODATA_PANORAMA_H 
   30 #ifndef _HSI_IGNORE_SECTION 
   38 #endif // _HSI_IGNORE_SECTION 
   71         bool loadPTScript(std::istream & i, 
int & ptoVersion, 
const std::string & prefix = 
"");
 
  112         void deleteAllImages();
 
  185              return new Panorama(this->getSubset(imgs));
 
  191              return new Panorama(this->duplicate());
 
  207             return state.images.size();
 
  213             assert(nr < state.images.size());
 
  214             return *state.images[nr];
 
  220             setSrcImage(nr, img);
 
  231         void mergePanorama(
const Panorama &newPano);
 
  246         void removeImage(
unsigned int nr);
 
  252         void swapImages(
unsigned int img1, 
unsigned int img2);
 
  258         void moveImage(
size_t img1, 
size_t img2);
 
  276         void setSrcImage(
unsigned int nr, 
const SrcPanoImage & img);
 
  284         void setImageFilename(
unsigned int img, 
const std::string & fname);
 
  297         void activateImage(
unsigned int imgNr, 
bool active=
true);
 
  300         UIntSet getActiveImages() 
const;
 
  308             return state.ctrlPoints.size();
 
  314             assert(nr < state.ctrlPoints.size());
 
  315             return state.ctrlPoints[nr];
 
  320             { 
return state.ctrlPoints; };
 
  323         std::vector<unsigned int> getCtrlPointsForImage(
unsigned int imgNr) 
const;
 
  327         CPointVector getCtrlPointsVectorForImage(
unsigned int imgNr) 
const;
 
  330         void setCtrlPoints(
const CPVector & points);
 
  337         void removeCtrlPoint(
unsigned int pNr);
 
  341         void removeDuplicateCtrlPoints();
 
  345         void changeControlPoint(
unsigned int pNr, 
const ControlPoint & point);
 
  351         int getNextCPTypeLineNumber() 
const;
 
  354         void updateLineCtrlPoints();
 
  363         void updateCtrlPointErrors(
const CPVector & controlPoints);
 
  371         void updateCtrlPointErrors(
const UIntSet & imgs, 
const CPVector & cps);
 
  374         const std::string getICCProfileDesc() 
const;
 
  376         void setICCProfileDesc(
const std::string& newDesc);
 
  379         const int getNrOfBands() 
const;
 
  381         void setNrOfBands(
const int nrBands);
 
  395         const VariableMap getImageVariables(
unsigned int imgNr) 
const;
 
  410         virtual void updateVariables(
unsigned int imgNr, 
const VariableMap & var);
 
  417         virtual void updateVariable(
unsigned int imgNr, 
const Variable &var);
 
  420         virtual void UpdateFocalLength(
UIntSet imgs, 
double newFocalLength);
 
  422         virtual void UpdateCropFactor(
UIntSet imgs, 
double newCropFactor);
 
  427 #define image_variable( name, type, default_value ) \ 
  428         virtual void linkImageVariable##name(unsigned int sourceImgNr, unsigned int destImgNr); 
  430 #undef image_variable 
  435 #define image_variable( name, type, default_value ) \ 
  436         virtual void unlinkImageVariable##name(unsigned int imgNr); 
  438 #undef image_variable 
  443         virtual void updateWhiteBalance(
double redFactor, 
double blueFactor);
 
  446         const double getMaxExposureDifference() 
const;
 
  448         const bool hasPossibleStacks() 
const;
 
  450         void linkPossibleStacks(
bool linkPosition);
 
  455             { 
return state.optvec; };
 
  462             { 
return state.optSwitch;};
 
  464         void setOptimizerSwitch(
const int newSwitch);
 
  468             { 
return state.optPhotoSwitch; };
 
  470         void setPhotometricOptimizerSwitch(
const int newSwitch);
 
  482             { 
return state.options; };
 
  495         void printPanoramaScript(std::ostream & o,
 
  500                                  const std::string & stripPrefix=
"") 
const;
 
  503         void printStitcherScript(std::ostream & o,
 
  537         void clearObservers();
 
  544         const bool hasPendingChanges() 
const;
 
  555         void changeFinished(
bool keepDirty);
 
  565             { changeFinished(
false); }
 
  572         void imageChanged(
unsigned int imgNr);
 
  581         void updateMasks(
bool convertPosMaskToNeg=
false);
 
  586         void updateOptimizeVector();
 
  588         std::set<size_t> getRefImages();
 
  591         void checkRefOptStatus(
bool& linkRefImgsYaw, 
bool& linkRefImgsPitch, 
bool& linkRefImgsRoll);
 
  615             { 
return state.needsOptimization; };
 
  619             { state.needsOptimization = !optimized; };
 
  631         bool ReadPTOFile(
const std::string& filename, 
const std::string& prefix = 
"");
 
  633         bool WritePTOFile(
const std::string& filename, 
const std::string& prefix = 
"");
 
  665             { imgFilePrefix = prefix; }
 
  669             { 
return imgFilePrefix; }
 
  680         void adjustVarLinks();
 
  683         void centerCrop(
unsigned int imgNr);
 
  685         vigra::Rect2D centerCropImage(
unsigned int imgNr);
 
  687         void updateCropMode(
unsigned int imgNr);
 
  705 #endif // _PANORAMA_H 
std::vector< UIntSet > UIntSetVector
 
std::list< PanoramaObserver * > observers
 
virtual void clearDirty()
 
PanoramaData * getNewSubset(const UIntSet &imgs) const 
 
std::string imgFilePrefix
 
void setFilePrefix(std::string prefix)
sets the path prefix of the images reffered with relative paths 
 
std::set< std::string > m_ptoptimizerVarNames
 
virtual bool isDirty() const 
 
std::vector< SrcPanoImage * > images
The images inside the panorama. 
 
std::size_t getNrOfCtrlPoints() const 
number of control points 
 
a variable has a value and a name. 
 
virtual void clearDirty()
clear dirty flag. 
 
const CPVector & getCtrlPoints() const 
get all control point of this Panorama 
 
int optSwitch
stores the optimizer switch, use OR of HuginBase::OptimizerSwitches 
 
represents a control point 
 
int optPhotoSwitch
stores the photometric optimizer switch, use OR of HuginBase::OptimizerSwitches 
 
std::set< unsigned int > UIntSet
 
std::vector< VariableMap > VariableMapVector
 
virtual void setDirty(const bool &dirty=true)
 
void setDirty(const bool &dirty=true)
 
const OptimizeVector & getOptimizeVector() const 
return the optimize settings stored inside panorama 
 
std::size_t getNrOfImages() const 
number of images. 
 
const ControlPoint & getCtrlPoint(std::size_t nr) const 
get a control point, counting starts with 0 
 
std::vector< MaskPolygon > MaskPolygonVector
 
void changeFinished()
notify observers about changes in this class 
 
std::vector< CPoint > CPointVector
 
std::map< std::string, Variable > VariableMap
 
PanoramaMemento getMemento() const 
get the internal state 
 
const PanoramaOptions & getOptions() const 
returns the options for this panorama 
 
this handler class will receive change events from the Panorama. 
 
const int getPhotometricOptimizerSwitch() const 
return the photometric optimizer master switch 
 
void markAsOptimized(bool optimized=true)
 
Memento class for a Panorama object. 
 
bool isDirty() const 
true if there are unsaved changes 
 
const int getOptimizerSwitch() const 
returns optimizer master switch 
 
Memento class for a PanoramaData object. 
 
UIntSet changedImages
the images that have been changed since the last changeFinished() 
 
bool dirty
this indicates that there are unsaved changes 
 
std::vector< ControlPoint > CPVector
 
PanoramaData * getNewCopy() const 
 
std::vector< std::set< std::string > > OptimizeVector
 
const SrcPanoImage & getImage(std::size_t nr) const 
get a panorama image, counting starts with 0 
 
bool needsOptimization()
true if control points or lens variables have been changed after the last optimisation ...
 
All variables of a source image. 
 
void setImage(std::size_t nr, const SrcPanoImage &img)
set a panorama image, counting starts with 0 
 
This file specifies what image variables SrcPanoImg should have. 
 
std::string getFilePrefix() const 
 
base class, which stores one mask polygon 
 
std::string iccProfileDesc
description of the icc profile