MeVisLabToolboxReference
MeVisLab/Standard/Sources/Shared/MLLUT/mlLUTFRescale.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00005 
00011 //----------------------------------------------------------------------------------
00012 
00013 
00014 #ifndef __mlLUTFRescale_H
00015 #define __mlLUTFRescale_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 LUTFRescale : public LUTFunction
00033 {
00034 public:
00035 
00037   LUTFRescale (void);
00038 
00039 
00041   virtual void setInputLUT (const LUTFunction *inLUT);
00042 
00043   
00045 
00046 
00049   virtual void setRelative (bool relative);
00050 
00052   virtual bool getAutoSourceRange (void) const { return _autoSourceRange; }
00053 
00055   virtual void setAutoSourceRange (bool autoSourceRange) { _autoSourceRange = autoSourceRange; changed(); }
00056 
00058   virtual double getSourceMin (void) const;
00059 
00061   virtual double getSourceMax (void) const;
00062 
00064   virtual void setSourceRange (double sourceMin, double sourceMax);
00065 
00067   virtual double getTargetMin (void) const { return _targetMin; }
00068 
00070   virtual double getTargetMax (void) const { return _targetMax; }
00071 
00073   virtual void setTargetRange (double targetMin, double targetMax);
00074 
00076 
00077   
00079 
00080 
00082   virtual bool isValid (void) const;
00083 
00085   virtual LUTVisualType getVisualType (void) const;
00086 
00088   virtual int getNativeMinIndex (void) const;
00089 
00091   virtual int getNativeMaxIndex (void) const;
00092 
00094   virtual int getHeight (void) const;
00095 
00097   virtual int getDepth (void) const;
00098 
00100   virtual double getNativeMinValue (void) const;
00101 
00103   virtual double getNativeMaxValue (void) const;
00104 
00106 
00107   
00108 protected:
00109 
00111 
00112 
00114   virtual double transformForward (double index) const;
00115 
00117   virtual double transformInverse (double index) const;
00118 
00120   
00122 
00123 
00128   virtual bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const;
00129 
00136   virtual bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator,
00137                                   double minIndex, double maxIndex) const;
00138 
00140 
00141   
00143   const LUTFunction *_inLUT;
00144 
00146   bool _autoSourceRange;
00147   
00149   double _sourceMin, _sourceMax;
00150 
00152   double _targetMin, _targetMax;
00153   
00154   
00155   ML_CLASS_HEADER(LUTFRescale);
00156 
00157 };
00158 
00159 
00160 ML_END_NAMESPACE
00161 
00162 #endif
00163 // __mlLUTFRescale_H