-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBrightnessMeasurementDlg.h
More file actions
99 lines (72 loc) · 2.35 KB
/
Copy pathBrightnessMeasurementDlg.h
File metadata and controls
99 lines (72 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* The information in this file is
* Copyright(c) 2007 Ball Aerospace & Technologies Corporation
* and is subject to the terms and conditions of the
* GNU Lesser General Public License Version 2.1
* The license text is available from
* http://www.gnu.org/licenses/lgpl.html
*/
#ifndef BRIGHTNESS_MEASUREMENT_DLG_H
#define BRIGHTNESS_MEASUREMENT_DLG_H
#include <QtGui/QDialog>
#include "TypesFile.h"
class QDoubleSpinBox;
class QLabel;
class QPushButton;
class QScrollArea;
class QScrollBar;
class QComboBox;
class BrightnessMeasurementDlg : public QDialog
{
Q_OBJECT
public:
BrightnessMeasurementDlg(QWidget* pParent, double *pBuffer, int imgWidth, int imgHeight, double t1, double t2, EncodingType type);
~BrightnessMeasurementDlg();
private slots:
void setInnerRadius(double radiusValue);
void setOutterRadius(double radiusValue);
void ComputeBrightness(void);
void setMeasurementMode(int nIndex);
void setStarIndex(int nIndex);
public:
QLabel *pStarPosition;
QLabel *pStarBrightness;
QLabel *pSkyBrightness;
QComboBox *pMode;
QComboBox *pStarIndex;
QDoubleSpinBox *pInRadius;
QDoubleSpinBox *pOutRadius;
QPushButton *pCompute;
QLabel *imageLabel;
QScrollArea *scrollArea;
QImage *qImage;
double CalculateMeanValue(int x, int y, int inRadius, int outRadius, int rows, int cols, double *pBuffer, int *nPixels);
int CalculateInnerRadius(int x, int y, int rows, int cols, double maxGrayVal, double *pBuffer);
int CalculateOutterRadius(int x, int y, int inRadius, int rows, int cols, double maxGrayVal, double *pBuffer);
void ModifyCenter(int *x, int *y, int rows, int cols, double *pBuffer);
void SortData(double *pData, int len);
double CalculateSkyBrightness(int x, int y, int inRadius, int outRadius, int rows, int cols, double *pBuffer);
private:
double mInnerRadius;
double mOutterRadius;
double mInnerRadius_2;
double mOutterRadius_2;
int mPosX;
int mPosY;
int mPosX_2;
int mPosY_2;
int mMode;
int mStarIndex;
double mStarBrightness;
double mSkyBrightness;
double *pImage;
unsigned char *DisplayBuffer;
int mWidth;
int mHeight;
double mMaxGrayLevel;
double mMinGrayValue;
double mMaxGrayValue;
protected:
bool eventFilter(QObject *obj, QEvent *pEvent);
};
#endif