LensTools.cpp File Reference

some helper classes for working with lenses More...

#include "panoinc_WX.h"
#include "panoinc.h"
#include "LensTools.h"
#include <algorithm>
#include "panodata/ImageVariableTranslate.h"
#include "panodata/image_variables.h"

Include dependency graph for LensTools.cpp:

Go to the source code of this file.

Defines

#define image_variable(name, type, default_value)

Functions

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


Detailed Description

some helper classes for working with lenses

Author:
T. Modes

Definition in file LensTools.cpp.


Define Documentation

#define image_variable ( name,
type,
default_value   ) 

Value:

if (HuginBase::PTOVariableConverterFor##name::checkApplicability(it->second.getName()))\
            {\
                if(it->second.isLinked())\
                    linkedVariables.insert(HuginBase::ImageVariableGroup::IVE_##name);\
                else\
                    unlinkedVariables.insert(HuginBase::ImageVariableGroup::IVE_##name);\
            }


Function Documentation

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().

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().

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().

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.

Referenced by PanoOperation::SaveLensOperation::GetInternalCommand(), LensCalFrame::OnSaveLens(), SaveLensParametersToIni(), and LensCalFrame::SaveLensToIni().

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().

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 22 Oct 2014 for Hugintrunk by  doxygen 1.4.7