52 const std::size_t
pos =
text.find_first_of(
"=", 0);
53 if (
pos == std::string::npos)
99 for (std::set<HuginBase::ImageVariableGroup::ImageVariableEnum>::iterator
it = vars.begin();
it != vars.end(); ++
it)
103#define image_variable( name, type, default_value )\
104case HuginBase::ImageVariableGroup::IVE_##name:\
105 pano.unlinkImageVariable##name(imgNr);\
115 std::cout << name <<
": modify assigned lenses and stack in pto files" << std::endl
118 <<
"Usage: " << name <<
" [options] --switches imglist input.pto" << std::endl
120 <<
" -o, --output=file.pto Output Hugin PTO file. Default: <filename>_lens.pto" << std::endl
121 <<
" -h, --help Shows this help" << std::endl
123 <<
" --new-lens imglist Assign to given images a new lens number" << std::endl
124 <<
" --new-stack imglist Assign to given images a new stack number" << std::endl
125 <<
" Examples:" << std::endl
126 <<
" --new-lens i2 Image 2 gets a new lens" << std::endl
127 <<
" --new-stack i4,i5 Images 4 and 5 get a new stack" << std::endl
129 <<
" --change-lens imglist Assign to given images a new lens number" << std::endl
130 <<
" --change-stack imglist Assign to given images a new stack number" << std::endl
131 <<
" Examples:" << std::endl
132 <<
" --change-lens i2=0 Image 2 is assigned lens number 0" << std::endl
133 <<
" --change-stack i4=0,i5=1 Image 4 is assigned to stack 0," << std::endl
134 <<
" image 5 to stack number 1" << std::endl
240 std::cout <<
"Assigning a new lens to image " <<
newLensImgs[
i].imgNr << std::endl;
246 std::cout <<
"Warning: Pto project contains already for each image an own lens" << std::endl
247 <<
" Nothing to do." << std::endl;
249 std::cout << std::endl;
265 std::cout <<
"Assigning a new stack to image " <<
newStackImgs[
i].imgNr << std::endl;
271 std::cout <<
"Warning: Pto project contains already for each image an own stack" << std::endl
272 <<
" Nothing to do." << std::endl;
274 std::cout << std::endl;
306 <<
" All images of the same lens must have the same size." << std::endl
307 <<
" So skipping this image." << std::endl;
313 std::cout <<
"Warning: Pto project contains only one lens." << std::endl
314 <<
" Therefore the lens can not be changed. Use --new-lens instead." << std::endl;
316 std::cout << std::endl;
348 <<
" All images of the same stack must have the same size." << std::endl
349 <<
" So skipping this image." << std::endl;
355 std::cout <<
"Warning: Pto project contains only one stack." << std::endl
356 <<
" Therefore the stack can not be changed. Use --new-stack instead." << std::endl;
358 std::cout << std::endl;
366 std::cout << std::endl <<
"Written project file " <<
output << std::endl;
Somewhere to specify what variables belong to what.
static const std::set< ConstImageVariableGroup::ImageVariableEnum > & getLensVariables()
Get the set of lens image variables.
static const std::set< ConstImageVariableGroup::ImageVariableEnum > & getStackVariables()
Get the set of stack image variables.
Same as above, but use a non const panorama.
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
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...
bool WritePTOFile(const std::string &filename, const std::string &prefix="")
write data to given pto file
std::size_t getNrOfImages() const
number of images.
This file specifies what image variables SrcPanoImg should have.
std::vector< std::string > SplitString(const std::string &s, const std::string &sep)
split string s at given sep, returns vector of strings
std::string GetHuginVersion()
return a string with version numbers
std::string GetOutputFilename(const std::string &out, const std::string &in, const std::string &suffix)
construct output filename, if ouput is known return this value otherwise use the input filename and a...
std::string stripPath(const std::string &filename)
remove the path of a filename (mainly useful for gui display of filenames)
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
bool stringToInt(const std::string &s, int &val)
convert string to integer value, returns true, if sucessful
void ParseImageLensStackString(ParseImgVec &parseVec, std::string input)
int main(int argc, char *argv[])
void ParseSingleImage(ParseImgVec &varVec, const std::string &s)
void NewPart(HuginBase::Panorama &pano, std::set< HuginBase::ImageVariableGroup::ImageVariableEnum > vars, unsigned int imgNr)
std::vector< ParsedImg > ParseImgVec
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.