Main Page Alphabetical List Compound List File List Compound Members Related Pages

# contrast.h

    00001 //---------------------------------------------------------------------------
    00002
    00003 #ifndef contrastH
    00004 #define contrastH
    00005 //---------------------------------------------------------------------------
    00006
    00010 class TContrast
    00011 {
    00012
    00013         private:
    00014                 float _ratio;
    00015                 int _size;      // max value of input
    00016                 float _lower;
    00017                 float _upper;
    00018                 float _dist;    // distance between _lower and _upper
    00019                 int _lowerAbs;
    00020                 int _upperAbs;
    00021
    00022                 void __fastcall setLower(float val);
    00023                 void __fastcall setUpper(float val);
    00024
    00025         public:
    00026                 TContrast(int s)
    00027                 : _size(s),
    00028                   _ratio((float)0xFF/(float)s),
    00029                   _lower(0.0),
    00030                   _upper(1.0),
    00031                   _dist(1.0),
    00032                   _lowerAbs(0),
    00033                   _upperAbs(s)
    00034                 {}
    00035
    00036                 __property float Lower = { read=_lower, write=setLower };
    00037                 __property float Upper = { read=_upper, write=setUpper };
    00038
    00039                 unsigned char __fastcall getVal(__int16 val);
    00040
    00041 };
    00042 #endif
    00043