Hugintrunk
0.1
|
brief description. More...
#include <CPImageCtrl.h>
Public Types | |
enum | EditorState { NO_IMAGE =0, NO_SELECTION, KNOWN_POINT_SELECTED, NEW_POINT_SELECTED, NEW_LINE_CREATING, SELECT_DELETE_REGION } |
state machine for selection process: More... | |
enum | ImageRotation { ROT0 =0, ROT90, ROT180, ROT270 } |
image rotation. More... | |
Public Member Functions | |
CPImageCtrl () | |
ctor. More... | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel") |
void | Init (CPEditorPanel *parent) |
~CPImageCtrl () | |
dtor. More... | |
void | setImage (const std::string &filename, ImageRotation rot) |
display img. More... | |
void | setSameImage (bool sameImage) |
void | setTransforms (HuginBase::PTools::Transform *firstTrans, HuginBase::PTools::Transform *firstInvTrans, HuginBase::PTools::Transform *secondInvTrans) |
void | setMagTransforms (HuginBase::PTools::Transform *magTrans, HuginBase::PTools::Transform *magInvTrans) |
HuginBase::PTools::Transform * | getFirstTrans () const |
HuginBase::PTools::Transform * | getFirstInvTrans () const |
HuginBase::PTools::Transform * | getSecondInvTrans () const |
void | setCtrlPoint (const HuginBase::ControlPoint &cp, const bool mirrored) |
add control piont to internal cp list More... | |
void | clearCtrlPointList () |
clear internal control point list More... | |
void | clearNewPoint () |
clear new point More... | |
void | setNewPoint (const hugin_utils::FDiff2D &p) |
set new point to a specific point More... | |
void | selectPoint (unsigned int, bool scrollTo=true) |
select a point for usage More... | |
void | deselect () |
remove selection. More... | |
void | mousePressLMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseLMBEvent (wxMouseEvent &mouse) |
void | mousePressRMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseRMBEvent (wxMouseEvent &mouse) |
void | mouseMoveEvent (wxMouseEvent &mouse) |
void | mousePressMMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseMMBEvent (wxMouseEvent &mouse) |
wxSize | DoGetBestSize () const |
void | setScale (double factor) |
set the scaling factor for cp display. More... | |
double | getScale () |
return scale factor, 0 for autoscale More... | |
void | showPosition (hugin_utils::FDiff2D point, bool warpPointer=false) |
Show point x , y . More... | |
void | showSearchArea (bool show=true) |
show/hide the search area rectangle More... | |
void | showTemplateArea (bool show=true) |
hugin_utils::FDiff2D | getNewPoint () |
get the new point More... | |
void | ScrollDelta (const wxPoint &delta) |
scroll the window by delta pixels More... | |
wxPoint | MaxScrollDelta (wxPoint delta) |
calculate maximum delta that is allowed when scrolling More... | |
int | scale (int x) const |
double | scale (double x) const |
hugin_utils::FDiff2D | scale (const hugin_utils::FDiff2D &p) const |
wxPoint | scale (const wxPoint &p) const |
int | invScale (int x) const |
double | invScale (double x) const |
hugin_utils::FDiff2D | invScale (const hugin_utils::FDiff2D &p) const |
wxPoint | invScale (const wxPoint &p) const |
wxPoint | roundP (const hugin_utils::FDiff2D &p) const |
template<class T > | |
T | applyRot (const T &p) const |
template<class T > | |
T | applyRotInv (const T &p) const |
const bool | GetMouseInWindow () const |
const bool | GetForceMagnifier () const |
HuginBase::ImageCache::ImageCacheRGB8Ptr | GetImg () |
get pointer to image, for DisplayedControlPoint More... | |
wxBitmap & | GetMagBitmap (hugin_utils::FDiff2D point) |
draw the magnified view of a selected control point More... | |
const wxSize | GetRealImageSize () const |
return the real size of the image in the control More... | |
const wxSize | GetBitmapSize () const |
return the size of the drawn bitmap (possible rotate is applied) More... | |
void | ShowLines (bool isShown) |
bool | IsShowingLines () const |
Protected Member Functions | |
void | OnImageLoaded (ImageCache::EntryPtr entry, std::string filename, bool load_small) |
void | OnSize (wxSizeEvent &e) |
void | OnKey (wxKeyEvent &e) |
void | OnKeyDown (wxKeyEvent &e) |
void | OnMouseLeave (wxMouseEvent &e) |
void | OnMouseEnter (wxMouseEvent &e) |
void | OnTimer (wxTimerEvent &e) |
void | OnScrollWin (wxScrollWinEvent &e) |
void | OnPaint (wxPaintEvent &e) |
paint event More... | |
bool | emit (CPEvent &ev) |
helper func to emit a region More... | |
double | getScaleFactor () const |
get scale factor (calculates factor when fit to window is active) More... | |
double | calcAutoScaleFactor (wxSize size) |
calculate new scale factor for this image More... | |
void | rescaleImage () |
Private Member Functions | |
void | DrawSelectionRectangle (hugin_utils::FDiff2D pos1, hugin_utils::FDiff2D pos2) |
EditorState | isOccupied (wxPoint mousePos, const hugin_utils::FDiff2D &point, unsigned int &pointNr) const |
check if p is over a known point, if it is, pointNr contains the point More... | |
state machine for selection process:
The select region is temporarily disabled.. maybe I find use for it later on..
format of this list:
states:
Enumerator | |
---|---|
NO_IMAGE | |
NO_SELECTION | |
KNOWN_POINT_SELECTED | |
NEW_POINT_SELECTED | |
NEW_LINE_CREATING | |
SELECT_DELETE_REGION |
Definition at line 220 of file CPImageCtrl.h.
image rotation.
Useful to display images depending on their roll setting. rotation is clockwise
Enumerator | |
---|---|
ROT0 | |
ROT90 | |
ROT180 | |
ROT270 |
Definition at line 241 of file CPImageCtrl.h.
|
inline |
ctor.
Definition at line 224 of file CPImageCtrl.h.
CPImageCtrl::~CPImageCtrl | ( | ) |
|
inline |
Definition at line 368 of file CPImageCtrl.h.
References m_imgRotation, m_realSize, ROT0, ROT180, ROT270, and ROT90.
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), OnPaint(), and showPosition().
|
inline |
Definition at line 392 of file CPImageCtrl.h.
References m_imgRotation, m_realSize, ROT0, ROT180, ROT270, and ROT90.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), and mouseReleaseRMBEvent().
|
protected |
calculate new scale factor for this image
Definition at line 1518 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, vigra_ext::EMoR::h, m_imgRotation, ROT270, and ROT90.
Referenced by rescaleImage(), and setScale().
void CPImageCtrl::clearCtrlPointList | ( | ) |
clear internal control point list
Definition at line 1060 of file CPImageCtrl.cpp.
References editState, KNOWN_POINT_SELECTED, m_points, NO_SELECTION, and selectedPointNr.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::clearNewPoint | ( | ) |
clear new point
Definition at line 1070 of file CPImageCtrl.cpp.
References DEBUG_TRACE, editState, NO_IMAGE, and NO_SELECTION.
Referenced by CPEditorPanel::changeState(), and CPEditorPanel::NewPointChange().
bool CPImageCtrl::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL , |
||
const wxString & | name = "panel" |
||
) |
Definition at line 648 of file CPImageCtrl.cpp.
References editState, fitToWindow, huginApp::Get(), huginApp::GetXRCPath(), m_CPSelectCursor, m_editPanel, m_forceMagnifier, m_imgRotation, m_magImgCenter, m_mouseInWindow, m_sameImage, m_searchRectWidth, m_showSearchArea, m_showTemplateArea, m_templateRectWidth, m_timer, mouseMoveEvent(), mousePressLMBEvent(), mousePressMMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseMMBEvent(), mouseReleaseRMBEvent(), NO_IMAGE, OnKey(), OnKeyDown(), OnMouseEnter(), OnMouseLeave(), OnPaint(), OnSize(), OnTimer(), pointColors, ROT0, scaleFactor, selectedPointNr, and textColours.
void CPImageCtrl::deselect | ( | ) |
remove selection.
Definition at line 1096 of file CPImageCtrl.cpp.
References DEBUG_TRACE, editState, KNOWN_POINT_SELECTED, and NO_SELECTION.
Referenced by CPEditorPanel::ClearSelection(), and CPEditorPanel::OnCPListDeselect().
wxSize CPImageCtrl::DoGetBestSize | ( | ) | const |
Definition at line 915 of file CPImageCtrl.cpp.
References imageSize.
|
private |
Definition at line 1154 of file CPImageCtrl.cpp.
References applyRot(), m_overlay, roundP(), and scale().
Referenced by mouseMoveEvent().
|
protected |
helper func to emit a region
Definition at line 1491 of file CPImageCtrl.cpp.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), and OnKey().
const wxSize CPImageCtrl::GetBitmapSize | ( | ) | const |
return the size of the drawn bitmap (possible rotate is applied)
Definition at line 1792 of file CPImageCtrl.cpp.
References bitmap.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 250 of file CPImageCtrl.h.
References m_firstInvTrans.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 249 of file CPImageCtrl.h.
References m_firstTrans.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 412 of file CPImageCtrl.h.
References m_forceMagnifier.
Referenced by DisplayedControlPoint::Draw().
HuginBase::ImageCache::ImageCacheRGB8Ptr CPImageCtrl::GetImg | ( | ) |
get pointer to image, for DisplayedControlPoint
Definition at line 1797 of file CPImageCtrl.cpp.
References m_img.
Referenced by DisplayedControlPoint::Draw().
wxBitmap & CPImageCtrl::GetMagBitmap | ( | hugin_utils::FDiff2D | point | ) |
draw the magnified view of a selected control point
Definition at line 826 of file CPImageCtrl.cpp.
References DEBUG_TRACE, vigra_ext::destImage(), vigra_ext::destImageRange(), m_img, m_imgRotation, m_magImg, m_magImgCenter, m_magInvTrans, m_magTrans, ROT180, ROT270, ROT90, hugin_utils::roundi(), vigra_ext::srcImageRange(), vigra_ext::transformImage(), vigra_ext::transformImageIntern(), HuginBase::PTools::Transform::transformImgCoord(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by DisplayedControlPoint::DrawTextMag().
|
inline |
Definition at line 411 of file CPImageCtrl.h.
References m_mouseInWindow.
Referenced by DisplayedControlPoint::Draw().
hugin_utils::FDiff2D CPImageCtrl::getNewPoint | ( | ) |
get the new point
Definition at line 1694 of file CPImageCtrl.cpp.
References newPoint.
Referenced by CPEditorPanel::CreateNewPoint(), CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::FineTuneNewPoint(), and CPEditorPanel::NewPointChange().
|
inline |
return the real size of the image in the control
Definition at line 418 of file CPImageCtrl.h.
References m_realSize.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
return scale factor, 0 for autoscale
Definition at line 289 of file CPImageCtrl.h.
References fitToWindow, and scaleFactor.
Referenced by DisplayedControlPoint::DrawTextMag(), CPEditorPanel::NewPointChange(), and CPEditorPanel::OnZoom().
|
protected |
get scale factor (calculates factor when fit to window is active)
Definition at line 1538 of file CPImageCtrl.cpp.
References scaleFactor.
Referenced by invScale(), OnPaint(), rescaleImage(), and scale().
|
inline |
Definition at line 251 of file CPImageCtrl.h.
References m_secondInvTrans.
Referenced by DisplayedControlPoint::DrawLineSegment().
void CPImageCtrl::Init | ( | CPEditorPanel * | parent | ) |
Definition at line 729 of file CPImageCtrl.cpp.
References m_editPanel, m_magImgCenter, and m_sameImage.
Referenced by CPEditorPanel::Create().
|
inline |
Definition at line 338 of file CPImageCtrl.h.
References getScaleFactor().
Referenced by DisplayedControlPoint::CheckSelection(), invScale(), DisplayedControlPoint::isOccupiedPos(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), and mouseReleaseRMBEvent().
|
inline |
Definition at line 341 of file CPImageCtrl.h.
References getScaleFactor().
|
inline |
Definition at line 344 of file CPImageCtrl.h.
References invScale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
inline |
Definition at line 352 of file CPImageCtrl.h.
References invScale().
|
private |
check if p is over a known point, if it is, pointNr contains the point
Definition at line 1127 of file CPImageCtrl.cpp.
References KNOWN_POINT_SELECTED, m_points, and NEW_POINT_SELECTED.
Referenced by mouseMoveEvent(), and mousePressLMBEvent().
bool CPImageCtrl::IsShowingLines | ( | ) | const |
Definition at line 1807 of file CPImageCtrl.cpp.
References m_showLines.
Referenced by DisplayedControlPoint::Draw(), and DisplayedControlPoint::IsDrawingLine().
wxPoint CPImageCtrl::MaxScrollDelta | ( | wxPoint | delta | ) |
calculate maximum delta that is allowed when scrolling
Definition at line 1737 of file CPImageCtrl.cpp.
References bitmap.
Referenced by CPEditorPanel::OnCPEvent().
void CPImageCtrl::mouseMoveEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1173 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, DrawSelectionRectangle(), editState, emit(), invScale(), isOccupied(), KNOWN_POINT_SELECTED, m_CPSelectCursor, m_img, m_mousePos, m_mouseScrollPos, m_points, m_realSize, m_selectedPoint, m_showSearchArea, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, rectStartPos, ScrollDelta(), CPEvent::SCROLLED, SELECT_DELETE_REGION, selectedPointNr, and DisplayedControlPoint::UpdateControlPoint().
Referenced by Create().
void CPImageCtrl::mousePressLMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1283 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, DEBUG_ERROR, editState, emit(), invScale(), isOccupied(), KNOWN_POINT_SELECTED, m_forceMagnifier, m_img, m_mousePos, m_points, m_realSize, m_sameImage, m_selectedPoint, m_timer, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, SELECT_DELETE_REGION, selectedPointNr, DisplayedControlPoint::SetControl(), and DisplayedControlPoint::StartLineControlPoint().
Referenced by Create().
void CPImageCtrl::mousePressMMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1427 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, m_img, and m_mouseScrollPos.
Referenced by Create().
void CPImageCtrl::mousePressRMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1435 of file CPImageCtrl.cpp.
References applyRotInv(), editState, invScale(), KNOWN_POINT_SELECTED, m_img, m_realSize, NEW_POINT_SELECTED, NO_SELECTION, rectStartPos, and SELECT_DELETE_REGION.
Referenced by Create().
void CPImageCtrl::mouseReleaseLMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1355 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, editState, emit(), DisplayedControlPoint::GetControlPoint(), DisplayedControlPoint::GetPos(), invScale(), KNOWN_POINT_SELECTED, m_img, m_points, m_realSize, m_selectedPoint, m_timer, CPEvent::NEW_LINE_ADDED, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, CPEvent::POINT_CHANGED, SELECT_DELETE_REGION, selectedPointNr, and showPosition().
Referenced by Create().
void CPImageCtrl::mouseReleaseMMBEvent | ( | wxMouseEvent & | mouse | ) |
void CPImageCtrl::mouseReleaseRMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1456 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, editState, emit(), invScale(), m_img, m_overlay, m_realSize, NO_SELECTION, rectStartPos, CPEvent::RIGHT_CLICK, and SELECT_DELETE_REGION.
Referenced by Create().
|
protected |
Definition at line 969 of file CPImageCtrl.cpp.
References imageFilename, m_img, and rescaleImage().
Referenced by setImage().
|
protected |
Definition at line 1554 of file CPImageCtrl.cpp.
References CPEvent::CANCELED, DEBUG_DEBUG, DEBUG_TRACE, editState, emit(), DisplayedControlPoint::GetControlPoint(), KNOWN_POINT_SELECTED, m_editPanel, m_forceMagnifier, m_img, m_imgRotation, m_points, m_timer, NEW_POINT_SELECTED, newPoint, CPEvent::POINT_CHANGED, CPEvent::RIGHT_CLICK, ROT180, ROT270, ROT90, ScrollDelta(), CPEvent::SCROLLED, selectedPointNr, shift, DisplayedControlPoint::ShiftControlPoint(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by Create().
|
protected |
Definition at line 1664 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, DEBUG_TRACE, m_img, and m_mouseScrollPos.
Referenced by Create().
|
protected |
Definition at line 1683 of file CPImageCtrl.cpp.
References DEBUG_TRACE, huginApp::Get(), and m_mouseInWindow.
Referenced by Create().
|
protected |
Definition at line 1675 of file CPImageCtrl.cpp.
References DEBUG_TRACE, m_mouseInWindow, and m_mousePos.
Referenced by Create().
|
protected |
paint event
Definition at line 744 of file CPImageCtrl.cpp.
References applyRot(), bitmap, DEBUG_DEBUG, DisplayedControlPoint::Draw(), editState, getScaleFactor(), KNOWN_POINT_SELECTED, m_img, m_mousePos, m_points, m_searchRectWidth, m_selectedPoint, m_showSearchArea, m_showTemplateArea, m_templateRectWidth, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, hugin_utils::roundi(), roundP(), scale(), SELECT_DELETE_REGION, selectedPointNr, DisplayedControlPoint::SetLabel(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by Create().
|
protected |
Definition at line 1348 of file CPImageCtrl.cpp.
|
protected |
Definition at line 1543 of file CPImageCtrl.cpp.
References DEBUG_TRACE, fitToWindow, imageFilename, and setScale().
Referenced by Create().
|
protected |
Definition at line 1341 of file CPImageCtrl.cpp.
References m_forceMagnifier, and m_img.
Referenced by Create().
|
protected |
Definition at line 979 of file CPImageCtrl.cpp.
References bitmap, calcAutoScaleFactor(), HuginBase::Color::CorrectImage(), DEBUG_DEBUG, editState, fitToWindow, huginApp::Get(), huginApp::GetMonitorProfile(), getScaleFactor(), huginApp::HasMonitorProfile(), imageCacheEntry2wxImage(), imageSize, m_img, m_imgRotation, m_realSize, celeste::max(), NO_IMAGE, ROT0, ROT180, ROT270, ROT90, scale(), and scaleFactor.
Referenced by OnImageLoaded(), setImage(), and setScale().
|
inline |
Definition at line 360 of file CPImageCtrl.h.
References hugin_utils::roundi(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), and OnPaint().
|
inline |
Definition at line 316 of file CPImageCtrl.h.
References getScaleFactor().
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), OnPaint(), rescaleImage(), scale(), and showPosition().
|
inline |
Definition at line 319 of file CPImageCtrl.h.
References getScaleFactor().
|
inline |
Definition at line 322 of file CPImageCtrl.h.
References scale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
inline |
Definition at line 330 of file CPImageCtrl.h.
References scale().
void CPImageCtrl::ScrollDelta | ( | const wxPoint & | delta | ) |
scroll the window by delta
pixels
Definition at line 1771 of file CPImageCtrl.cpp.
Referenced by mouseMoveEvent(), CPEditorPanel::OnCPEvent(), and OnKey().
void CPImageCtrl::selectPoint | ( | unsigned int | nr, |
bool | scrollTo = true |
||
) |
select a point for usage
Definition at line 1079 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, DEBUG_TRACE, editState, KNOWN_POINT_SELECTED, m_points, selectedPointNr, and showPosition().
Referenced by CPEditorPanel::SelectLocalPoint(), and CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setCtrlPoint | ( | const HuginBase::ControlPoint & | cp, |
const bool | mirrored | ||
) |
add control piont to internal cp list
Definition at line 1052 of file CPImageCtrl.cpp.
References m_points, pointColors, DisplayedControlPoint::SetColour(), DisplayedControlPoint::SetLabel(), and textColours.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setImage | ( | const std::string & | filename, |
ImageRotation | rot | ||
) |
display img.
every CPImageCtrl has a wxBitmap with its current image
Definition at line 921 of file CPImageCtrl.cpp.
References bitmap, DEBUG_TRACE, editState, hugin_utils::FileExists(), HUGIN_CONV_FILENAME, imageFilename, m_img, m_imgRequest, m_imgRotation, m_magImgCenter, m_sameImage, NO_IMAGE, NO_SELECTION, OnImageLoaded(), and rescaleImage().
Referenced by CPEditorPanel::panoramaImagesChanged(), CPEditorPanel::setLeftImage(), and CPEditorPanel::setRightImage().
void CPImageCtrl::setMagTransforms | ( | HuginBase::PTools::Transform * | magTrans, |
HuginBase::PTools::Transform * | magInvTrans | ||
) |
Definition at line 958 of file CPImageCtrl.cpp.
References m_magInvTrans, and m_magTrans.
Referenced by CPEditorPanel::Create().
void CPImageCtrl::setNewPoint | ( | const hugin_utils::FDiff2D & | p | ) |
set new point to a specific point
Definition at line 1701 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, editState, NEW_POINT_SELECTED, newPoint, showPosition(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::FineTuneNewPoint(), and CPEditorPanel::NewPointChange().
void CPImageCtrl::setSameImage | ( | bool | sameImage | ) |
Definition at line 964 of file CPImageCtrl.cpp.
References m_sameImage.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setScale | ( | double | factor | ) |
set the scaling factor for cp display.
factor | zoom factor, 0 means fit to window. |
Definition at line 1501 of file CPImageCtrl.cpp.
References calcAutoScaleFactor(), DEBUG_DEBUG, fitToWindow, imageSize, rescaleImage(), and scaleFactor.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::NewPointChange(), OnSize(), and CPEditorPanel::OnZoom().
void CPImageCtrl::setTransforms | ( | HuginBase::PTools::Transform * | firstTrans, |
HuginBase::PTools::Transform * | firstInvTrans, | ||
HuginBase::PTools::Transform * | secondInvTrans | ||
) |
Definition at line 951 of file CPImageCtrl.cpp.
References m_firstInvTrans, m_firstTrans, and m_secondInvTrans.
Referenced by CPEditorPanel::Create().
void CPImageCtrl::ShowLines | ( | bool | isShown | ) |
Definition at line 1802 of file CPImageCtrl.cpp.
References m_showLines.
Referenced by CPEditorPanel::Create(), and CPEditorPanel::OnShowLinesCheckbox().
void CPImageCtrl::showPosition | ( | hugin_utils::FDiff2D | point, |
bool | warpPointer = false |
||
) |
Show point x
, y
.
Scrolls the windows so that x,y is shown in the center if warpPointer
is true, the mouse pointer is moved to that position as well
Definition at line 1106 of file CPImageCtrl.cpp.
References applyRot(), DEBUG_DEBUG, hugin_utils::roundi(), scale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), mouseReleaseLMBEvent(), CPEditorPanel::NewPointChange(), selectPoint(), and setNewPoint().
void CPImageCtrl::showSearchArea | ( | bool | show = true | ) |
show/hide the search area rectangle
Definition at line 1716 of file CPImageCtrl.cpp.
References bitmap, DEBUG_DEBUG, HUGIN_FT_SEARCH_AREA_PERCENT, m_mousePos, m_realSize, m_searchRectWidth, and m_showSearchArea.
Referenced by CPEditorPanel::changeState().
void CPImageCtrl::showTemplateArea | ( | bool | show = true | ) |
Definition at line 1728 of file CPImageCtrl.cpp.
References HUGIN_FT_TEMPLATE_SIZE, m_showTemplateArea, and m_templateRectWidth.
Referenced by CPEditorPanel::changeState().
|
private |
Definition at line 451 of file CPImageCtrl.h.
Referenced by GetBitmapSize(), MaxScrollDelta(), OnPaint(), rescaleImage(), setImage(), and showSearchArea().
|
private |
Definition at line 485 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), clearNewPoint(), Create(), deselect(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), OnKey(), OnPaint(), rescaleImage(), selectPoint(), setImage(), and setNewPoint().
|
private |
Definition at line 498 of file CPImageCtrl.h.
Referenced by Create(), getScale(), OnSize(), rescaleImage(), and setScale().
|
private |
Definition at line 452 of file CPImageCtrl.h.
Referenced by OnImageLoaded(), OnSize(), and setImage().
|
private |
Definition at line 454 of file CPImageCtrl.h.
Referenced by DoGetBestSize(), rescaleImage(), and setScale().
|
private |
Definition at line 467 of file CPImageCtrl.h.
Referenced by Create(), mouseMoveEvent(), and ~CPImageCtrl().
|
private |
Definition at line 513 of file CPImageCtrl.h.
|
private |
Definition at line 488 of file CPImageCtrl.h.
Referenced by getFirstInvTrans(), and setTransforms().
|
private |
Definition at line 487 of file CPImageCtrl.h.
Referenced by getFirstTrans(), and setTransforms().
|
private |
Definition at line 521 of file CPImageCtrl.h.
Referenced by Create(), GetForceMagnifier(), mousePressLMBEvent(), OnKey(), and OnTimer().
|
private |
Definition at line 517 of file CPImageCtrl.h.
Referenced by GetImg(), GetMagBitmap(), mouseMoveEvent(), mousePressLMBEvent(), mousePressMMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), OnImageLoaded(), OnKey(), OnKeyDown(), OnPaint(), OnTimer(), rescaleImage(), and setImage().
|
private |
Definition at line 518 of file CPImageCtrl.h.
Referenced by setImage().
|
private |
Definition at line 515 of file CPImageCtrl.h.
Referenced by applyRot(), applyRotInv(), calcAutoScaleFactor(), Create(), GetMagBitmap(), OnKey(), rescaleImage(), and setImage().
|
private |
Definition at line 460 of file CPImageCtrl.h.
Referenced by GetMagBitmap().
|
private |
Definition at line 461 of file CPImageCtrl.h.
Referenced by Create(), GetMagBitmap(), Init(), and setImage().
|
private |
Definition at line 492 of file CPImageCtrl.h.
Referenced by GetMagBitmap(), and setMagTransforms().
|
private |
Definition at line 491 of file CPImageCtrl.h.
Referenced by GetMagBitmap(), and setMagTransforms().
|
private |
Definition at line 520 of file CPImageCtrl.h.
Referenced by Create(), GetMouseInWindow(), OnMouseEnter(), and OnMouseLeave().
|
private |
Definition at line 503 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), OnMouseLeave(), OnPaint(), and showSearchArea().
|
private |
Definition at line 504 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressMMBEvent(), and OnKeyDown().
|
private |
Definition at line 458 of file CPImageCtrl.h.
Referenced by DrawSelectionRectangle(), and mouseReleaseRMBEvent().
|
private |
Definition at line 465 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), isOccupied(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnKey(), OnPaint(), selectPoint(), and setCtrlPoint().
|
private |
Definition at line 456 of file CPImageCtrl.h.
Referenced by applyRot(), applyRotInv(), GetRealImageSize(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), rescaleImage(), and showSearchArea().
|
private |
true, if in control point tab the same image is selected 2 times in this case a special treatment for creating line control points is activated
Definition at line 478 of file CPImageCtrl.h.
Referenced by Create(), Init(), mousePressLMBEvent(), setImage(), and setSameImage().
|
private |
Definition at line 468 of file CPImageCtrl.h.
|
private |
Definition at line 501 of file CPImageCtrl.h.
Referenced by Create(), OnPaint(), and showSearchArea().
|
private |
Definition at line 489 of file CPImageCtrl.h.
Referenced by getSecondInvTrans(), and setTransforms().
|
private |
Definition at line 473 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), and OnPaint().
|
private |
Definition at line 463 of file CPImageCtrl.h.
Referenced by IsShowingLines(), and ShowLines().
|
private |
Definition at line 500 of file CPImageCtrl.h.
Referenced by Create(), mouseMoveEvent(), OnPaint(), and showSearchArea().
|
private |
Definition at line 506 of file CPImageCtrl.h.
Referenced by Create(), OnPaint(), and showTemplateArea().
|
private |
Definition at line 507 of file CPImageCtrl.h.
Referenced by Create(), OnPaint(), and showTemplateArea().
|
private |
Definition at line 522 of file CPImageCtrl.h.
Referenced by Create(), mousePressLMBEvent(), mouseReleaseLMBEvent(), and OnKey().
|
private |
Definition at line 474 of file CPImageCtrl.h.
Referenced by getNewPoint(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnKey(), OnPaint(), and setNewPoint().
|
private |
Definition at line 495 of file CPImageCtrl.h.
Referenced by Create(), and setCtrlPoint().
|
private |
Definition at line 481 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressRMBEvent(), and mouseReleaseRMBEvent().
|
private |
Definition at line 497 of file CPImageCtrl.h.
Referenced by Create(), getScale(), getScaleFactor(), rescaleImage(), and setScale().
|
private |
Definition at line 471 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), Create(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnKey(), OnPaint(), and selectPoint().
|
private |
Definition at line 496 of file CPImageCtrl.h.
Referenced by Create(), and setCtrlPoint().