9 #ifndef GlobeEngine_TransferFunctionEditor_h
10 #define GlobeEngine_TransferFunctionEditor_h
12 #include "OpenGL_Includes.h"
17 #include <QMouseEvent>
18 #include <QPaintEvent>
20 #include <QColorDialog>
22 #include <QFileDialog>
23 #include <QPushButton>
25 #include <QRadioButton>
26 #include <QHBoxLayout>
27 #include <QEasingCurve>
50 void setHistogramData(std::vector<std::vector<std::vector<long>>> histograms, std::vector<std::vector<float>> minimumHistValue, std::vector<std::vector<float>> maximumHistValue);
58 void setCurrent(
int _currentAttribute,
int _currentTimestep,
int _currentMarching) {
59 this->activePoint = -1;
60 this->currentAttribute = _currentAttribute;
61 this->currentTimestep = _currentTimestep;
62 this->currentMarching = _currentMarching;
78 void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
79 void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
80 void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
82 void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
84 void keepMouseWithinScope(QPoint pos);
85 QPoint keepControlPointWithinScope(
int left,
int up,
int right,
int down);
87 void setGradientType(
int _gradientType);
88 int getGradientType();
90 bool multiplied =
false;
92 QColor interpolate(QColor color1, QColor color2,
float t);
94 std::vector<std::vector<TransferFunctionProperties>> tempStore;
95 std::vector<std::vector<float>> minimumHistValues;
96 std::vector<std::vector<float>> maximumHistValues;
97 std::vector<std::vector<std::vector<long>>> histograms;
99 int currentAttribute = 0;
100 int currentTimestep = 0;
101 int currentMarching = 0;
104 QPoint currentPosition;
108 bool interacting =
false;
110 bool clickedStartPoint;
115 const int border = 20;
116 QColorDialog* colorDialog;
120 const int binSize = 20;
122 QVector<float> binLimits;
128 int textureWidth = 1000;
132 QRadioButton* linear;
133 QRadioButton* bezier;
134 QRadioButton* staircase;
135 QComboBox* colorInterpolation;
138 #endif // TRANSFERFUNCTIONEDITORTWO_H
void load()
Definition: TransferFunctionEditor.cpp:781
std::vector< float > getHeights()
Definition: TransferFunctionEditor.cpp:937
void save()
Definition: TransferFunctionEditor.cpp:714
void transferFunctionChanged()
TransferFunctionEditor(QWidget *_parent, QColorDialog *_colorDialog)
Definition: TransferFunctionEditor.cpp:6
QMap< int, QPointF > controls1
Definition: TransferFunctionEditor.h:36
void setHistogramData(std::vector< std::vector< std::vector< long >>> histograms, std::vector< std::vector< float >> minimumHistValue, std::vector< std::vector< float >> maximumHistValue)
Definition: TransferFunctionEditor.cpp:919
unsigned char * getTextureData()
Definition: TransferFunctionEditor.cpp:674
Definition: TransferFunctionEditor.h:40
Definition: TransferFunctionEditor.h:32
QMap< int, QColor > colors
Definition: TransferFunctionEditor.h:34
void initialize(int _numberOfTimesteps)
Definition: TransferFunctionEditor.cpp:49
void setInterpolationType()
Definition: TransferFunctionEditor.cpp:947
void setCurrent(int _currentAttribute, int _currentTimestep, int _currentMarching)
Definition: TransferFunctionEditor.h:58
Definition: ClickableQLabel.h:8
void test()
Definition: TransferFunctionEditor.cpp:661
void loadFromFile(std::string _file)
Definition: TransferFunctionEditor.cpp:735
~TransferFunctionEditor()
Definition: TransferFunctionEditor.h:46
QMap< int, int > points
Definition: TransferFunctionEditor.h:33
QMap< int, int > gradients
Definition: TransferFunctionEditor.h:35
QMap< int, QPointF > controls2
Definition: TransferFunctionEditor.h:37