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:

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

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 *&  command 
)

applies lens parameter from user selected file to pano using GlobalCmdHist

Parameters:
parent parent window for showing message boxes
pano Panorama in which the lens data should read
images images for which the lens parameters should be set, check image sizes before running this function
command pointer to PT::PanoCommand for insertion into command history
Returns:
true if sucessful loaded lens parameters

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.

References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, HuginBase::BaseSrcPanoImage::PANORAMIC, and HuginBase::BaseSrcPanoImage::RECTILINEAR.

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 GLPreviewFrame::OnLensTypeChanged(), ImagesPanel::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(), vigra_ext::EMoR::h, map_get(), HuginBase::Lens::setCropFactor(), HuginBase::Lens::setProjection(), HuginBase::Lens::variableNames, and HuginBase::Lens::variables.

Referenced by 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(), HuginBase::BaseSrcPanoImage::NO_CROP, HuginBase::Lens::variableNames, 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 30 Oct 2014 for Hugintrunk by  doxygen 1.4.7