MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00005 00011 //---------------------------------------------------------------------------------- 00012 00013 00014 #ifndef __mlLUTFChannelMap_H 00015 #define __mlLUTFChannelMap_H 00016 00017 // Local includes 00018 #ifndef __mlLUTSystem_H 00019 #include "mlLUTSystem.h" 00020 #endif 00021 #ifndef __mlLUTFunction_H 00022 #include "mlLUTFunction.h" 00023 #endif 00024 00025 00026 00027 ML_START_NAMESPACE 00028 00029 00032 class MLLUT_EXPORT LUTFChannelMap : public LUTFunction 00033 { 00034 public: 00035 00037 LUTFChannelMap (void); 00038 00039 00041 00042 00044 virtual bool isValid (void) const; 00045 00047 virtual int getNativeMinIndex (void) const; 00048 00050 virtual int getNativeMaxIndex (void) const; 00051 00053 virtual int getHeight (void) const; 00054 00056 virtual int getDepth (void) const; 00057 00059 virtual double getNativeMinValue (void) const; 00060 00062 virtual double getNativeMaxValue (void) const; 00063 00065 00066 00068 enum Map { 00069 MAP_NONE = 0, 00070 MAP_L, 00071 MAP_R, MAP_G, MAP_B, 00072 MAP_A, 00073 MAP_NUM_VALUES 00074 }; 00075 00076 00078 void setRGBAMap (Map r, Map g, Map b, Map a); 00079 00081 void setLAMap (Map l, Map a); 00082 00084 const Map *getMap (void) const { return _map; } 00085 00086 00088 void setSource (LUTFunction *source); 00089 00090 00091 protected: 00092 00094 00095 00100 virtual bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const; 00101 00108 virtual bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, 00109 double minIndex, double maxIndex) const; 00110 00114 template <typename T> 00115 bool renderLUT (LUTData<T> *lutData, LUTIterator<T> *lutIterator, double minIndex, double maxIndex, 00116 bool rescale) const; 00117 00119 00120 00122 Map _map[LUTIteratorBase::MAX_CHANNELS]; 00123 00125 LUTFunction* _source; 00126 00127 00128 ML_CLASS_HEADER(LUTFChannelMap); 00129 00130 }; 00131 00132 00133 ML_END_NAMESPACE 00134 00135 00136 #endif 00137 // __mlLUTFChannelMap_H