TransferFunc.h

Go to the documentation of this file.
00001 // vim:set ts=4 sw=4 noet cin:
00002 
00003 #ifndef TRANSFERFUNC_H_
00004 #define TRANSFERFUNC_H_
00005 
00006 #include "Color.h"
00007 
00017 class TransferFunc {
00018         public:
00019                 TransferFunc(Color color, float thr);
00020                 
00021                 Color getColor(float val);
00022                 void setColor(Color c) { mColor = c; }
00023                 void setOpacity(Color::ColorUnit a) { mColor.setA(a); }
00024                 void setRGB(Color::ColorUnit r, Color::ColorUnit g, Color::ColorUnit b);
00025                 
00026                 void setUpperThr(float thr);
00027                 void setLowerThr(float thr);
00028 
00029                 void setThr(float thr){ mThr = thr;}
00030                 float thr() {return mThr;}
00031                 
00032         private:
00033                 
00034                 Color mColor;
00035                 
00036                 float mThr, mLowerThr, mUpperThr;
00037                 float mLowerDivisor , mUpperDivisor;    //for optimization
00038 };
00039 
00040 
00041 #endif

Generated on Mon Jan 23 19:44:27 2006 for Visualization by  doxygen 1.4.6