LensTools.h File Reference

some helper classes for working with lenses More...

#include <hugin_shared.h>
#include "panoinc_WX.h"
#include "panoinc.h"

Include dependency graph for LensTools.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

WXIMPEX void FillLensProjectionList (wxControlWithItems *list)
 Fills a wxControlWithItem with all input projection formats, the client data contains the associated projection number.
WXIMPEX void SelectProjection (wxControlWithItems *list, size_t new_projection)
 Selects the given projection in the given list item.
WXIMPEX size_t GetSelectedProjection (wxControlWithItems *list)
 Returns the selected projection number from list.
WXIMPEX void SaveLensParameters (const wxString filename, HuginBase::Panorama *pano, unsigned int imgNr)
 save the lens parameters of the image to a lens file named filename
WXIMPEX void SaveLensParametersToIni (wxWindow *parent, PT::Panorama *pano, const HuginBase::UIntSet images)
 saves the lens parameters to ini files, provides all necessary dialogs
WXIMPEX bool ApplyLensParameters (wxWindow *parent, PT::Panorama *pano, HuginBase::UIntSet images, PT::PanoCommand *&command)
 applies lens parameter from user selected file to pano using GlobalCmdHist
WXIMPEX bool LoadLensParametersChoose (wxWindow *parent, HuginBase::Lens &lens, bool &cropped, bool &autoCenterCrop, vigra::Rect2D &cropRect)
 load lens parameters from lens ini file


Detailed Description

some helper classes for working with lenses

Author:
T. Modes

Definition in file LensTools.h.


Function Documentation

WXIMPEX bool ApplyLensParameters wxWindow *  parent,
PT::Panorama pano,
HuginBase::UIntSet  images,
PT::PanoCommand *&  cmd
 

applies lens parameter from user selected file to pano using GlobalCmdHist

Todo:
I think the sensor size should be copied over, but SrcPanoImage doesn't have such a variable yet.

Definition at line 129 of file LensTools.cpp.

References HuginBase::Lens::getCropFactor(), HuginBase::Panorama::getImageVariables(), HuginBase::ConstStandardImageVariableGroups::getLensForImage(), HuginBase::Lens::getProjection(), LoadLensParametersChoose(), and HuginBase::Lens::variables.

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

WXIMPEX void FillLensProjectionList wxControlWithItems *  list  ) 
 

Fills a wxControlWithItem with all input projection formats, the client data contains the associated projection number.

Definition at line 34 of file LensTools.cpp.

Referenced by ImagesPanel::Create(), EVT_BUTTON(), GLPreviewFrame::GLPreviewFrame(), and LensCalFrame::LensCalFrame().

WXIMPEX size_t GetSelectedProjection wxControlWithItems *  list  ) 
 

Returns the selected projection number from list.

Definition at line 62 of file LensTools.cpp.

Referenced by ImagesPanel::OnLensTypeChanged(), GLPreviewFrame::OnLensTypeChanged(), HFOVDialog::OnTypeChanged(), and LensCalFrame::ReadInputs().

WXIMPEX bool LoadLensParametersChoose wxWindow *  parent,
HuginBase::Lens lens,
bool &  cropped,
bool &  autoCenterCrop,
vigra::Rect2D &  cropRect
 

load lens parameters from lens ini file

Parameters:
parent parent window, for showing messageboxes
lens lens, for reading projection and lensparameters
cropped read if cropped enabled
autoCenterCrop read if automatic center crop
cropRect read crop rect
Returns:
true if lens parameters were sucessful read

Definition at line 214 of file LensTools.cpp.

References cerr, DEBUG_DEBUG, HuginBase::Lens::getImageSize(), map_get(), HuginBase::Lens::setCropFactor(), HuginBase::Lens::setProjection(), makefile::string, and HuginBase::Lens::variables.

Referenced by ApplyLensParameters(), and HFOVDialog::OnLoadLensParameters().

WXIMPEX 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 at line 67 of file LensTools.cpp.

References const_map_get(), HuginBase::Lens::getCropFactor(), HuginBase::Panorama::getImage(), HuginBase::Lens::getImageSize(), HuginBase::Panorama::getImageVariables(), HuginBase::ConstStandardImageVariableGroups::getLensForImage(), HuginBase::Lens::getProjection(), HuginBase::SrcPanoImage::hasEXIFread(), makefile::string, and HuginBase::Lens::variables.

WXIMPEX void SaveLensParametersToIni wxWindow *  parent,
PT::Panorama pano,
const HuginBase::UIntSet  images
 

saves the lens parameters to ini files, provides all necessary dialogs

Definition at line 339 of file LensTools.cpp.

References SaveLensParameters().

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

WXIMPEX void SelectProjection wxControlWithItems *  list,
size_t  new_projection
 

Selects the given projection in the given list item.

Definition at line 49 of file LensTools.cpp.

Referenced by LensCalFrame::AddImages(), EVT_BUTTON(), HFOVDialog::OnLoadLensParameters(), ImagesPanel::OnSelectionChanged(), and GLPreviewFrame::panoramaChanged().


Generated on Tue Sep 2 01:25:44 2014 for Hugintrunk by  doxygen 1.3.9.1