wxLensDB.cpp File Reference

dialogs for loading and saving information from/to lensfun database More...

#include "panoinc_WX.h"
#include "panoinc.h"
#include "wxLensDB.h"
#include "lensdb/LensDB.h"
#include "platform.h"
#include "base_wx/wxPlatform.h"
#include "panodata/ImageVariableTranslate.h"

Include dependency graph for wxLensDB.cpp:

Go to the source code of this file.

Classes

class  LoadLensDBDialog
 dialog for loading lens parameter from lensfun database More...
class  SaveLensDBDialog
 dialog for saving lens parameter into lensfun database More...
class  SaveCamDBDialog
 dialog for saving lens parameter into lensfun database More...

Functions

 EVT_BUTTON (XRCID("load_lens_search"), LoadLensDBDialog::OnSearch) EVT_LISTBOX(XRCID("load_lens_list")
LoadLensDBDialog::OnCheckChanged EVT_CHECKBOX (XRCID("load_lens_distortion"), LoadLensDBDialog::OnCheckChanged) EVT_CHECKBOX(XRCID("load_lens_vignetting")
bool str2double (wxWindow *parent, wxString s, double &d)
bool ApplyLensDBParameters (wxWindow *parent, PT::Panorama *pano, HuginBase::UIntSet images, PT::PanoCommand *&cmd)
 loads the lens parameters from lensfun database and create approbiate PT::PanoCommand to apply this parameter.
 EVT_CHECKBOX (XRCID("save_lens_distortion"), SaveLensDBDialog::OnCheckChanged) EVT_CHECKBOX(XRCID("save_lens_vignetting")
bool ShowFileDialogWithWarning (wxFileDialog &dlg, wxString userDBPath)
std::string BuildMountName (std::string maker, std::string model)
bool SaveLensParameters (wxWindow *parent, const HuginBase::SrcPanoImage &img, bool includeVignetting)
 saves the lensparameter of the given HuginBase::SrcPanoImage into the lensfun database
bool SaveCameraCropFactor (wxWindow *parent, const HuginBase::SrcPanoImage &img)
 saves the crop factor (camera) of the given HuginBase::SrcPanoImage into the lensfun database


Detailed Description

dialogs for loading and saving information from/to lensfun database

Author:
T. Modes

Definition in file wxLensDB.cpp.


Function Documentation

bool ApplyLensDBParameters ( wxWindow *  parent,
PT::Panorama pano,
HuginBase::UIntSet  images,
PT::PanoCommand *&  cmd 
)

loads the lens parameters from lensfun database and create approbiate PT::PanoCommand to apply this parameter.

it shows a dialog to select which informations should be loaded

Parameters:
parent parent window for display window
pano panorama object from which information should be inside lensfun database
images images into which parameters should be loaded from database
cmd contains the PT::PanoCommand to apply
Returns:
true, if right parameters could be loaded from database

Definition at line 319 of file wxLensDB.cpp.

References LoadLensDBDialog::ActivateSelectedLens(), LoadLensDBDialog::GetAperture(), LoadLensDBDialog::GetFocalLength(), HuginBase::Panorama::getImage(), HuginBase::ConstStandardImageVariableGroups::getLensVariables(), LoadLensDBDialog::GetLoadDistortion(), LoadLensDBDialog::GetLoadVignetting(), HuginBase::LensDB::LensDB::GetSingleton(), LoadLensDBDialog::GetSubjectDistance(), HuginBase::ConstImageVariableGroup::IVE_HFOV, HuginBase::ConstImageVariableGroup::IVE_RadialDistortion, HuginBase::ConstImageVariableGroup::IVE_RadialVigCorrCoeff, HuginBase::BaseSrcPanoImage::NO_CROP, LoadLensDBDialog::SetAperture(), LoadLensDBDialog::SetCameraMaker(), LoadLensDBDialog::SetCameraModel(), LoadLensDBDialog::SetFocalLength(), LoadLensDBDialog::SetLensName(), LoadLensDBDialog::SetSubjectDistance(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by PanoOperation::LoadLensOperation::GetInternalCommand().

std::string BuildMountName ( std::string  maker,
std::string  model 
)

Definition at line 675 of file wxLensDB.cpp.

References hugin_utils::tolower().

Referenced by SaveLensParameters().

EVT_BUTTON ( XRCID("load_lens_search")  ,
LoadLensDBDialog::OnSearch   
)

EVT_CHECKBOX ( XRCID("save_lens_distortion")  ,
SaveLensDBDialog::OnCheckChanged   
)

LoadLensDBDialog::OnCheckChanged EVT_CHECKBOX ( XRCID("load_lens_distortion")  ,
LoadLensDBDialog::OnCheckChanged   
)

bool SaveCameraCropFactor ( wxWindow *  parent,
const HuginBase::SrcPanoImage img 
)

saves the crop factor (camera) of the given HuginBase::SrcPanoImage into the lensfun database

Parameters:
parent parent window for display dialog
img HuginBase::SrcPanoImage, which contains the information which should be stored inside lensfun database
Returns:
true, if information could be stored into the database

Definition at line 937 of file wxLensDB.cpp.

References SaveCamDBDialog::GetCameraMaker(), SaveCamDBDialog::GetCameraModel(), HuginBase::LensDB::LensDB::GetCameraMount(), SaveCamDBDialog::GetCameraMount(), HuginBase::LensDB::LensDB::GetSingleton(), HuginBase::LensDB::LensDB::GetUserDBPath(), HUGIN_CONV_FILENAME, HuginBase::LensDB::LensDB::SaveCameraCrop(), SaveCamDBDialog::SetCameraMaker(), SaveCamDBDialog::SetCameraModel(), SaveCamDBDialog::SetCameraMount(), and ShowFileDialogWithWarning().

Referenced by PanoOperation::SaveLensOperation::GetInternalCommand().

bool SaveLensParameters ( wxWindow *  parent,
const HuginBase::SrcPanoImage img,
bool  includeVignetting = true 
)

saves the lensparameter of the given HuginBase::SrcPanoImage into the lensfun database

Parameters:
parent parent window for display dialog
img HuginBase::SrcPanoImage, which contains the information which should be stored inside lensfun database
includeVignetting if the vignetting correction can be selected
Returns:
true, if information could be stored into the database

Definition at line 699 of file wxLensDB.cpp.

References HuginBase::LensDB::LensDB::BeginSaveLens(), BuildMountName(), SaveLensDBDialog::DeactivateSaveVignetting(), HuginBase::LensDB::LensDB::EndSaveLens(), SaveLensDBDialog::GetAperture(), SaveLensDBDialog::GetCameraMaker(), SaveLensDBDialog::GetCameraModel(), HuginBase::LensDB::LensDB::GetCameraMount(), SaveLensDBDialog::GetFocalLength(), SaveLensDBDialog::GetLensMaker(), SaveLensDBDialog::GetLensMount(), SaveLensDBDialog::GetLensName(), SaveLensDBDialog::GetSaveDistortion(), SaveLensDBDialog::GetSaveVignetting(), HuginBase::LensDB::LensDB::GetSingleton(), SaveLensDBDialog::GetSubjectDistance(), HuginBase::LensDB::LensDB::GetUserDBPath(), HUGIN_CONV_FILENAME, HuginBase::BaseSrcPanoImage::NO_CROP, HuginBase::LensDB::LensDB::ReloadUserPart(), HuginBase::LensDB::LensDB::SaveCameraCrop(), HuginBase::LensDB::LensDB::SaveCrop(), HuginBase::LensDB::LensDB::SaveDistortion(), HuginBase::LensDB::LensDB::SaveHFOV(), HuginBase::LensDB::LensDB::SaveVignetting(), SaveLensDBDialog::SetAperture(), SaveLensDBDialog::SetCameraMaker(), SaveLensDBDialog::SetCameraModel(), SaveLensDBDialog::SetFocalLength(), SaveLensDBDialog::SetLensMount(), SaveLensDBDialog::SetLensName(), SaveLensDBDialog::SetSubjectDistance(), and ShowFileDialogWithWarning().

bool ShowFileDialogWithWarning ( wxFileDialog &  dlg,
wxString  userDBPath 
)

Definition at line 649 of file wxLensDB.cpp.

Referenced by SaveCameraCropFactor(), and SaveLensParameters().

bool str2double ( wxWindow *  parent,
wxString  s,
double &  d 
)

Definition at line 229 of file wxLensDB.cpp.

References hugin_utils::stringToDouble().

Referenced by ImageVariableDialog::ApplyNewVariables(), PanoPanel::HFOVChanged(), ImagesPanel::OnCropFactorChanged(), HFOVDialog::OnCropFactorChanged(), GLPreviewFrame::OnCropFactorChanged(), ImagesTreeCtrl::OnEndEdit(), GLPreviewFrame::OnExposureChanged(), ImagesPanel::OnFocalLengthChanged(), HFOVDialog::OnFocalLengthChanged(), GLPreviewFrame::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), GLPreviewFrame::OnHFOVChanged(), ImagesPanel::OnMaxEvDiffChanged(), ImagesPanel::OnMinimumOverlapChanged(), PreviewFrame::OnNumTransform(), SaveLensDBDialog::OnOk(), LoadLensDBDialog::OnOk(), GLPreviewFrame::OnProjParameterChanged(), CPListFrame::OnSelectButton(), ImageVariableDialog::OnShowDistortionGraph(), ImageVariableDialog::OnShowResponseGraph(), ImageVariableDialog::OnShowVignettingGraph(), PreviewFrame::OnTextCtrlChanged(), CPEditorPanel::OnTextPointChange(), GLPreviewFrame::OnVFOVChanged(), LensCalFrame::ReadInputs(), and PanoPanel::VFOVChanged().


Generated on 21 Oct 2014 for Hugintrunk by  doxygen 1.4.7