MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00005 00011 //---------------------------------------------------------------------------------- 00012 00013 00014 #ifndef __mlLUTFCompose_H 00015 #define __mlLUTFCompose_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 00031 class MLLUT_EXPORT LUTFCompose : public LUTFunction 00032 { 00033 public: 00034 00036 LUTFCompose (void); 00037 00038 00040 00041 00043 virtual bool isValid (void) const; 00044 00046 virtual int getNativeMinIndex (void) const; 00047 00049 virtual int getNativeMaxIndex (void) const; 00050 00052 virtual int getHeight (void) const; 00053 00055 virtual int getDepth (void) const; 00056 00058 virtual double getNativeMinValue (void) const; 00059 00061 virtual double getNativeMaxValue (void) const; 00062 00064 00065 00067 00068 00070 void clear (void); 00071 00073 void addInputLUT (const LUTFunction &inputLUT); 00074 00076 unsigned int getNumInputLUTs (void) const; 00077 00079 const LUTFunction *getInputLUT (unsigned int i) const; 00080 00082 void setResolution (unsigned int resolution) { _resolution = resolution; changed(); } 00083 00085 unsigned int getResolution (void) const { return _resolution; } 00086 00088 static unsigned int defaultResolution; // = 4096 00089 00091 00092 00095 00096 00101 virtual bool render (LUTDataBase *lutData) const; 00102 00109 virtual bool renderRescaled (LUTDataBase *lutData, double minIndex, double maxIndex) const; 00110 00112 00113 00114 protected: 00115 00117 00118 00124 virtual LUTVisualType getRenderType (LUTDataBase *lutData) const { return lutData->getVisualType(); } 00125 00130 virtual bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const; 00131 00138 virtual bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, 00139 double minIndex, double maxIndex) const; 00140 00143 template <typename T> 00144 bool renderLUT (LUTData<T> *lutData, LUTIterator<T> *lutIterator, double minIndex, double maxIndex, 00145 bool rescale) const; 00146 00148 unsigned int getInputLUTWidth (unsigned int index) const; 00149 00151 00152 00154 std::vector<const LUTFunction*> _inputLUTs; 00155 00157 unsigned int _resolution; 00158 00159 00160 ML_CLASS_HEADER(LUTFCompose); 00161 00162 }; 00163 00164 00165 ML_END_NAMESPACE 00166 00167 00168 #endif 00169 // __mlLUTFCompose_H