-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHistoStretch.h
46 lines (38 loc) · 1.35 KB
/
HistoStretch.h
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
// ======================================================================
// IMPROC: Image Processing Software Package
// Copyright (C) 2017 by George Wolberg
//
// HistoStretch.h - Histogram Stretch widget
//
// Written by: George Wolberg, 2017
// ======================================================================
#ifndef HISTOSTRETCH_H
#define HISTOSTRETCH_H
#include "ImageFilter.h"
class HistoStretch : public ImageFilter {
Q_OBJECT
public:
HistoStretch (QWidget *parent = 0); // constructor
QGroupBox* controlPanel (); // create control panel
bool applyFilter (ImagePtr, bool, ImagePtr); // apply filter to input
void reset (); // reset parameters
void histoStretch (ImagePtr, int, int, ImagePtr);
void initShader();
void gpuProgram(int pass); // use GPU program to apply filter
protected slots:
void changeThr1 (int);
void changeThr2 (int);
void setThrFlag1 (int);
void setThrFlag2 (int);
private:
// widgets
QSlider* m_slider [2]; // HistoStretch sliders
QSpinBox* m_spinBox[2]; // HistoStretch spin boxes
QCheckBox* m_thr1; // min histogram threshold control
QCheckBox* m_thr2; // max histogram threshold control
QGroupBox* m_ctrlGrp; // groupbox for panel
// state variables
int m_thrFlag1; // flag for finding min histogram value
int m_thrFlag2; // flag for finding max histogram value
};
#endif // HISTOSTRETCH_H