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, unsigned short thr);
00020                 
00021                 Color getColor(unsigned short 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(unsigned short thr);
00027                 void setLowerThr(unsigned short thr);
00028 
00029                 void setThr(unsigned short thr){ mThr = thr;}
00030                 unsigned short thr() {return mThr;}
00031                 
00032         private:
00033                 
00034                 Color mColor;
00035                 
00036                 unsigned short mThr, mLowerThr, mUpperThr;
00037                 float mLowerDivisor , mUpperDivisor;    //for optimization
00038 };
00039 
00040 
00041 #endif

Generated on Mon Dec 19 00:13:20 2005 for Visualization by  doxygen 1.4.5