Hugin trunk 0.1
Loading...
Searching...
No Matches
PreviewLayoutLinesTool.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
22#ifndef PREVIEW_LAYOUT_LINES_TOOL_H
23#define PREVIEW_LAYOUT_LINES_TOOL_H
24
25#include "Tool.h"
26#include <vector>
28#include "GreatCircles.h"
29
30class GLPreviewFrame;
31
48{
49public:
52
59
61 void Activate();
62
65 virtual void MouseMoveEvent(double x, double y, wxMouseEvent & e);
66
71
76
77 bool BeforeDrawImageEvent(unsigned int image);
78
83private:
84
85 //user has clicked and is holding left button while near a line
87
92
94 std::vector<hugin_utils::FDiff2D> m_imageCentres;
95
97 std::vector<hugin_utils::FDiff2D> m_imageCentresSpherical;
98
100 std::vector<HuginBase::PTools::Transform *> m_transforms;
101
102
106 {
107 public:
109 unsigned int image1, image2;
110 LineDetails();
121 bool dud;
122
124
140 void draw(bool highlight);
141
146 };
147
149 std::vector<LineDetails> m_lines;
150
152 unsigned int m_nearestLine;
153
156
159
161 void updateImageCentres();
162
164 void drawIdentificationBorder(unsigned int image);
165};
166
167#endif
168
Declare GreatCircles class.
The OpenGL preview frame.
this handler class will receive change events from the Panorama.
Model for a panorama.
Definition Panorama.h:153
A class to store information about each line that will be drawn.
double totalError
the total of all the control point errors between these images
double worstError
the error of the control point with the greatest error between these images
float getDistance(hugin_utils::FDiff2D point)
Get the square of the distance from the arc to some panorama coordinate.
bool dud
false if the line should be used, true if it shouldn't.
unsigned int image1
index of images for this line
void draw(bool highlight)
Draw a line in the preview for this pair of images.
unsigned int numberOfControlPoints
the number of control points between these images
The PreviewLayoutLinesTool handles the lines connecting images in the layout view of the fast preview...
unsigned int m_nearestLine
The index of nearest line to the mouse position.
void AfterDrawImagesEvent()
Draw a border over the images when a line is hilighted, similar to the identify tool.
void panoramaImagesChanged(HuginBase::Panorama &, const HuginBase::UIntSet &)
notifies about changes to images
void updateImageCentres()
Update the locations of the image centres.
void BeforeDrawImagesEvent()
Draw all the lines between images that indicate the quality and quantity of control points.
std::vector< HuginBase::PTools::Transform * > m_transforms
The transformations used to make the image centres.
std::vector< hugin_utils::FDiff2D > m_imageCentresSpherical
The spherical coordinates of the middle of the images.
void Activate()
Start using the PreviewLayoutLinesTool.
void MouseButtonEvent(wxMouseEvent &e)
Capture clicks on lines, and load up the relavent images in the control point tab.
bool m_updateStatistics
Flag set to true to update statistics next redraw.
std::vector< hugin_utils::FDiff2D > m_imageCentres
The location on the panorama that the middle of the images map to.
void drawIdentificationBorder(unsigned int image)
Draw a border for an image.
void updateLineInformation()
Update the line information.
virtual void MouseMoveEvent(double x, double y, wxMouseEvent &e)
Revaluate the lines under the mouse pointer when it moves.
std::vector< LineDetails > m_lines
A container for the line information.
void panoramaChanged(HuginBase::Panorama &pano)
This just sets a flag when the panorama is changed.
bool m_useNearestLine
True if we should highlight the nearest line to the mouse position.
bool BeforeDrawImageEvent(unsigned int image)
Draw what the tool requires just before a given image is drawn.
unsigned int m_rectangleBorderTex
OpenGL texture names for the border highlight.
Definition Tool.h:43
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition Tool.h:109
misc math function & classes used by other parts of the program
std::set< unsigned int > UIntSet
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41