00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 #include <mln/value/ops.hh>
00027 
00028 #include <mln/value/concept/vectorial.hh>
00029 #include <mln/value/int_u.hh>
00030 #include <mln/algebra/vec.hh>
00031 
00032 #include <mln/value/float01_8.hh>
00033 
00034 #ifndef MLN_VALUE_HSI_HH
00035 # define MLN_VALUE_HSI_HH
00036 
00037 
00038 namespace mln
00039 {
00040 
00041   namespace value
00042   {
00043 
00044     template <typename E>
00045     struct HSI
00046     {
00047     };
00048 
00049     template <typename H, typename S, typename I>
00050     class hsi_ : public HSI< hsi_<H,S,I> >
00051     {
00052     public:
00053 
00054       typedef H h_type;
00055       typedef S s_type;
00056       typedef I i_type;
00057 
00059       hsi_()
00060       {
00061       }
00062 
00064       hsi_(const H& hue, const S& sat, const I& inty)
00065         : hue_(hue),
00066           sat_(sat),
00067           int_(inty)
00068       {
00069       }
00070 
00072       const H& hue() const
00073       {
00074         return this->hue_;
00075       }
00076       const S& sat() const
00077       {
00078         return this->sat_;
00079       }
00080       const I& inty() const
00081       {
00082         return this->int_;
00083       }
00084 
00086       H& hue()
00087       {
00088         return this->hue_;
00089       }
00090       S& sat()
00091       {
00092         return this->sat_;
00093       }
00094       I& inty()
00095       {
00096         return this->int_;
00097       }
00098 
00099     private:
00100       H hue_;
00101       S sat_;
00102       I int_;
00103     };
00104 
00105     typedef hsi_<float, float, float> hsi_f;
00106 
00107     typedef hsi_<double, double, double> hsi_d;
00108 
00109   } 
00110 
00111 } 
00112 
00113 #endif // ! MLN_VALUE_HSI_HH