Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <jlegg@us...> - 2009-08-05 15:38:40
|
Revision: 4170 http://hugin.svn.sourceforge.net/hugin/?rev=4170&view=rev Author: jlegg Date: 2009-08-05 15:38:24 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Remove the variable map parameter from Panorama.addImage. Everything using it used a default variable map anyway. Fixes issues where information lost (e.g. field of view when entered manually when loading images.) Modified Paths: -------------- hugin/branches/gsoc2009_layout/src/hugin1/PT/PanoCommand.h hugin/branches/gsoc2009_layout/src/hugin1/hugin/wxPanoCommand.cpp hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.cpp hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.h hugin/branches/gsoc2009_layout/src/hugin_base/panodata/PanoramaData.h hugin/branches/gsoc2009_layout/src/tools/align_image_stack.cpp hugin/branches/gsoc2009_layout/src/tools/tca_correct.cpp Modified: hugin/branches/gsoc2009_layout/src/hugin1/PT/PanoCommand.h =================================================================== --- hugin/branches/gsoc2009_layout/src/hugin1/PT/PanoCommand.h 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/hugin1/PT/PanoCommand.h 2009-08-05 15:38:24 UTC (rev 4170) @@ -99,13 +99,9 @@ virtual bool processPanorama(Panorama& pano) { - - VariableMap var; - fillVariableMap(var); - std::vector<SrcPanoImage>::const_iterator it; for (it = imgs.begin(); it != imgs.end(); ++it) { - pano.addImage(*it,var); + pano.addImage(*it); } pano.changeFinished(); Modified: hugin/branches/gsoc2009_layout/src/hugin1/hugin/wxPanoCommand.cpp =================================================================== --- hugin/branches/gsoc2009_layout/src/hugin1/hugin/wxPanoCommand.cpp 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/hugin1/hugin/wxPanoCommand.cpp 2009-08-05 15:38:24 UTC (rev 4170) @@ -168,8 +168,6 @@ double focalLength = 0; Lens lens; - VariableMap vars; - fillVariableMap(vars); ImageOptions imgopts; SrcPanoImage srcImg; HuginBase::StandardImageVariableGroups variable_groups(pano); @@ -213,7 +211,7 @@ srcImg = pano.getSrcImage(i); srcImg.setFilename(filename); // add image - int imgNr = pano.addImage(srcImg, vars); + int imgNr = pano.addImage(srcImg); variable_groups.update(); lenses.switchParts(imgNr, lenses.getPartNumber(i)); lenses.unlinkVariableImage(HuginBase::ImageVariableGroup::IVE_ExposureValue, i); @@ -285,7 +283,7 @@ // If matchingLensNr == -1 still, we haven't found a good lens to use. // We shouldn't attach the image to a lens in this case, it will have // its own new lens. - int imgNr = pano.addImage(srcImg, vars); + int imgNr = pano.addImage(srcImg); if (matchingLensNr != -1) { lenses.switchParts(imgNr, matchingLensNr); @@ -503,9 +501,7 @@ vigra::ImageImportInfo inf(filename.c_str()); SrcPanoImage img(filename); img.setSize(inf.size()); - VariableMap vars; - fillVariableMap(vars); - int imgNr = pano.addImage(img, vars); + int imgNr = pano.addImage(img); lenses.updatePartNumbers(); if (i > 0) lenses.switchParts(imgNr, 0); } Modified: hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.cpp =================================================================== --- hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.cpp 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.cpp 2009-08-05 15:38:24 UTC (rev 4170) @@ -316,12 +316,10 @@ } -unsigned int Panorama::addImage(const SrcPanoImage &img, const VariableMap & vars) +unsigned int Panorama::addImage(const SrcPanoImage &img) { unsigned int nr = state.images.size(); state.images.push_back(new SrcPanoImage(img)); - /// @todo is this really necessary? Can we drop vars? - updateVariables(nr, vars); // create empty optimisation vector state.optvec.push_back(std::set<std::string>()); imageChanged(nr); Modified: hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.h =================================================================== --- hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.h 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/hugin_base/panodata/Panorama.h 2009-08-05 15:38:24 UTC (rev 4170) @@ -211,7 +211,7 @@ /** add an Image to the panorama */ - unsigned int addImage(const SrcPanoImage &img, const VariableMap &vars); + unsigned int addImage(const SrcPanoImage &img); /** creates an image, from filename, and a Lens, if needed */ // int addImageAndLens(const std::string & filename); Modified: hugin/branches/gsoc2009_layout/src/hugin_base/panodata/PanoramaData.h =================================================================== --- hugin/branches/gsoc2009_layout/src/hugin_base/panodata/PanoramaData.h 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/hugin_base/panodata/PanoramaData.h 2009-08-05 15:38:24 UTC (rev 4170) @@ -123,7 +123,7 @@ * The Image must be initialized, the Lens must exist. * */ - virtual unsigned int addImage(const SrcPanoImage& img, const VariableMap& vars) =0; + virtual unsigned int addImage(const SrcPanoImage& img) =0; /** creates an image, from filename, and a Lens, if needed */ // virtual int addImageAndLens(const std::string & filename) =0; Modified: hugin/branches/gsoc2009_layout/src/tools/align_image_stack.cpp =================================================================== --- hugin/branches/gsoc2009_layout/src/tools/align_image_stack.cpp 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/tools/align_image_stack.cpp 2009-08-05 15:38:24 UTC (rev 4170) @@ -275,12 +275,10 @@ // default settings double focalLength = 50; double cropFactor = 0; - VariableMap defaultVars; - fillVariableMap(defaultVars); - + SrcPanoImage srcImg; srcImg.setFilename(files[0]); - + if (param.fisheye) { srcImg.setProjection(SrcPanoImage::FULL_FRAME_FISHEYE); } @@ -307,7 +305,7 @@ } } - pano.addImage(srcImg, defaultVars); + pano.addImage(srcImg); // setup output to be exactly similar to input image PanoramaOptions opts; @@ -359,7 +357,7 @@ srcImg.setHFOV(50); } - int imgNr = pano.addImage(srcImg, defaultVars); + int imgNr = pano.addImage(srcImg); // each image shares the same lens. variable_groups.getLenses().switchParts(imgNr, 0); // unlink HFOV? Modified: hugin/branches/gsoc2009_layout/src/tools/tca_correct.cpp =================================================================== --- hugin/branches/gsoc2009_layout/src/tools/tca_correct.cpp 2009-08-05 12:35:21 UTC (rev 4169) +++ hugin/branches/gsoc2009_layout/src/tools/tca_correct.cpp 2009-08-05 15:38:24 UTC (rev 4170) @@ -797,9 +797,6 @@ Panorama pano; // add the first image.to the panorama object - // default settings - VariableMap defaultVars; - fillVariableMap(defaultVars); StandardImageVariableGroups variable_groups(pano); ImageVariableGroup & lenses = variable_groups.getLenses(); @@ -817,7 +814,7 @@ srcRedImg.setHFOV(10); srcRedImg.setExifCropFactor(1); srcRedImg.setFilename(red_name); - int imgRedNr = pano.addImage(srcRedImg, defaultVars); + int imgRedNr = pano.addImage(srcRedImg); lenses.updatePartNumbers(); lenses.switchParts(imgRedNr, 0); @@ -834,7 +831,7 @@ srcGreenImg.setHFOV(10); srcGreenImg.setExifCropFactor(1); srcGreenImg.setFilename(green_name); - int imgGreenNr = pano.addImage(srcGreenImg, defaultVars); + int imgGreenNr = pano.addImage(srcGreenImg); lenses.updatePartNumbers(); lenses.switchParts(imgGreenNr, 0); @@ -851,7 +848,7 @@ srcBlueImg.setHFOV(10); srcBlueImg.setExifCropFactor(1); srcBlueImg.setFilename(blue_name); - int imgBlueNr = pano.addImage(srcBlueImg, defaultVars); + int imgBlueNr = pano.addImage(srcBlueImg); lenses.updatePartNumbers(); lenses.switchParts(imgBlueNr, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |