28 #include "hugin_config.h" 
   44     wxXmlResource::Get()->LoadDialog(
this, parent, 
"dlg_focallength");
 
   46     m_cropText = XRCCTRL(*
this, 
"lensdlg_cropfactor_text", wxTextCtrl);
 
   50     m_hfovText = XRCCTRL(*
this, 
"lensdlg_hfov_text", wxTextCtrl);
 
   58     m_projChoice = XRCCTRL(*
this, 
"lensdlg_type_choice", wxChoice);
 
   63     m_okButton = XRCCTRL(*
this, 
"wxID_OK", wxButton);
 
   71     message.Printf(_(
"No or only partial information about field of view was found in image file\n%s\n\nPlease enter the horizontal field of view (HFOV) or the focal length and crop factor."), fn.c_str());
 
   72     XRCCTRL(*
this, 
"lensdlg_message", wxStaticText)->SetLabel(message);
 
   91     } 
else if (m_cropFactor <= 0 && m_focalLength > 0) {
 
  105     this->GetSizer()->SetSizeHints(
this);
 
  124     DEBUG_DEBUG(
"state: " <<  
m_HFOVStr.mb_str(wxConvLocal) << 
", change:" << text.mb_str(wxConvLocal));
 
  125     DEBUG_DEBUG(
"cmd str: " << e.GetString().mb_str(wxConvLocal));
 
  153         hugin_utils::HuginMessageBox(_(
"The horizontal field of view must be positive."), _(
"Hugin"), wxOK | wxICON_INFORMATION, wxGetActiveWindow());
 
  267     bool autoCenterCrop=
false;
 
  268     vigra::Rect2D cropRect;
 
  281         std::vector<double> radialDist(4);
 
  285         radialDist[3] = 1 - radialDist[0] - radialDist[1] - radialDist[2];
 
  286         m_srcImg.setRadialDistortion(radialDist);
 
  290         m_srcImg.setRadialDistortionCenterShift(t);
 
  296         std::vector<double> vigCorrCoeff(4);
 
  301         m_srcImg.setRadialVigCorrCoeff(vigCorrCoeff);
 
  304         m_srcImg.setRadialVigCorrCenterShift(t);
 
  306         std::vector<float> resp(5);
 
  368             wxString::Format(_(
"You have given a field of view of %.2f degrees.\n But the orthographic projection is limited to a field of view of 180 degress.\nDo you want still use that high value?"), 
m_HFOV),
 
  369             _(
"Hugin"), wxICON_EXCLAMATION | wxYES_NO, 
this) == wxNO)
 
void OnFocalLengthChanged(wxCommandEvent &e)
void setCropMode(CropMode val)
Set the crop mode. 
void setImageSize(const vigra::Size2D &sz)
set image size in pixels 
bool str2double(const wxString &s, double &d)
bool isCircularCrop() const 
returns true, if projection requires cicular crop 
double getHFOV() const 
get HFOV in degrees 
wxString doubleTowxString(double d, int digits)
HFOVDialog(wxWindow *parent, HuginBase::SrcPanoImage &srcImg)
ctor. 
#define DEBUG_ASSERT(cond)
include file for the hugin project 
void OnLoadLensParameters(wxCommandEvent &e)
const Map::mapped_type & const_map_get(const Map &m, const typename Map::key_type &key)
void OnTypeChanged(wxCommandEvent &e)
LensProjectionFormat getProjection() const 
get projection type 
wxTextCtrl * m_focalLengthText
void OnCropFactorChanged(wxCommandEvent &e)
void OnOk(wxCommandEvent &e)
wxString m_focalLengthStr
static double calcFocalLength(SrcPanoImage::Projection proj, double hfov, double crop, vigra::Size2D imageSize)
calcualte focal length, given crop factor and hfov 
include file for the hugin project 
HuginBase::SrcPanoImage m_srcImg
static double calcHFOV(SrcPanoImage::Projection proj, double fl, double crop, vigra::Size2D imageSize)
calculate hfov of an image given focal length, image size and crop factor 
double getCropFactor() const 
get crop factor, d35mm/dreal 
HuginBase::SrcPanoImage GetSrcImage()
All variables of a source image. 
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
void OnHFOVChanged(wxCommandEvent &e)