
#ifndef OF_CV_COLOR_IMAGE_H
#define OF_CV_COLOR_IMAGE_H

#include "ofCvImage.h"


class ofCvColorImage : public ofCvImage {


  public:

    ofCvColorImage() {};
    ofCvColorImage( const ofCvColorImage& mom );
    void allocate( int w, int h );
    
    void set(int value);
    void set(int valueR, int valueG, int valueB);
    //void set(ofCvColorPixel value);
    // void += ofCvColorPixel;sss
    // void -= ofCvColorPixel;
    
    void convertRgbToHsv();
    void convertHsvToRgb();
    void setFromGrayscalePlanarImages(ofCvGrayscaleImage& red, ofCvGrayscaleImage& green, ofCvGrayscaleImage& blue);
    void convertToGrayscalePlanarImages(ofCvGrayscaleImage& red, ofCvGrayscaleImage& green, ofCvGrayscaleImage& blue);

    void setFromPixels( unsigned char * _pixels, int w, int h );
    void operator = ( unsigned char* _pixels );    
    void operator = ( ofCvGrayscaleImage& mom );
    void operator = ( ofCvColorImage& mom );
    void operator = ( ofCvFloatImage& mom );    
    void operator -= ( ofCvColorImage& mom );
    void operator += ( ofCvColorImage& mom );
    void operator *= ( ofCvColorImage& mom );    
    
    unsigned char*  getPixels();    
    
    void draw( float x, float y );
    void draw( float x, float y, float w, float h );
    
    void resize( int w, int h );
    void scaleIntoMe( ofCvColorImage& mom, int interpolationMethod = CV_INTER_NN);
    
};



#endif
