24 #ifndef _Hgn1_PANOCOMMAND_H
25 #define _Hgn1_PANOCOMMAND_H
47 :
PanoCommand(pano), commands(commands) { setName(
"multiple commands");};
60 virtual std::string
getName()
const {
return "new panorama"; };
70 virtual std::string getName()
const {
return "add images"; };
72 std::vector<HuginBase::SrcPanoImage> imgs;
87 virtual std::string getName()
const {
return "remove image"; };
99 virtual std::string getName()
const {
return "remove images"; };
111 virtual std::string getName()
const {
return "update variables"; };
121 :
PanoCommand(p), cps(cps), updateCPError(doUpdateCPError)
124 virtual std::string
getName()
const {
return "update control points"; };
138 virtual std::string getName()
const {
return "update variables and control points"; };
149 :
PanoCommand(p), m_imgs(imgs), vars(vars), cps(cps)
152 virtual std::string getName()
const {
return "update variables and control points"; };
167 virtual std::string getName()
const {
return "update image variables"; };
181 virtual std::string
getName()
const {
return "update image variables"; }
195 virtual std::string
getName()
const {
return "update image variables by parsing expression"; }
208 virtual std::string
getName()
const {
return "update optimize vector"; }
219 virtual std::string
getName()
const {
return "update optimizer master switch"; }
230 virtual std::string
getName()
const {
return "update photometric optimizer master switch"; }
243 virtual std::string
getName()
const {
return "set image variable"; }
255 virtual std::string
getName()
const {
return "center panorama"; }
264 virtual std::string
getName()
const {
return "straighten panorama"; };
275 virtual std::string getName()
const {
return "add control point"; };
288 virtual std::string
getName()
const {
return "add control points"; };
301 virtual std::string getName()
const {
return "remove control point"; };
303 unsigned int pointNr;
314 virtual std::string getName()
const {
return "remove control points"; };
327 virtual std::string getName()
const {
return "change control point"; };
341 virtual std::string getName()
const {
return "change active images"; };
354 virtual std::string getName()
const {
return "swap images"; };
368 virtual std::string getName()
const {
return "move images"; };
382 virtual std::string getName()
const {
return "merge panorama"; };
396 virtual std::string getName()
const{
return "update source image"; };
411 virtual std::string getName()
const {
return "update source images"; };
413 std::vector<HuginBase::SrcPanoImage> imgs;
425 virtual std::string getName()
const {
return "set panorama options"; };
440 virtual std::string
getName()
const {
return "load project"; };
442 const std::string &filename;
455 virtual std::string getName()
const {
return "rotate panorama"; };
469 virtual std::string getName()
const{
return "translate panorama"; };
480 :
PanoCommand(p), imgNrs(imgs), m_focalLength(newFocalLength)
483 virtual std::string getName()
const {
return "update focal length"; };
495 :
PanoCommand(p), imgNrs(imgs), m_cropFactor(newCropFactor)
498 virtual std::string getName()
const {
return "update crop factor"; };
510 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> variables)
511 :
PanoCommand(p), image_numbers(image_numbers), new_part_number(new_part_number),variables(variables)
514 virtual std::string getName()
const {
return "Change part number"; };
518 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>
variables;
538 HuginBase::UIntSet image_numbers, std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> changeVariables,
539 bool new_linked_state, std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> groupVariables)
540 :
PanoCommand(p), image_numbers(image_numbers), changeVariables(changeVariables),
541 new_linked_state(new_linked_state), groupVariables(groupVariables)
544 virtual std::string getName()
const {
return "Change image variable links"; };
558 :
PanoCommand(p), lens_number(lens_number), variables(variables)
561 virtual std::string getName()
const {
return "Link lens variables"; };
563 std::size_t lens_number;
564 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>
variables;
568 #define image_variable( name, type, default_value )\
569 class WXIMPEX ChangeImage##name##Cmd : public PanoCommand\
572 ChangeImage##name##Cmd(HuginBase::Panorama & p,\
573 HuginBase::UIntSet image_numbers,\
576 image_numbers(image_numbers),\
579 virtual bool processPanorama(HuginBase::Panorama& pano);\
580 virtual std::string getName() const { return "Change image's " #name; };\
582 HuginBase::UIntSet image_numbers;\
586 #undef image_variable
602 :
PanoCommand(p), image_numbers(image_numbers), vars(vars)
605 virtual std::string getName()
const {
return "New Part"; };
608 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>
vars;
619 virtual std::string getName()
const {
return "update mask"; };
630 :
PanoCommand(p), m_red(redFactor), m_blue(blueFactor)
633 virtual std::string getName()
const {
return "update global white balance"; };
645 virtual std::string
getName()
const {
return "set exposure to mean exposure"; };
654 virtual std::string
getName()
const {
return "distribute images"; };
660 #endif // _PANOCOMMAND_H
SetPanoOptionsCmd(HuginBase::Panorama &p, const HuginBase::PanoramaOptions &opts)
HuginBase::VariableMap vars
Base class for all panorama commands.
UpdateCPsCmd(HuginBase::Panorama &p, const HuginBase::CPVector &cps, bool doUpdateCPError=true)
MergePanoCmd(HuginBase::Panorama &p, HuginBase::Panorama &p2)
update variables of a group of images
HuginBase::VariableMapVector vars
NewPanoCmd(HuginBase::Panorama &pano)
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
move image from position1 to position2
Change the linking of some variables across parts of an ImageVariableGroup containing some specified ...
HuginBase::UIntSet images
center panorama horizontically
HuginBase::OptimizeVector m_optvec
LinkLensVarsCmd(HuginBase::Panorama &p, std::size_t lens_number, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables)
AddCtrlPointsCmd(HuginBase::Panorama &p, const HuginBase::CPVector &cpoints)
virtual std::string getName() const
returns the name of the command
AddCtrlPointCmd(HuginBase::Panorama &p, const HuginBase::ControlPoint &cpoint)
Somewhere to specify what variables belong to what.
HuginBase::VariableMapVector vars
ChangePartImagesLinkingCmd(HuginBase::Panorama &p, HuginBase::UIntSet image_numbers, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > changeVariables, bool new_linked_state, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > groupVariables)
Constructor.
virtual std::string getName() const
returns the name of the command
virtual std::string getName() const
returns the name of the command
a variable has a value and a name.
std::vector< PanoCommand * > commands
HuginBase::UIntSet change
update variables of a single image
HuginBase::MaskPolygonVector m_mask
update the photometric optimizer master switch
virtual std::string getName() const
returns the name of the command
RotatePanoCmd(HuginBase::Panorama &p, double yaw, double pitch, double roll)
virtual std::string getName() const
returns the name of the command
remove several control points
represents a control point
UpdateCropFactorCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, double newCropFactor)
HuginBase::UIntSet imgNrs
PanoCommand to combine other PanoCommands.
UpdateSrcImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet i, std::vector< HuginBase::SrcPanoImage > imgs)
CenterPanoCmd(HuginBase::Panorama &p)
std::set< unsigned int > UIntSet
StraightenPanoCmd(HuginBase::Panorama &p)
update mask for given image
const std::string & prefix
std::vector< VariableMap > VariableMapVector
updates the optimize vector, aka all variables which should be optimized
UpdateVariablesCPSetCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, const HuginBase::VariableMapVector &vars, const HuginBase::CPVector &cps)
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > changeVariables
UpdateOptimizeVectorCmd(HuginBase::Panorama &p, HuginBase::OptimizeVector optvec)
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars
UpdateVariablesCPCmd(HuginBase::Panorama &p, const HuginBase::VariableMapVector &vars, const HuginBase::CPVector &cps)
virtual std::string getName() const
returns the name of the command
Make a new part in a ImageVariableGroup for a set of images, given the variables that make up the gro...
TranslatePanoCmd(HuginBase::Panorama &p, double TrX, double TrY, double TrZ)
remove an image from a panorama
CombinedPanoCommand(HuginBase::Panorama &pano, std::vector< PanoCommand * > &commands)
Constructor.
update the optimizer master switch
virtual std::string getName() const
returns the name of the command
Link a set of lens variables for some lens.
virtual std::string getName() const
returns the name of the command
Switch the part number of an image.
UpdateSrcImageCmd(HuginBase::Panorama &p, unsigned i, HuginBase::SrcPanoImage img)
reset output exposure to mean exposure of all images
ChangeCtrlPointCmd(HuginBase::Panorama &p, unsigned int nr, HuginBase::ControlPoint point)
update all control points
update all variables & control points
distributes all images above the sphere, for the assistant
update all variables & control points
UpdateFocalLengthCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, double newFocalLength)
virtual std::string getName() const
returns the name of the command
update variables by parsing a expression
std::vector< MaskPolygon > MaskPolygonVector
ResetToMeanExposure(HuginBase::Panorama &p)
SetVariableCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &images, const HuginBase::Variable &var)
straighten panorama horizontically
MoveImageCmd(HuginBase::Panorama &p, size_t i1, size_t i2)
std::map< std::string, Variable > VariableMap
update a single variable, possibly for a group of images
virtual std::string getName() const
returns the name of the command
DistributeImagesCmd(HuginBase::Panorama &p)
UpdateOptimizerSwitchCmd(HuginBase::Panorama &p, int mode)
std::size_t new_part_number
RemoveCtrlPointsCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &points)
UpdateWhiteBalance(HuginBase::Panorama &p, double redFactor, double blueFactor)
NewPartCmd(HuginBase::Panorama &p, HuginBase::UIntSet image_numbers, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars)
Constructor.
virtual std::string getName() const
returns the name of the command
UpdateImagesVariablesCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &change, const HuginBase::VariableMapVector &vars)
ChangePartNumberCmd(HuginBase::Panorama &p, HuginBase::UIntSet image_numbers, std::size_t new_part_number, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables)
SwapImagesCmd(HuginBase::Panorama &p, unsigned int i1, unsigned int i2)
std::vector< ControlPoint > CPVector
std::vector< std::set< std::string > > OptimizeVector
UpdateVariablesByParseExpression(HuginBase::Panorama &p, const std::string &expression)
HuginBase::ControlPoint point
RemoveCtrlPointCmd(HuginBase::Panorama &p, unsigned int cpNr)
virtual std::string getName() const
returns the name of the command
UpdatePhotometricOptimizerSwitchCmd(HuginBase::Panorama &p, int mode)
remove multiple images from a panorama
update global white balance
add multiple control points
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > groupVariables
All variables of a source image.
UpdateMaskForImgCmd(HuginBase::Panorama &p, unsigned int img, const HuginBase::MaskPolygonVector &mask)
This file specifies what image variables SrcPanoImg should have.
dump the current project and load a new one.
virtual std::string getName() const
returns the name of the command
RemoveImageCmd(HuginBase::Panorama &p, unsigned int imgNr)
virtual std::string getName() const
returns the name of the command
RemoveImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs)
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
SetActiveImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet &active)
UpdateVariablesCmd(HuginBase::Panorama &p, const HuginBase::VariableMapVector &vars)
add image(s) to a panorama
AddImagesCmd(HuginBase::Panorama &pano, const std::vector< HuginBase::SrcPanoImage > &images)
UpdateImageVariablesCmd(HuginBase::Panorama &p, unsigned int ImgNr, const HuginBase::VariableMap &vars)