CPEditorPanel Class Reference

control point editor panel. More...

#include <CPEditorPanel.h>

Inheritance diagram for CPEditorPanel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CPEditorPanel ()
 ctor.
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
void Init (PT::Panorama *pano)
virtual ~CPEditorPanel ()
 dtor.
void setLeftImage (unsigned int imgNr)
 set left image
void setRightImage (unsigned int imgNr)
 set right image
void SetPano (PT::Panorama *panorama)
void panoramaChanged (PT::Panorama &pano)
 called when the panorama changes and we should update our display
void panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet &imgNr)
void SelectGlobalPoint (unsigned int globalNr)
 Select a point.
void ShowControlPoint (unsigned int cpNr)
 show a control point
void ClearSelection ()
 unselect a point

Private Types

enum  CPCreationState {
  NO_POINT, LEFT_POINT, RIGHT_POINT, RIGHT_POINT_RETRY,
  LEFT_POINT_RETRY, BOTH_POINTS_SELECTED
}
 the state machine for point selection: it is set to the current selection More...

Private Member Functions

void UpdateDisplay (bool newImages)
 updates the display after another image has been selected.
void EnablePointEdit (bool state)
 enable or disable controls for editing other points
void SelectLocalPoint (unsigned int LVpointNr)
 select a local point.
bool globalPNr2LocalPNr (unsigned int &localNr, unsigned int globalNr) const
 map a global point nr to a local one, if possible
unsigned int localPNr2GlobalPNr (unsigned int localNr) const
 find a local point
void NewPointChange (hugin_utils::FDiff2D p, bool left)
void CreateNewPoint ()
 this is used to finally create the point in the panorama model
bool PointFineTune (unsigned int tmplImgNr, const vigra::Diff2D &tmplPoint, int tmplWidth, unsigned int subjImgNr, const hugin_utils::FDiff2D &subjPoint, int searchWidth, vigra_ext::CorrelationResult &tunedPos)
 search for region in destImg
const float getVerticalCPBias ()
void OnMyButtonClicked (wxCommandEvent &e)
void OnCPEvent (CPEvent &ev)
void OnLeftChoiceChange (wxCommandEvent &e)
void OnRightChoiceChange (wxCommandEvent &e)
void OnCPListSelect (wxListEvent &e)
void OnCPListDeselect (wxListEvent &e)
void OnAddButton (wxCommandEvent &e)
void OnZoom (wxCommandEvent &e)
void OnTextPointChange (wxCommandEvent &e)
void OnKey (wxKeyEvent &e)
void OnDeleteButton (wxCommandEvent &e)
void OnPrevImg (wxCommandEvent &e)
void OnNextImg (wxCommandEvent &e)
void OnColumnWidthChange (wxListEvent &e)
void OnFineTuneButton (wxCommandEvent &e)
void OnCelesteButton (wxCommandEvent &e)
void FineTuneSelectedPoint (bool left)
void FineTuneNewPoint (bool left)
hugin_utils::FDiff2D LocalFineTunePoint (unsigned int srcNr, const vigra::Diff2D &srcPnt, unsigned int moveNr, const hugin_utils::FDiff2D &movePnt)
hugin_utils::FDiff2D EstimatePoint (const hugin_utils::FDiff2D &p, bool left)
 Estimate position of point in the other image.
void changeState (CPCreationState newState)
void estimateAndAddOtherPoint (const hugin_utils::FDiff2D &p, bool left, CPImageCtrl *thisImg, unsigned int thisImgNr, CPCreationState THIS_POINT, CPCreationState THIS_POINT_RETRY, CPImageCtrl *otherImg, unsigned int otherImgNr, CPCreationState OTHER_POINT, CPCreationState OTHER_POINT_RETRY)
 estimate and set point in other image
CPImageCtrl::ImageRotation GetRot (double yaw, double roll, double pitch)
 calculate rotation required for upright image display from roll, pitch and yaw angles
void UpdateTransforms ()
 updated the internal transform object for drawing line in controls
 DECLARE_EVENT_TABLE ()

Private Attributes

CPCreationState cpCreationState
CPImagesComboBoxm_leftChoice
CPImagesComboBoxm_rightChoice
CPImageCtrlm_leftImg
CPImageCtrlm_rightImg
wxListCtrl * m_cpList
wxTextCtrl * m_x1Text
wxTextCtrl * m_y1Text
wxTextCtrl * m_x2Text
wxTextCtrl * m_y2Text
wxTextCtrl * m_errorText
wxChoice * m_cpModeChoice
wxButton * m_addButton
wxButton * m_delButton
wxCheckBox * m_autoAddCB
wxCheckBox * m_fineTuneCB
wxCheckBox * m_estimateCB
wxPanel * m_cp_ctrls
PT::Panoramam_pano
unsigned int m_leftImageNr
unsigned int m_rightImageNr
std::string m_leftFile
std::string m_rightFile
bool m_listenToPageChange
double m_detailZoomFactor
PTools::Transform m_leftTransform
PTools::Transform m_leftInvTransform
PTools::Transform m_rightTransform
PTools::Transform m_rightInvTransform
unsigned int m_selectedPoint
HuginBase::CPointVector currentPoints
std::set< unsigned int > mirroredPoints
CPImageCtrl::ImageRotation m_leftRot
CPImageCtrl::ImageRotation m_rightRot

Detailed Description

control point editor panel.

This panel is used to create/change/edit control points

Todo:
support control lines

Definition at line 63 of file CPEditorPanel.h.


Member Enumeration Documentation

enum CPEditorPanel::CPCreationState [private]
 

the state machine for point selection: it is set to the current selection

Enumeration values:
NO_POINT  no point selected
LEFT_POINT  point in left image selected
RIGHT_POINT  selected point in right image
RIGHT_POINT_RETRY  point in left image selected, finetune failed in right image
LEFT_POINT_RETRY  right point, finetune for left point failed
BOTH_POINTS_SELECTED  left and right point selected, waiting for add point.

Definition at line 197 of file CPEditorPanel.h.

Referenced by NewPointChange().


Constructor & Destructor Documentation

CPEditorPanel::CPEditorPanel  ) 
 

ctor.

CPEditorPanel::~CPEditorPanel  )  [virtual]
 

dtor.

Definition at line 220 of file CPEditorPanel.cpp.

References DEBUG_TRACE, m_autoAddCB, m_estimateCB, m_fineTuneCB, m_pano, m_x1Text, m_x2Text, m_y1Text, m_y2Text, and HuginBase::Panorama::removeObserver().


Member Function Documentation

void CPEditorPanel::changeState CPCreationState  newState  )  [private]
 

Definition at line 1566 of file CPEditorPanel.cpp.

References BOTH_POINTS_SELECTED, CPImageCtrl::clearNewPoint(), ClearSelection(), cpCreationState, DEBUG_TRACE, MainFrame::Get(), LEFT_POINT, LEFT_POINT_RETRY, m_addButton, m_delButton, m_fineTuneCB, m_leftImageNr, m_leftImg, m_rightImg, m_selectedPoint, NO_POINT, OnZoom(), RIGHT_POINT, RIGHT_POINT_RETRY, CPImageCtrl::showSearchArea(), and CPImageCtrl::showTemplateArea().

Referenced by ClearSelection(), CreateNewPoint(), estimateAndAddOtherPoint(), NewPointChange(), OnCPEvent(), OnCPListDeselect(), OnCPListSelect(), OnDeleteButton(), OnKey(), setLeftImage(), setRightImage(), and ShowControlPoint().

void CPEditorPanel::ClearSelection  ) 
 

unselect a point

Definition at line 539 of file CPEditorPanel.cpp.

References changeState(), CPImageCtrl::deselect(), m_cpList, m_leftImg, m_rightImg, m_selectedPoint, NO_POINT, and UpdateDisplay().

Referenced by changeState().

bool CPEditorPanel::Create wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel")
 

Definition at line 96 of file CPEditorPanel.cpp.

References cpCreationState, DEBUG_ASSERT, DEBUG_TRACE, CPImageCtrl::Init(), m_addButton, m_autoAddCB, m_cp_ctrls, m_cpList, m_cpModeChoice, m_delButton, m_detailZoomFactor, m_estimateCB, m_fineTuneCB, m_leftChoice, m_leftImageNr, m_leftImg, m_leftInvTransform, m_leftRot, m_leftTransform, m_listenToPageChange, m_rightChoice, m_rightImageNr, m_rightImg, m_rightInvTransform, m_rightRot, m_rightTransform, m_selectedPoint, m_x1Text, m_x2Text, m_y1Text, m_y2Text, OnKey(), OnZoom(), and CPImageCtrl::setTransforms().

void CPEditorPanel::CreateNewPoint  )  [private]
 

this is used to finally create the point in the panorama model

Definition at line 462 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), CPImagesComboBox::CalcCPDistance(), changeState(), DEBUG_TRACE, hugin_utils::FDiff2D, MainFrame::Get(), GlobalCmdHist::getInstance(), CPImageCtrl::getNewPoint(), getVerticalCPBias(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, m_cpModeChoice, m_leftChoice, m_leftImg, m_pano, m_rightChoice, m_rightImg, HuginBase::ControlPoint::mode, NO_POINT, SelectGlobalPoint(), hugin_utils::TDiff2D< T >::x, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, hugin_utils::TDiff2D< T >::y, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

Referenced by estimateAndAddOtherPoint(), NewPointChange(), OnAddButton(), and OnCPEvent().

CPEditorPanel::DECLARE_EVENT_TABLE  )  [private]
 

void CPEditorPanel::EnablePointEdit bool  state  )  [private]
 

enable or disable controls for editing other points

Definition at line 1279 of file CPEditorPanel.cpp.

References m_cpModeChoice, m_delButton, m_x1Text, m_x2Text, m_y1Text, and m_y2Text.

Referenced by OnCPListDeselect(), OnCPListSelect(), SelectLocalPoint(), and UpdateDisplay().

void CPEditorPanel::estimateAndAddOtherPoint const hugin_utils::FDiff2D p,
bool  left,
CPImageCtrl thisImg,
unsigned int  thisImgNr,
CPCreationState  THIS_POINT,
CPCreationState  THIS_POINT_RETRY,
CPImageCtrl otherImg,
unsigned int  otherImgNr,
CPCreationState  OTHER_POINT,
CPCreationState  OTHER_POINT_RETRY
[private]
 

estimate and set point in other image

Definition at line 614 of file CPEditorPanel.cpp.

References BOTH_POINTS_SELECTED, changeState(), CreateNewPoint(), vigra_ext::CorrelationResult::curv, EstimatePoint(), hugin_utils::FDiff2D, MainFrame::Get(), HuginBase::Panorama::getImage(), CPImageCtrl::getNewPoint(), HuginBase::SrcPanoImage::getWidth(), HUGIN_FT_SEARCH_AREA_PERCENT, HUGIN_FT_TEMPLATE_SIZE, m_autoAddCB, m_detailZoomFactor, m_fineTuneCB, m_pano, vigra_ext::CorrelationResult::maxAngle, vigra_ext::CorrelationResult::maxi, vigra_ext::CorrelationResult::maxpos, PointFineTune(), CPImageCtrl::setNewPoint(), CPImageCtrl::setScale(), CPImageCtrl::showPosition(), hugin_utils::TDiff2D< T >::toDiff2D(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by NewPointChange().

FDiff2D CPEditorPanel::EstimatePoint const hugin_utils::FDiff2D p,
bool  left
[private]
 

Estimate position of point in the other image.

simply average all point distances together approximatly true for rectilinear images with roll and pitch close to 0...

Todo:
use Pano Tools optimizer, to create better estimates, that are correct in most cases..
Parameters:
p point to warp to other image
left true if p is located in left image.

Definition at line 1859 of file CPEditorPanel.cpp.

References currentPoints, DEBUG_DEBUG, DEBUG_WARN, hugin_utils::FDiff2D, HuginBase::SrcPanoImage::getHeight(), HuginBase::Panorama::getImage(), HuginBase::SrcPanoImage::getWidth(), m_pano, m_rightImageNr, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by estimateAndAddOtherPoint().

void CPEditorPanel::FineTuneNewPoint bool  left  )  [private]
 

Definition at line 1820 of file CPEditorPanel.cpp.

References cpCreationState, hugin_utils::FDiff2D, CPImageCtrl::getNewPoint(), LEFT_POINT_RETRY, LocalFineTunePoint(), m_leftImg, m_rightImg, RIGHT_POINT_RETRY, CPImageCtrl::setNewPoint(), hugin_utils::TDiff2D< T >::toDiff2D(), and CPImageCtrl::update().

Referenced by OnFineTuneButton(), and OnKey().

void CPEditorPanel::FineTuneSelectedPoint bool  left  )  [private]
 

Definition at line 1777 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), currentPoints, DEBUG_ASSERT, DEBUG_DEBUG, hugin_utils::FDiff2D, GlobalCmdHist::getInstance(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, LocalFineTunePoint(), m_pano, m_selectedPoint, HuginBase::ControlPoint::mirror(), mirroredPoints, hugin_utils::roundi(), set_contains(), hugin_utils::TDiff2D< T >::x, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, hugin_utils::TDiff2D< T >::y, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

Referenced by OnFineTuneButton(), and OnKey().

CPImageCtrl::ImageRotation CPEditorPanel::GetRot double  yaw,
double  roll,
double  pitch
[private]
 

calculate rotation required for upright image display from roll, pitch and yaw angles

Definition at line 1900 of file CPEditorPanel.cpp.

Referenced by panoramaImagesChanged(), setLeftImage(), and setRightImage().

const float CPEditorPanel::getVerticalCPBias  )  [private]
 

Definition at line 521 of file CPEditorPanel.cpp.

References HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjection(), and m_pano.

Referenced by CreateNewPoint(), and OnCPEvent().

bool CPEditorPanel::globalPNr2LocalPNr unsigned int &  localNr,
unsigned int  globalNr
const [private]
 

map a global point nr to a local one, if possible

Definition at line 591 of file CPEditorPanel.cpp.

References currentPoints.

Referenced by SelectGlobalPoint().

void CPEditorPanel::Init PT::Panorama pano  ) 
 

Definition at line 213 of file CPEditorPanel.cpp.

References HuginBase::Panorama::addObserver(), and m_pano.

FDiff2D CPEditorPanel::LocalFineTunePoint unsigned int  srcNr,
const vigra::Diff2D &  srcPnt,
unsigned int  moveNr,
const hugin_utils::FDiff2D movePnt
[private]
 

Definition at line 1759 of file CPEditorPanel.cpp.

References hugin_utils::FDiff2D, HUGIN_FT_LOCAL_SEARCH_WIDTH, HUGIN_FT_TEMPLATE_SIZE, vigra_ext::CorrelationResult::maxpos, and PointFineTune().

Referenced by FineTuneNewPoint(), and FineTuneSelectedPoint().

unsigned int CPEditorPanel::localPNr2GlobalPNr unsigned int  localNr  )  const [private]
 

find a local point

Definition at line 607 of file CPEditorPanel.cpp.

References currentPoints.

Referenced by OnCPEvent(), OnDeleteButton(), and OnKey().

void CPEditorPanel::NewPointChange hugin_utils::FDiff2D  p,
bool  left
[private]
 

Definition at line 696 of file CPEditorPanel.cpp.

References BOTH_POINTS_SELECTED, changeState(), CPImageCtrl::clearNewPoint(), cpCreationState, CPCreationState, CreateNewPoint(), currentPoints, vigra_ext::CorrelationResult::curv, DEBUG_ASSERT, DEBUG_TRACE, estimateAndAddOtherPoint(), hugin_utils::FDiff2D, MainFrame::Get(), HuginBase::Panorama::getImage(), CPImageCtrl::getNewPoint(), CPImageCtrl::getScale(), HuginBase::SrcPanoImage::getWidth(), HUGIN_FT_SEARCH_AREA_PERCENT, HUGIN_FT_TEMPLATE_SIZE, m_autoAddCB, m_detailZoomFactor, m_estimateCB, m_fineTuneCB, m_pano, vigra_ext::CorrelationResult::maxAngle, vigra_ext::CorrelationResult::maxi, vigra_ext::CorrelationResult::maxpos, PointFineTune(), CPImageCtrl::setNewPoint(), CPImageCtrl::setScale(), CPImageCtrl::showPosition(), hugin_utils::TDiff2D< T >::toDiff2D(), CPImageCtrl::update(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by OnCPEvent().

void CPEditorPanel::OnAddButton wxCommandEvent &  e  )  [private]
 

Definition at line 1518 of file CPEditorPanel.cpp.

References cpCreationState, and CreateNewPoint().

void CPEditorPanel::OnCelesteButton wxCommandEvent &  e  )  [private]
 

Definition at line 1695 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), cout, currentPoints, DEBUG_TRACE, vigra_ext::destImage(), MainFrame::Get(), celeste::getCelesteControlPoints(), HuginBase::Panorama::getImage(), GlobalCmdHist::getInstance(), MainFrame::GetSVMModel(), HUGIN_CELESTE_FILTER, HUGIN_CELESTE_THRESHOLD, ProgressReporterDialog::increaseProgress(), m_leftImageNr, m_pano, vigra_ext::srcImageRange(), threshold(), and vigra_ext::transformImage().

void CPEditorPanel::OnColumnWidthChange wxListEvent &  e  )  [private]
 

Definition at line 1894 of file CPEditorPanel.cpp.

References m_cpList.

void CPEditorPanel::OnCPEvent CPEvent ev  )  [private]
 

Definition at line 319 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), CPImagesComboBox::CalcCPDistance(), changeState(), cpCreationState, CreateNewPoint(), currentPoints, DEBUG_DEBUG, DEBUG_ERROR, DEBUG_FATAL, DEBUG_TRACE, hugin_utils::FDiff2D, MainFrame::Get(), CPEvent::getControlPoint(), GlobalCmdHist::getInstance(), CPEvent::getMode(), CPEvent::getPoint(), CPEvent::getPointNr(), CPEvent::getRect(), getVerticalCPBias(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, localPNr2GlobalPNr(), m_leftChoice, m_leftImg, m_pano, m_rightChoice, m_rightImg, CPImageCtrl::MaxScrollDelta(), HuginBase::ControlPoint::mode, NewPointChange(), NO_POINT, hugin_utils::roundi(), CPImageCtrl::ScrollDelta(), SelectGlobalPoint(), SelectLocalPoint(), CPImageCtrl::update(), hugin_utils::TDiff2D< T >::x, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, hugin_utils::TDiff2D< T >::y, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

void CPEditorPanel::OnCPListDeselect wxListEvent &  e  )  [private]
 

Definition at line 1381 of file CPEditorPanel.cpp.

References changeState(), CPImageCtrl::deselect(), EnablePointEdit(), m_leftImg, m_rightImg, and NO_POINT.

void CPEditorPanel::OnCPListSelect wxListEvent &  e  )  [private]
 

Definition at line 1370 of file CPEditorPanel.cpp.

References changeState(), DEBUG_TRACE, EnablePointEdit(), NO_POINT, and SelectLocalPoint().

void CPEditorPanel::OnDeleteButton wxCommandEvent &  e  )  [private]
 

Definition at line 1526 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), CPImagesComboBox::CalcCPDistance(), changeState(), cpCreationState, DEBUG_TRACE, GlobalCmdHist::getInstance(), localPNr2GlobalPNr(), m_cpList, m_leftChoice, m_pano, m_rightChoice, and NO_POINT.

void CPEditorPanel::OnFineTuneButton wxCommandEvent &  e  )  [private]
 

Definition at line 1686 of file CPEditorPanel.cpp.

References cpCreationState, FineTuneNewPoint(), and FineTuneSelectedPoint().

void CPEditorPanel::OnKey wxKeyEvent &  e  )  [private]
 

Definition at line 1434 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), changeState(), cpCreationState, DEBUG_DEBUG, FineTuneNewPoint(), FineTuneSelectedPoint(), GlobalCmdHist::getInstance(), localPNr2GlobalPNr(), m_cpList, m_leftImageNr, m_pano, m_rightImageNr, NO_POINT, OnNextImg(), OnPrevImg(), and OnZoom().

Referenced by Create().

void CPEditorPanel::OnLeftChoiceChange wxCommandEvent &  e  )  [private]
 

Definition at line 1355 of file CPEditorPanel.cpp.

References DEBUG_TRACE, m_listenToPageChange, and setLeftImage().

void CPEditorPanel::OnMyButtonClicked wxCommandEvent &  e  )  [private]
 

void CPEditorPanel::OnNextImg wxCommandEvent &  e  )  [private]
 

Definition at line 1665 of file CPEditorPanel.cpp.

References HuginBase::Panorama::getNrOfImages(), m_leftImageNr, m_pano, m_rightImageNr, setLeftImage(), and setRightImage().

Referenced by OnKey().

void CPEditorPanel::OnPrevImg wxCommandEvent &  e  )  [private]
 

Definition at line 1644 of file CPEditorPanel.cpp.

References HuginBase::Panorama::getNrOfImages(), m_leftImageNr, m_pano, m_rightImageNr, setLeftImage(), and setRightImage().

Referenced by OnKey().

void CPEditorPanel::OnRightChoiceChange wxCommandEvent &  e  )  [private]
 

Definition at line 1363 of file CPEditorPanel.cpp.

References DEBUG_TRACE, m_listenToPageChange, and setRightImage().

void CPEditorPanel::OnTextPointChange wxCommandEvent &  e  )  [private]
 

Definition at line 1290 of file CPEditorPanel.cpp.

References CommandHistory::addCommand(), currentPoints, DEBUG_TRACE, HuginBase::SrcPanoImage::getHeight(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getSrcImage(), HuginBase::SrcPanoImage::getWidth(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, m_cpList, m_cpModeChoice, m_pano, m_x1Text, m_x2Text, m_y1Text, m_y2Text, HuginBase::ControlPoint::mirror(), mirroredPoints, HuginBase::ControlPoint::mode, set_contains(), str2double(), HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

void CPEditorPanel::OnZoom wxCommandEvent &  e  )  [private]
 

Definition at line 1393 of file CPEditorPanel.cpp.

References DEBUG_ERROR, m_detailZoomFactor, m_leftImg, m_rightImg, m_selectedPoint, SelectLocalPoint(), and CPImageCtrl::setScale().

Referenced by changeState(), Create(), and OnKey().

void CPEditorPanel::panoramaChanged PT::Panorama pano  ) 
 

called when the panorama changes and we should update our display

Definition at line 967 of file CPEditorPanel.cpp.

References DEBUG_DEBUG, DEBUG_TRACE, HuginBase::Panorama::getNextCPTypeLineNumber(), m_cpModeChoice, and UpdateTransforms().

void CPEditorPanel::panoramaImagesChanged PT::Panorama pano,
const PT::UIntSet imgNr
 

Definition at line 999 of file CPEditorPanel.cpp.

References CPImagesComboBox::CalcCPDistance(), const_map_get(), DEBUG_DEBUG, DEBUG_TRACE, HuginBase::Panorama::getImage(), HuginBase::Panorama::getImageVariables(), HuginBase::Panorama::getNrOfImages(), GetRot(), m_addButton, m_autoAddCB, m_cpModeChoice, m_delButton, m_estimateCB, m_fineTuneCB, m_leftChoice, m_leftFile, m_leftImageNr, m_leftImg, m_leftRot, m_listenToPageChange, m_pano, m_rightChoice, m_rightFile, m_rightImageNr, m_rightImg, m_rightRot, CPImageCtrl::setImage(), setLeftImage(), setRightImage(), and UpdateDisplay().

bool CPEditorPanel::PointFineTune unsigned int  tmplImgNr,
const vigra::Diff2D &  tmplPoint,
int  tmplWidth,
unsigned int  subjImgNr,
const hugin_utils::FDiff2D subjPoint,
int  searchWidth,
vigra_ext::CorrelationResult tunedPos
[private]
 

search for region in destImg

Definition at line 850 of file CPEditorPanel.cpp.

References vigra_ext::CorrelationResult::curv, DEBUG_TRACE, DEG_TO_RAD, hugin_utils::FDiff2D, MainFrame::Get(), HuginBase::Panorama::getImage(), HUGIN_FT_CORR_THRESHOLD, HUGIN_FT_CURV_THRESHOLD, HUGIN_FT_ROTATION_SEARCH, HUGIN_FT_ROTATION_START_ANGLE, HUGIN_FT_ROTATION_STEPS, HUGIN_FT_ROTATION_STOP_ANGLE, m_pano, vigra_ext::CorrelationResult::maxAngle, vigra_ext::CorrelationResult::maxi, vigra_ext::PointFineTune(), vigra_ext::PointFineTuneRotSearch(), hugin_utils::TDiff2D< T >::toDiff2D(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by estimateAndAddOtherPoint(), LocalFineTunePoint(), and NewPointChange().

void CPEditorPanel::SelectGlobalPoint unsigned int  globalNr  ) 
 

Select a point.

This should highlight it in the listview and on the pictures.

Does not change the pictures. The control point must be on the two existing images

Definition at line 580 of file CPEditorPanel.cpp.

References DEBUG_DEBUG, DEBUG_ERROR, globalPNr2LocalPNr(), and SelectLocalPoint().

Referenced by CreateNewPoint(), OnCPEvent(), and ShowControlPoint().

void CPEditorPanel::SelectLocalPoint unsigned int  LVpointNr  )  [private]
 

select a local point.

Todo:
scroll windows so that the point is centred

Definition at line 554 of file CPEditorPanel.cpp.

References currentPoints, DEBUG_DEBUG, DEBUG_TRACE, EnablePointEdit(), m_cpList, m_cpModeChoice, m_leftImg, m_rightImg, m_selectedPoint, m_x1Text, m_x2Text, m_y1Text, m_y2Text, HuginBase::ControlPoint::mode, CPImageCtrl::selectPoint(), HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

Referenced by OnCPEvent(), OnCPListSelect(), OnZoom(), and SelectGlobalPoint().

void CPEditorPanel::setLeftImage unsigned int  imgNr  ) 
 

set left image

Definition at line 237 of file CPEditorPanel.cpp.

References changeState(), const_map_get(), DEBUG_TRACE, HuginBase::Panorama::getImage(), HuginBase::Panorama::getImageVariables(), GetRot(), m_leftChoice, m_leftFile, m_leftImageNr, m_leftImg, m_leftRot, m_pano, m_rightChoice, m_selectedPoint, NO_POINT, CPImageCtrl::setImage(), CPImagesComboBox::SetRefImage(), UpdateDisplay(), and UpdateTransforms().

Referenced by OnLeftChoiceChange(), OnNextImg(), OnPrevImg(), panoramaImagesChanged(), ShowControlPoint(), and MainFrame::ShowCtrlPointEditor().

void CPEditorPanel::SetPano PT::Panorama panorama  )  [inline]
 

Definition at line 83 of file CPEditorPanel.h.

References m_pano.

void CPEditorPanel::setRightImage unsigned int  imgNr  ) 
 

set right image

Definition at line 269 of file CPEditorPanel.cpp.

References changeState(), const_map_get(), DEBUG_TRACE, HuginBase::Panorama::getImage(), HuginBase::Panorama::getImageVariables(), GetRot(), m_leftChoice, m_pano, m_rightChoice, m_rightFile, m_rightImageNr, m_rightImg, m_rightRot, m_selectedPoint, NO_POINT, CPImageCtrl::setImage(), CPImagesComboBox::SetRefImage(), UpdateDisplay(), and UpdateTransforms().

Referenced by OnNextImg(), OnPrevImg(), OnRightChoiceChange(), panoramaImagesChanged(), ShowControlPoint(), and MainFrame::ShowCtrlPointEditor().

void CPEditorPanel::ShowControlPoint unsigned int  cpNr  ) 
 

show a control point

show control point cpNr and the corrosponding images

Definition at line 1555 of file CPEditorPanel.cpp.

References changeState(), HuginBase::Panorama::getCtrlPoint(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, m_pano, NO_POINT, SelectGlobalPoint(), setLeftImage(), and setRightImage().

Referenced by MainFrame::ShowCtrlPoint().

void CPEditorPanel::UpdateDisplay bool  newImages  )  [private]
 

updates the display after another image has been selected.

updates control points, and other widgets

Definition at line 1150 of file CPEditorPanel.cpp.

References CPImageCtrl::clearCtrlPointList(), currentPoints, DEBUG_DEBUG, EnablePointEdit(), HuginBase::ControlPoint::error, HuginBase::Panorama::getCtrlPoints(), m_cpList, m_cpModeChoice, m_leftChoice, m_leftImageNr, m_leftImg, m_pano, m_rightChoice, m_rightImageNr, m_rightImg, m_selectedPoint, m_x1Text, m_x2Text, m_y1Text, m_y2Text, mirroredPoints, HuginBase::ControlPoint::mode, CPImageCtrl::selectPoint(), CPImageCtrl::setCtrlPoint(), CPImageCtrl::setSameImage(), CPImageCtrl::update(), HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

Referenced by ClearSelection(), panoramaImagesChanged(), setLeftImage(), and setRightImage().

void CPEditorPanel::UpdateTransforms  )  [private]
 

updated the internal transform object for drawing line in controls

Definition at line 305 of file CPEditorPanel.cpp.

References HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), m_leftImageNr, m_leftInvTransform, m_leftTransform, m_pano, m_rightImageNr, m_rightInvTransform, and m_rightTransform.

Referenced by panoramaChanged(), setLeftImage(), and setRightImage().


Member Data Documentation

CPCreationState CPEditorPanel::cpCreationState [private]
 

Definition at line 224 of file CPEditorPanel.h.

Referenced by changeState(), Create(), FineTuneNewPoint(), NewPointChange(), OnAddButton(), OnCPEvent(), OnDeleteButton(), OnFineTuneButton(), and OnKey().

HuginBase::CPointVector CPEditorPanel::currentPoints [private]
 

Definition at line 259 of file CPEditorPanel.h.

Referenced by EstimatePoint(), FineTuneSelectedPoint(), globalPNr2LocalPNr(), localPNr2GlobalPNr(), NewPointChange(), OnCelesteButton(), OnCPEvent(), OnTextPointChange(), SelectLocalPoint(), and UpdateDisplay().

wxButton* CPEditorPanel::m_addButton [private]
 

Definition at line 234 of file CPEditorPanel.h.

Referenced by changeState(), Create(), and panoramaImagesChanged().

wxCheckBox* CPEditorPanel::m_autoAddCB [private]
 

Definition at line 236 of file CPEditorPanel.h.

Referenced by Create(), estimateAndAddOtherPoint(), NewPointChange(), panoramaImagesChanged(), and ~CPEditorPanel().

wxPanel* CPEditorPanel::m_cp_ctrls [private]
 

Definition at line 239 of file CPEditorPanel.h.

Referenced by Create().

wxListCtrl* CPEditorPanel::m_cpList [private]
 

Definition at line 230 of file CPEditorPanel.h.

Referenced by ClearSelection(), Create(), OnColumnWidthChange(), OnDeleteButton(), OnKey(), OnTextPointChange(), SelectLocalPoint(), and UpdateDisplay().

wxChoice* CPEditorPanel::m_cpModeChoice [private]
 

Definition at line 233 of file CPEditorPanel.h.

Referenced by Create(), CreateNewPoint(), EnablePointEdit(), OnTextPointChange(), panoramaChanged(), panoramaImagesChanged(), SelectLocalPoint(), and UpdateDisplay().

wxButton* CPEditorPanel::m_delButton [private]
 

Definition at line 235 of file CPEditorPanel.h.

Referenced by changeState(), Create(), EnablePointEdit(), and panoramaImagesChanged().

double CPEditorPanel::m_detailZoomFactor [private]
 

Definition at line 249 of file CPEditorPanel.h.

Referenced by Create(), estimateAndAddOtherPoint(), NewPointChange(), and OnZoom().

wxTextCtrl * CPEditorPanel::m_errorText [private]
 

Definition at line 232 of file CPEditorPanel.h.

wxCheckBox* CPEditorPanel::m_estimateCB [private]
 

Definition at line 238 of file CPEditorPanel.h.

Referenced by Create(), NewPointChange(), panoramaImagesChanged(), and ~CPEditorPanel().

wxCheckBox* CPEditorPanel::m_fineTuneCB [private]
 

Definition at line 237 of file CPEditorPanel.h.

Referenced by changeState(), Create(), estimateAndAddOtherPoint(), NewPointChange(), panoramaImagesChanged(), and ~CPEditorPanel().

CPImagesComboBox* CPEditorPanel::m_leftChoice [private]
 

Definition at line 227 of file CPEditorPanel.h.

Referenced by Create(), CreateNewPoint(), OnCPEvent(), OnDeleteButton(), panoramaImagesChanged(), setLeftImage(), setRightImage(), and UpdateDisplay().

std::string CPEditorPanel::m_leftFile [private]
 

Definition at line 246 of file CPEditorPanel.h.

Referenced by panoramaImagesChanged(), and setLeftImage().

unsigned int CPEditorPanel::m_leftImageNr [private]
 

Definition at line 244 of file CPEditorPanel.h.

Referenced by changeState(), Create(), OnCelesteButton(), OnKey(), OnNextImg(), OnPrevImg(), panoramaImagesChanged(), setLeftImage(), UpdateDisplay(), and UpdateTransforms().

CPImageCtrl* CPEditorPanel::m_leftImg [private]
 

Definition at line 229 of file CPEditorPanel.h.

Referenced by changeState(), ClearSelection(), Create(), CreateNewPoint(), FineTuneNewPoint(), OnCPEvent(), OnCPListDeselect(), OnZoom(), panoramaImagesChanged(), SelectLocalPoint(), setLeftImage(), and UpdateDisplay().

PTools::Transform CPEditorPanel::m_leftInvTransform [private]
 

Definition at line 252 of file CPEditorPanel.h.

Referenced by Create(), and UpdateTransforms().

CPImageCtrl::ImageRotation CPEditorPanel::m_leftRot [private]
 

Definition at line 264 of file CPEditorPanel.h.

Referenced by Create(), panoramaImagesChanged(), and setLeftImage().

PTools::Transform CPEditorPanel::m_leftTransform [private]
 

Definition at line 251 of file CPEditorPanel.h.

Referenced by Create(), and UpdateTransforms().

bool CPEditorPanel::m_listenToPageChange [private]
 

Definition at line 248 of file CPEditorPanel.h.

Referenced by Create(), OnLeftChoiceChange(), OnRightChoiceChange(), and panoramaImagesChanged().

PT::Panorama* CPEditorPanel::m_pano [private]
 

Definition at line 242 of file CPEditorPanel.h.

Referenced by CreateNewPoint(), estimateAndAddOtherPoint(), EstimatePoint(), FineTuneSelectedPoint(), getVerticalCPBias(), Init(), NewPointChange(), OnCelesteButton(), OnCPEvent(), OnDeleteButton(), OnKey(), OnNextImg(), OnPrevImg(), OnTextPointChange(), panoramaImagesChanged(), PointFineTune(), setLeftImage(), SetPano(), setRightImage(), ShowControlPoint(), UpdateDisplay(), UpdateTransforms(), and ~CPEditorPanel().

CPImagesComboBox* CPEditorPanel::m_rightChoice [private]
 

Definition at line 228 of file CPEditorPanel.h.

Referenced by Create(), CreateNewPoint(), OnCPEvent(), OnDeleteButton(), panoramaImagesChanged(), setLeftImage(), setRightImage(), and UpdateDisplay().

std::string CPEditorPanel::m_rightFile [private]
 

Definition at line 247 of file CPEditorPanel.h.

Referenced by panoramaImagesChanged(), and setRightImage().

unsigned int CPEditorPanel::m_rightImageNr [private]
 

Definition at line 245 of file CPEditorPanel.h.

Referenced by Create(), EstimatePoint(), OnKey(), OnNextImg(), OnPrevImg(), panoramaImagesChanged(), setRightImage(), UpdateDisplay(), and UpdateTransforms().

CPImageCtrl * CPEditorPanel::m_rightImg [private]
 

Definition at line 229 of file CPEditorPanel.h.

Referenced by changeState(), ClearSelection(), Create(), CreateNewPoint(), FineTuneNewPoint(), OnCPEvent(), OnCPListDeselect(), OnZoom(), panoramaImagesChanged(), SelectLocalPoint(), setRightImage(), and UpdateDisplay().

PTools::Transform CPEditorPanel::m_rightInvTransform [private]
 

Definition at line 254 of file CPEditorPanel.h.

Referenced by Create(), and UpdateTransforms().

CPImageCtrl::ImageRotation CPEditorPanel::m_rightRot [private]
 

Definition at line 265 of file CPEditorPanel.h.

Referenced by Create(), panoramaImagesChanged(), and setRightImage().

PTools::Transform CPEditorPanel::m_rightTransform [private]
 

Definition at line 253 of file CPEditorPanel.h.

Referenced by Create(), and UpdateTransforms().

unsigned int CPEditorPanel::m_selectedPoint [private]
 

Definition at line 256 of file CPEditorPanel.h.

Referenced by changeState(), ClearSelection(), Create(), FineTuneSelectedPoint(), OnZoom(), SelectLocalPoint(), setLeftImage(), setRightImage(), and UpdateDisplay().

wxTextCtrl* CPEditorPanel::m_x1Text [private]
 

Definition at line 232 of file CPEditorPanel.h.

Referenced by Create(), EnablePointEdit(), OnTextPointChange(), SelectLocalPoint(), UpdateDisplay(), and ~CPEditorPanel().

wxTextCtrl * CPEditorPanel::m_x2Text [private]
 

Definition at line 232 of file CPEditorPanel.h.

Referenced by Create(), EnablePointEdit(), OnTextPointChange(), SelectLocalPoint(), UpdateDisplay(), and ~CPEditorPanel().

wxTextCtrl * CPEditorPanel::m_y1Text [private]
 

Definition at line 232 of file CPEditorPanel.h.

Referenced by Create(), EnablePointEdit(), OnTextPointChange(), SelectLocalPoint(), UpdateDisplay(), and ~CPEditorPanel().

wxTextCtrl * CPEditorPanel::m_y2Text [private]
 

Definition at line 232 of file CPEditorPanel.h.

Referenced by Create(), EnablePointEdit(), OnTextPointChange(), SelectLocalPoint(), UpdateDisplay(), and ~CPEditorPanel().

std::set<unsigned int> CPEditorPanel::mirroredPoints [private]
 

Definition at line 262 of file CPEditorPanel.h.

Referenced by FineTuneSelectedPoint(), OnTextPointChange(), and UpdateDisplay().


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 01:25:45 2014 for Hugintrunk by  doxygen 1.3.9.1