Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LensTools.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
10 /*
11  * This is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This software is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public
22  * License along with this software. If not, see
23  * <http://www.gnu.org/licenses/>.
24  *
25  */
26 
27 #ifndef LENSTOOLS_H
28 #define LENSTOOLS_H
29 
30 #include <hugin_shared.h>
31 #include "panoinc_WX.h"
32 #include "panoinc.h"
33 #include "base_wx/Command.h"
34 
37 WXIMPEX void FillLensProjectionList(wxControlWithItems* list);
38 
39 namespace HuginLensTools
40 {
42  struct LensInfo
43  {
44  wxString name;
46  };
48  typedef std::vector<LensInfo> LensInfoVector;
49 };
50 
55 WXIMPEX void FillBlenderList(wxControlWithItems* list);
56 
58 WXIMPEX void SelectListValue(wxControlWithItems* list,size_t newValue);
60 WXIMPEX size_t GetSelectedValue(wxControlWithItems* list);
61 
66 
68 WXIMPEX void SaveLensParameters(const wxString filename, HuginBase::Panorama* pano, unsigned int imgNr);
70 WXIMPEX void SaveLensParametersToIni(wxWindow * parent, HuginBase::Panorama *pano, const HuginBase::UIntSet images);
71 
79 WXIMPEX bool ApplyLensParameters(wxWindow * parent, HuginBase::Panorama *pano, HuginBase::UIntSet images,PanoCommand::PanoCommand*& command);
88 WXIMPEX bool LoadLensParametersChoose(wxWindow * parent, HuginBase::Lens & lens,
89  bool & cropped, bool & autoCenterCrop, vigra::Rect2D & cropRect);
90 
96 WXIMPEX bool CheckLensStacks(HuginBase::Panorama* pano, bool allowCancel);
97 
98 namespace FormatString
99 {
101 WXIMPEX wxString GetExifDateTime(const HuginBase::SrcPanoImage* img);
103 WXIMPEX wxString GetFocalLength(const HuginBase::SrcPanoImage* img);
105 WXIMPEX wxString GetAperture(const HuginBase::SrcPanoImage* img);
107 WXIMPEX wxString GetExposureTime(const HuginBase::SrcPanoImage* img);
109 WXIMPEX wxString GetIso(const HuginBase::SrcPanoImage* img);
110 };
111 
112 #endif // LENSTOOLS_H
Base class for all panorama commands.
Definition: Command.h:38
WXIMPEX bool ApplyLensParameters(wxWindow *parent, HuginBase::Panorama *pano, HuginBase::UIntSet images, PanoCommand::PanoCommand *&command)
applies lens parameter from user selected file to pano using GlobalCmdHist
include file for the hugin project
void SaveLensParametersToIni(wxWindow *parent, HuginBase::Panorama *pano, const HuginBase::UIntSet images)
saves the lens parameters to ini files, provides all necessary dialogs
Definition: LensTools.cpp:410
std::vector< LensInfo > LensInfoVector
vector of LensInfo to hold all available lens types
Definition: LensTools.h:48
std::set< unsigned int > UIntSet
Definition: PanoramaData.h:51
wxString getResponseString(const HuginBase::SrcPanoImage &img)
Returns translated response type for given SrcPanoImage.
Definition: LensTools.cpp:125
Model for a panorama.
Definition: Panorama.h:152
size_t GetSelectedValue(wxControlWithItems *list)
Returns the client value of the selected item from list.
Definition: LensTools.cpp:102
void SaveLensParameters(const wxString filename, HuginBase::Panorama *pano, unsigned int imgNr)
save the lens parameters of the image to a lens file named filename
Definition: LensTools.cpp:143
WXIMPEX HuginLensTools::LensInfoVector GetLensProjectionList()
return a vector with all available projections
Definition: LensTools.cpp:45
#define WXIMPEX
Definition: hugin_shared.h:40
wxString GetExposureTime(const HuginBase::SrcPanoImage *img)
returns formatted exposure time
Definition: LensTools.cpp:554
structure to name of lens projections and their ids
Definition: LensTools.h:42
include file for the hugin project
wxString GetExifDateTime(const HuginBase::SrcPanoImage *img)
returns Exif DateTimeOriginal as formatted wxString
Definition: LensTools.cpp:503
void SelectListValue(wxControlWithItems *list, size_t newValue)
Selects the given value (stored in the client data) in the given list item.
Definition: LensTools.cpp:89
wxString GetFocalLength(const HuginBase::SrcPanoImage *img)
return focallength and focallength 35 mm as wxString
Definition: LensTools.cpp:519
bool CheckLensStacks(HuginBase::Panorama *pano, bool allowCancel)
check, if lens and stacks are correctly linked shows message box with short information if not ...
Definition: LensTools.cpp:446
HuginBase::BaseSrcPanoImage::Projection id
Definition: LensTools.h:45
All variables of a source image.
Definition: SrcPanoImage.h:194
wxString GetAperture(const HuginBase::SrcPanoImage *img)
returns formatted aperture value
Definition: LensTools.cpp:540
void FillLensProjectionList(wxControlWithItems *list)
Fills a wxControlWithItem with all input projection formats, the client data contains the associated ...
Definition: LensTools.cpp:35
bool LoadLensParametersChoose(wxWindow *parent, HuginBase::Lens &lens, bool &cropped, bool &autoCenterCrop, vigra::Rect2D &cropRect)
load lens parameters from lens ini file
Definition: LensTools.cpp:290
wxString getProjectionString(const HuginBase::SrcPanoImage &img)
Returns translated projection for given image.
Definition: LensTools.cpp:107
void FillBlenderList(wxControlWithItems *list)
Fills a wxControlWithItem with all possible blender options, the client data contains the associated ...
Definition: LensTools.cpp:81
wxString GetIso(const HuginBase::SrcPanoImage *img)
returns formatted iso value
Definition: LensTools.cpp:591