1 // -*- c-basic-offset: 4 -*-
2 /** @file wxLensDB.h
3  *
4  *  @brief dialogs for loading and saving information from/to lens database
5  *
6  *  @author T. Modes
7  *
8  */
9 
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 WXLENSDB_H
28 #define WXLENSDB_H
29 
30 #include <hugin_shared.h>
31 #include "panoinc_WX.h"
32 #include "panoinc.h"
33 #include "base_wx/Command.h"
34 
35 /** @brief loads the lens parameters from lens database and create approbiate PanoCommand::PanoCommand to apply this parameter.
36     it shows a dialog to select which information should be loaded
37     @param parent parent window for display window
38     @param pano panorama object from which information should be inside lens database
39     @param images images into which parameters should be loaded from database
40     @param cmd contains the PanoCommand::PanoCommand to apply
41     @returns true, if right parameters could be loaded from database */
42 WXIMPEX bool ApplyLensDBParameters(wxWindow * parent, HuginBase::Panorama *pano, HuginBase::UIntSet images, PanoCommand::PanoCommand*& cmd);
43 
44 /** saves the lensparameter of the given HuginBase::SrcPanoImage into the lens database
45     @param parent parent window for display dialog
46     @param img HuginBase::SrcPanoImage, which contains the information which should be stored inside lens database
47     @param includeVignetting if the vignetting correction can be selected
48     @return true, if information could be stored into the database */
49 WXIMPEX bool SaveLensParameters(wxWindow * parent, const HuginBase::SrcPanoImage& img, bool includeVignetting=true);
50 
51 #endif // WXLENSDB_H
52