Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h

Go to the documentation of this file.
00001 #ifndef _VUTFINTENSITY_H_
00002 #define _VUTFINTENSITY_H_
00003 
00004 #include "vuSimpleTypes.h"
00005 #include "vuColourRGBa.h"
00006 #include "vuMap.h"
00007 
00009 
00024 class vuTFIntensity
00025 {
00026 public:
00028 
00030     vuTFIntensity();
00031     vuTFIntensity(dword ncomp, dword range);
00032 
00034     vuTFIntensity(const vuTFIntensity& inst);
00035 
00037     virtual ~vuTFIntensity();
00038 
00044     vuTFIntensity& operator=(const vuTFIntensity& rhs);
00045 
00047 
00050     const float* operator[](dword intensity) const
00051         { // inlined to speed it up
00052             return &m_Table[intensity*m_NComp];
00053         }
00054     
00056     dword getNComponents()  const { return m_NComp; };
00058     dword getRange()  const { return m_Range; };
00059 
00061     virtual void getRGBa(dword i, vuColourRGBa& rgba) const;
00063     virtual float getOpacityAtPos(dword i);
00064 
00066     bool resize(dword ncomp, dword range);
00067 
00070     float* getLight() {return m_Light;};
00071     
00075     void normalizeAlphaToOne();
00076 
00079     void fromMap(const vuMap& map);
00080     
00081  protected:
00086     virtual bool init(dword ncomp, dword range);
00091     virtual void cleanup();
00092     
00093     dword m_NComp;      
00094     dword m_Range;      
00095     dword m_TableLength;        
00096 
00098     float *m_Table;
00102     float *m_Light;
00103 };
00104 
00105 #endif

Generated on Wed Dec 15 21:20:38 2004 for vuVolume by  doxygen 1.3.9.1