00001 #ifndef H_LAYER_COLOR_CODING
00002 #define H_LAYER_COLOR_CODING
00003
00004 #include "Layer.h"
00005 #include "FlowDataWorker.h"
00006 #include "ui_ColorCodingLayer.h"
00007
00008
00009
00010
00011
00012
00013 class LayerColorCoding : public Layer
00014 {
00015 Q_OBJECT
00016
00017 public:
00018 LayerColorCoding(int startScalarIndex);
00019 ~LayerColorCoding();
00020
00021 void setWidget(QWidget *widget);
00022
00023 void draw(const DrawInfo &drawInfo);
00024
00025 public slots:
00026 void setFlowData(FlowData *flowData);
00027 void setSize(const QSize &size);
00028 void colorsChanged();
00029 void scalarIndexChanged(int index);
00030
00031 protected:
00032 void customEvent(QEvent *event);
00033
00034 private:
00035 void invalidate();
00036 void free();
00037 void getData();
00038 void mapColors();
00039 void updateUi();
00040
00041 Ui::ColorCodingLayer uiLayer;
00042
00043 QImage image;
00044
00045 FlowDataWorkerScalar flowDataWorker;
00046 int scalarIndex;
00047
00048 float* rawData;
00049 };
00050
00051 #endif // H_LAYER_COLOR_CODING