Hugin trunk
0.1
Loading...
Searching...
No Matches
hugin1
base_wx
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
35
namespace
wxGraphTools
36
{
38
class
WXIMPEX
GraphPopupWindow
:
public
wxPopupTransientWindow
39
{
40
public
:
41
GraphPopupWindow
(wxWindow*
parent
,
wxBitmap
bitmap);
42
protected
:
43
void
OnLeftDown(
wxMouseEvent
&e);
44
void
OnRightDown(
wxMouseEvent
&e);
45
private
:
46
wxStaticBitmap
*
m_bitmapControl
;
47
DECLARE_CLASS
(
GraphPopupWindow
)
48
};
49
51
class
WXIMPEX
Graph
52
{
53
public
:
55
Graph
(
int
graphWidth
,
int
graphHeight
,
wxColour
backgroundColour
);
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
;
67
private
:
68
// prevent copying of class
69
Graph
(
const
Graph
&);
70
Graph
&
operator=
(
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
81
wxBitmap
*
m_bitmap
;
82
wxMemoryDC
m_dc
;
83
};
84
86
wxBitmap
WXIMPEX
GetDistortionGraph
(
const
HuginBase::SrcPanoImage
& srcImage);
87
}
88
#endif
// GRAPHTOOLS_H
HuginBase::SrcPanoImage
All variables of a source image.
Definition
SrcPanoImage.h:195
wxGraphTools::GraphPopupWindow
simple popup to show graph
Definition
GraphTools.h:39
wxGraphTools::GraphPopupWindow::m_bitmapControl
wxStaticBitmap * m_bitmapControl
Definition
GraphTools.h:46
wxGraphTools::Graph
help class to draw charts
Definition
GraphTools.h:52
wxGraphTools::Graph::m_xmax
double m_xmax
Definition
GraphTools.h:75
wxGraphTools::Graph::m_height
int m_height
Definition
GraphTools.h:77
wxGraphTools::Graph::m_bitmap
wxBitmap * m_bitmap
Definition
GraphTools.h:81
wxGraphTools::Graph::m_dc
wxMemoryDC m_dc
Definition
GraphTools.h:82
wxGraphTools::Graph::Graph
Graph(const Graph &)
wxGraphTools::Graph::operator=
Graph & operator=(const Graph &)
wxGraphTools::Graph::m_bottom
int m_bottom
Definition
GraphTools.h:79
hugin_shared.h
WXIMPEX
#define WXIMPEX
Definition
hugin_shared.h:40
wxGraphTools
Definition
GraphTools.cpp:32
wxGraphTools::GetDistortionGraph
wxBitmap GetDistortionGraph(const HuginBase::SrcPanoImage &srcImage)
return wxBitmap with graph of distortion for given SrcPanoImage
Definition
GraphTools.cpp:192
panoinc.h
include file for the hugin project
panoinc_WX.h
include file for the hugin project
threshold
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
Generated on Sun Sep 13 2026 02:49:53 for Hugin trunk by
1.9.8