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"; };
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"; };
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"; };
455 virtual std::string
getName()
const {
return "rotate panorama"; };
469 virtual std::string
getName()
const{
return "translate panorama"; };
483 virtual std::string
getName()
const {
return "update focal length"; };
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"; };
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;\
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"; };
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"; };
Somewhere to specify what variables belong to what.
represents a control point
All variables of a source image.
a variable has a value and a name.
HuginBase::ControlPoint point
AddCtrlPointCmd(HuginBase::Panorama &p, const HuginBase::ControlPoint &cpoint)
virtual std::string getName() const
returns the name of the command
add multiple control points
AddCtrlPointsCmd(HuginBase::Panorama &p, const HuginBase::CPVector &cpoints)
virtual std::string getName() const
returns the name of the command
add image(s) to a panorama
virtual std::string getName() const
returns the name of the command
AddImagesCmd(HuginBase::Panorama &pano, const std::vector< HuginBase::SrcPanoImage > &images)
std::vector< HuginBase::SrcPanoImage > imgs
center panorama horizontically
CenterPanoCmd(HuginBase::Panorama &p)
virtual std::string getName() const
returns the name of the command
ChangeCtrlPointCmd(HuginBase::Panorama &p, unsigned int nr, HuginBase::ControlPoint point)
virtual std::string getName() const
returns the name of the command
HuginBase::ControlPoint point
Change the linking of some variables across parts of an ImageVariableGroup containing some specified ...
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > groupVariables
HuginBase::UIntSet image_numbers
virtual std::string getName() const
returns the name of the command
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > changeVariables
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.
Switch the part number of an image.
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
ChangePartNumberCmd(HuginBase::Panorama &p, HuginBase::UIntSet image_numbers, std::size_t new_part_number, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables)
std::size_t new_part_number
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet image_numbers
PanoCommand to combine other PanoCommands.
CombinedPanoCommand(HuginBase::Panorama &pano, std::vector< PanoCommand * > &commands)
Constructor.
std::vector< PanoCommand * > commands
distributes all images above the sphere, for the assistant
virtual std::string getName() const
returns the name of the command
DistributeImagesCmd(HuginBase::Panorama &p)
Link a set of lens variables for some lens.
virtual std::string getName() const
returns the name of the command
LinkLensVarsCmd(HuginBase::Panorama &p, std::size_t lens_number, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables)
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > variables
dump the current project and load a new one.
const std::string & prefix
virtual std::string getName() const
returns the name of the command
const std::string & filename
virtual std::string getName() const
returns the name of the command
MergePanoCmd(HuginBase::Panorama &p, HuginBase::Panorama &p2)
HuginBase::Panorama newPano
move image from position1 to position2
MoveImageCmd(HuginBase::Panorama &p, size_t i1, size_t i2)
virtual std::string getName() const
returns the name of the command
NewPanoCmd(HuginBase::Panorama &pano)
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...
std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars
NewPartCmd(HuginBase::Panorama &p, HuginBase::UIntSet image_numbers, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars)
Constructor.
HuginBase::UIntSet image_numbers
virtual std::string getName() const
returns the name of the command
RemoveCtrlPointCmd(HuginBase::Panorama &p, unsigned int cpNr)
virtual std::string getName() const
returns the name of the command
remove several control points
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet m_points
RemoveCtrlPointsCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &points)
remove an image from a panorama
virtual std::string getName() const
returns the name of the command
RemoveImageCmd(HuginBase::Panorama &p, unsigned int imgNr)
remove multiple images from a panorama
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet imgNrs
RemoveImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs)
reset output exposure to mean exposure of all images
ResetToMeanExposure(HuginBase::Panorama &p)
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
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet m_active
SetActiveImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet &active)
HuginBase::PanoramaOptions options
virtual std::string getName() const
returns the name of the command
SetPanoOptionsCmd(HuginBase::Panorama &p, const HuginBase::PanoramaOptions &opts)
update a single variable, possibly for a group of images
SetVariableCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &images, const HuginBase::Variable &var)
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet images
straighten panorama horizontically
virtual std::string getName() const
returns the name of the command
StraightenPanoCmd(HuginBase::Panorama &p)
virtual std::string getName() const
returns the name of the command
SwapImagesCmd(HuginBase::Panorama &p, unsigned int i1, unsigned int i2)
TranslatePanoCmd(HuginBase::Panorama &p, double TrX, double TrY, double TrZ)
virtual std::string getName() const
returns the name of the command
update all control points
UpdateCPsCmd(HuginBase::Panorama &p, const HuginBase::CPVector &cps, bool doUpdateCPError=true)
virtual std::string getName() const
returns the name of the command
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet imgNrs
UpdateCropFactorCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, double newCropFactor)
virtual std::string getName() const
returns the name of the command
UpdateFocalLengthCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, double newFocalLength)
HuginBase::UIntSet imgNrs
update variables of a single image
UpdateImageVariablesCmd(HuginBase::Panorama &p, unsigned int ImgNr, const HuginBase::VariableMap &vars)
HuginBase::VariableMap vars
virtual std::string getName() const
returns the name of the command
update variables of a group of images
UpdateImagesVariablesCmd(HuginBase::Panorama &p, const HuginBase::UIntSet &change, const HuginBase::VariableMapVector &vars)
HuginBase::VariableMapVector vars
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet change
update mask for given image
UpdateMaskForImgCmd(HuginBase::Panorama &p, unsigned int img, const HuginBase::MaskPolygonVector &mask)
virtual std::string getName() const
returns the name of the command
HuginBase::MaskPolygonVector m_mask
updates the optimize vector, aka all variables which should be optimized
HuginBase::OptimizeVector m_optvec
UpdateOptimizeVectorCmd(HuginBase::Panorama &p, HuginBase::OptimizeVector optvec)
virtual std::string getName() const
returns the name of the command
update the optimizer master switch
virtual std::string getName() const
returns the name of the command
UpdateOptimizerSwitchCmd(HuginBase::Panorama &p, int mode)
update the photometric optimizer master switch
UpdatePhotometricOptimizerSwitchCmd(HuginBase::Panorama &p, int mode)
virtual std::string getName() const
returns the name of the command
virtual std::string getName() const
returns the name of the command
UpdateSrcImageCmd(HuginBase::Panorama &p, unsigned i, HuginBase::SrcPanoImage img)
HuginBase::SrcPanoImage img
virtual std::string getName() const
returns the name of the command
HuginBase::UIntSet imgNrs
UpdateSrcImagesCmd(HuginBase::Panorama &p, HuginBase::UIntSet i, std::vector< HuginBase::SrcPanoImage > imgs)
std::vector< HuginBase::SrcPanoImage > imgs
update variables by parsing a expression
UpdateVariablesByParseExpression(HuginBase::Panorama &p, const std::string &expression)
virtual std::string getName() const
returns the name of the command
update all variables & control points
HuginBase::VariableMapVector vars
UpdateVariablesCPCmd(HuginBase::Panorama &p, const HuginBase::VariableMapVector &vars, const HuginBase::CPVector &cps)
virtual std::string getName() const
returns the name of the command
update all variables & control points
UpdateVariablesCPSetCmd(HuginBase::Panorama &p, HuginBase::UIntSet imgs, const HuginBase::VariableMapVector &vars, const HuginBase::CPVector &cps)
HuginBase::UIntSet m_imgs
virtual std::string getName() const
returns the name of the command
HuginBase::VariableMapVector vars
UpdateVariablesCmd(HuginBase::Panorama &p, const HuginBase::VariableMapVector &vars)
virtual std::string getName() const
returns the name of the command
HuginBase::VariableMapVector vars
update global white balance
virtual std::string getName() const
returns the name of the command
UpdateWhiteBalance(HuginBase::Panorama &p, double redFactor, double blueFactor)
This file specifies what image variables SrcPanoImg should have.
std::vector< MaskPolygon > MaskPolygonVector
std::vector< VariableMap > VariableMapVector
std::vector< ControlPoint > CPVector
std::vector< std::set< std::string > > OptimizeVector
std::set< unsigned int > UIntSet
std::map< std::string, Variable > VariableMap
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.