BALL
1.4.1
|
00001 #ifndef BALL_VIEW_MODELS_COLORBYGRIDPROCESSOR_H 00002 #define BALL_VIEW_MODELS_COLORBYGRIDPROCESSOR_H 00003 00004 #include <BALL/DATATYPE/regularData3D.h> 00005 00006 #include <BALL/VIEW/MODELS/colorProcessor.h> 00007 #include <BALL/VIEW/DATATYPE/colorMap.h> 00008 00009 namespace BALL 00010 { 00011 namespace VIEW 00012 { 00013 class GridColorWidget; 00014 00015 class BALL_VIEW_EXPORT ColorByGridProcessor : public ColorProcessor 00016 { 00017 public: 00018 ColorByGridProcessor(const RegularData3D* grid, const GridColorWidget* widget = 0); 00019 00020 virtual bool start(); 00021 virtual bool finish(); 00022 virtual Processor::Result operator() (GeometricObject*& object); 00023 00024 void setNormalizationEnabled(bool enabled); 00025 00026 void setColors(const ColorRGBA& min_min, const ColorRGBA& min, 00027 const ColorRGBA& mid, const ColorRGBA& max, const ColorRGBA& max_max); 00028 00029 void setBreakpoints(float min_value, float mid_value, float max_value); 00030 00031 void setNumLevels(int num_levels); 00032 00033 protected: 00034 vector<float> values_; 00035 list<GeometricObject*> objects_; 00036 00037 float min_value_; 00038 float mid_value_; 00039 float max_value_; 00040 00041 bool normalization_enabled_; 00042 00043 ColorRGBA min_min_color_; 00044 ColorRGBA min_color_; 00045 ColorRGBA mid_color_; 00046 ColorRGBA max_color_; 00047 ColorRGBA max_max_color_; 00048 00049 ColorMap cm_; 00050 const RegularData3D* grid_; 00051 int num_levels_; 00052 }; 00053 } 00054 } 00055 00056 #endif //BALL_VIEW_MODELS_COLORBYGRIDPROCESSOR_H