Hugin trunk 0.1
Loading...
Searching...
No Matches
GraphTools.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
10/*
11 * This is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This software is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this software. If not, see
23 * <http://www.gnu.org/licenses/>.
24 *
25 */
26
27#ifndef GRAPHTOOLS_H
28#define GRAPHTOOLS_H
29
30#include <hugin_shared.h>
31#include "panoinc_WX.h"
32#include "panoinc.h"
33#include "wx/popupwin.h"
34
35namespace wxGraphTools
36{
38class WXIMPEX GraphPopupWindow : public wxPopupTransientWindow
39{
40public:
41 GraphPopupWindow(wxWindow* parent, wxBitmap bitmap);
42protected:
43 void OnLeftDown(wxMouseEvent &e);
44 void OnRightDown(wxMouseEvent &e);
45private:
48};
49
52{
53public:
57 ~Graph();
59 void SetChartArea(int left, int top, int right, int bottom);
61 void SetChartDisplay(double xmin, double ymin, double xmax, double ymax);
63 void DrawGrid(size_t linesX, size_t linesY);
65 void DrawLine(std::vector<hugin_utils::FDiff2D> points, wxColour colour, int penWidth = 1);
66 const wxBitmap GetGraph() const;
67private:
68 // prevent copying of class
69 Graph(const Graph&);
71 //helper function to transform coordinates from real world to bitmap
72 int TransformX(double x);
73 int TransformY(double y);
74 // area to be drawn
75 double m_xmin, m_xmax, m_ymin, m_ymax;
76 // size of canvas
77 int m_width, m_height;
78 // chart area
79 int m_left, m_top, m_right, m_bottom;
80 // bitmap
83};
84
87}
88#endif // GRAPHTOOLS_H
All variables of a source image.
simple popup to show graph
Definition GraphTools.h:39
wxStaticBitmap * m_bitmapControl
Definition GraphTools.h:46
help class to draw charts
Definition GraphTools.h:52
wxBitmap * m_bitmap
Definition GraphTools.h:81
Graph(const Graph &)
Graph & operator=(const Graph &)
#define WXIMPEX
wxBitmap GetDistortionGraph(const HuginBase::SrcPanoImage &srcImage)
return wxBitmap with graph of distortion for given SrcPanoImage
include file for the hugin project
include file for the hugin project
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