|
Hugin trunk 0.1
|
Tool to delete all cp in a selected rectangle. More...
#include <PreviewEditCPTool.h>

Public Member Functions | |
| PreviewEditCPTool (PreviewToolHelper *helper) | |
| void | Activate () override |
| activate the tool | |
| void | Deactivate () override |
| deactivate the tool, reset the cursor | |
| void | ReallyAfterDrawImagesEvent () override |
| draw selection rectangle | |
| void | MouseMoveEvent (double x, double y, wxMouseEvent &e) override |
| mouse move handling | |
| void | MouseButtonEvent (wxMouseEvent &e) override |
| mouse button handling | |
| HuginBase::UIntSet | GetFoundCPs () |
| return set of found control points | |
| vigra::Rect2D | GetSelectedROI () |
| returns selected ROI | |
| void | SetMenuProcessed () |
| reset popup menu status | |
Public Member Functions inherited from PreviewTool | |
| PreviewTool (PreviewToolHelper *helper) | |
| virtual | ~PreviewTool () |
Public Member Functions inherited from Tool | |
| Tool (ToolHelper *helper) | |
| Construct keeping a pointer to a PreviewToolHelper. | |
| virtual | ~Tool () |
| virtual void | MouseWheelEvent (wxMouseEvent &e) |
| Notify of a mouse wheel event on the panorama preview. | |
| virtual void | ImagesUnderMouseChangedEvent () |
| Notify when the images directly underneath the mouse pointer have changed. | |
| virtual void | KeypressEvent (int keycode, int modifiers, bool pressed) |
| Notify of a Keypress event. | |
| virtual void | BeforeDrawImagesEvent () |
| Draw using OpenGL anything the tool requires underneath the images. | |
| virtual void | AfterDrawImagesEvent () |
| Draw (using OpenGL) images above the others. | |
| virtual bool | BeforeDrawImageEvent (unsigned int image) |
| Draw what the tool requires just before a given image is drawn. | |
| virtual void | AfterDrawImageEvent (unsigned int image) |
| Notification called just after the image was drawn normally. | |
| virtual void | MarkDirty () |
Private Member Functions | |
| void | AddLineCP (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2) |
| called to add line control point | |
| void | FindCPInRect (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2) |
| search for control points in selected rectangle | |
Private Attributes | |
| bool | m_mouseDown |
| mouse down status | |
| bool | m_menuPopup |
| true, when popup menu is shown, this is to ignore a mouse event when the popup menu is closed | |
| hugin_utils::FDiff2D | m_startPos |
| position where the marking starts | |
| hugin_utils::FDiff2D | m_startPosScreen |
| position where the marking starts in screen coordinates | |
| hugin_utils::FDiff2D | m_currentPos |
| current position of selection | |
| hugin_utils::FDiff2D | m_currentPosScreen |
| current position of selection in screen coordinates | |
| HuginBase::UIntSet | m_CPinROI |
| contains the found cp | |
| bool | m_line |
| if selecting a rectangle or a line | |
Additional Inherited Members | |
Protected Attributes inherited from Tool | |
| ToolHelper * | helper |
| The PreviewToolHelper that uses the same preview window and panorama as the tool should. | |
Tool to delete all cp in a selected rectangle.
Definition at line 43 of file PreviewEditCPTool.h.
|
inlineexplicit |
Definition at line 46 of file PreviewEditCPTool.h.
|
overridevirtual |
activate the tool
Implements Tool.
Definition at line 49 of file PreviewEditCPTool.cpp.
References GLPreviewFrame::getPreview(), ToolHelper::GetPreviewFrame(), Tool::helper, m_mouseDown, ToolHelper::MOUSE_MOVE, ToolHelper::MOUSE_PRESS, ToolHelper::NotifyMe(), ToolHelper::REALLY_DRAW_OVER_IMAGES, ToolHelper::SetStatusMessage(), and threshold().
|
private |
called to add line control point
Definition at line 262 of file PreviewEditCPTool.cpp.
References PanoCommand::CommandHistory::addCommand(), HuginBase::PTools::Transform::createTransform(), VisualizationState::ForceRequireRedraw(), HuginBase::Panorama::getImage(), ToolHelper::GetImagesUnderPos(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, HuginBase::ControlPoint::image1Nr, VisualizationState::Redraw(), threshold(), HuginBase::PTools::Transform::transformImgCoord(), HuginBase::ControlPoint::X, and HuginBase::ControlPoint::Y.
Referenced by MouseButtonEvent().
|
overridevirtual |
deactivate the tool, reset the cursor
Reimplemented from Tool.
Definition at line 60 of file PreviewEditCPTool.cpp.
References GLPreviewFrame::getPreview(), ToolHelper::GetPreviewFrame(), Tool::helper, and threshold().
|
private |
search for control points in selected rectangle
Definition at line 197 of file PreviewEditCPTool.cpp.
References HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getCtrlPoints(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), Tool::helper, m_CPinROI, set_contains(), and threshold().
Referenced by MouseButtonEvent().
|
inline |
return set of found control points
Definition at line 58 of file PreviewEditCPTool.h.
References m_CPinROI.
Referenced by GLPreviewFrame::OnRemoveCP().
| vigra::Rect2D PreviewEditCPTool::GetSelectedROI | ( | ) |
returns selected ROI
Definition at line 243 of file PreviewEditCPTool.cpp.
References HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), HuginBase::PanoramaOptions::getSize(), Tool::helper, m_currentPos, m_startPos, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by MouseButtonEvent(), and GLPreviewFrame::OnCreateCP().
|
overridevirtual |
mouse button handling
Reimplemented from Tool.
Definition at line 121 of file PreviewEditCPTool.cpp.
References AddLineCP(), FindCPInRect(), VisualizationState::ForceRequireRedraw(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetMouseScreenPosition(), ToolHelper::GetPreviewFrame(), GetSelectedROI(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, ID_CREATE_CP, ID_REMOVE_CP, m_CPinROI, m_currentPos, m_currentPosScreen, m_line, m_menuPopup, m_mouseDown, m_startPos, m_startPosScreen, VisualizationState::Redraw(), and threshold().
|
overridevirtual |
mouse move handling
Reimplemented from Tool.
Definition at line 108 of file PreviewEditCPTool.cpp.
References VisualizationState::ForceRequireRedraw(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetMouseScreenPosition(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, m_currentPos, m_currentPosScreen, m_mouseDown, and VisualizationState::Redraw().
|
overridevirtual |
draw selection rectangle
Reimplemented from Tool.
Definition at line 67 of file PreviewEditCPTool.cpp.
References m_currentPos, m_currentPosScreen, m_line, m_mouseDown, m_startPos, m_startPosScreen, threshold(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
| void PreviewEditCPTool::SetMenuProcessed | ( | ) |
reset popup menu status
Definition at line 257 of file PreviewEditCPTool.cpp.
References m_menuPopup.
Referenced by GLPreviewFrame::OnCreateCP(), and GLPreviewFrame::OnRemoveCP().
|
private |
contains the found cp
Definition at line 81 of file PreviewEditCPTool.h.
Referenced by FindCPInRect(), GetFoundCPs(), and MouseButtonEvent().
|
private |
current position of selection
Definition at line 77 of file PreviewEditCPTool.h.
Referenced by GetSelectedROI(), MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().
|
private |
current position of selection in screen coordinates
Definition at line 79 of file PreviewEditCPTool.h.
Referenced by MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().
|
private |
if selecting a rectangle or a line
Definition at line 83 of file PreviewEditCPTool.h.
Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().
|
private |
true, when popup menu is shown, this is to ignore a mouse event when the popup menu is closed
Definition at line 71 of file PreviewEditCPTool.h.
Referenced by MouseButtonEvent(), and SetMenuProcessed().
|
private |
mouse down status
Definition at line 69 of file PreviewEditCPTool.h.
Referenced by Activate(), MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().
|
private |
position where the marking starts
Definition at line 73 of file PreviewEditCPTool.h.
Referenced by GetSelectedROI(), MouseButtonEvent(), and ReallyAfterDrawImagesEvent().
|
private |
position where the marking starts in screen coordinates
Definition at line 75 of file PreviewEditCPTool.h.
Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().