#pragma once

#include <C_P1ImageCommonTypes.h>
#include <C_P1ImageCommonLinkage.h>

#include <vector>

namespace P1
{
namespace ImageSdk
{
    enum class EXPORT_API HistogramType
    {
        None,
        RGB,
        RGB_L, // RGB + luminosity
        Bayer, // RGGB
    };

    class EXPORT_API Histogram
    {
        public:
            Histogram();
            Histogram(HistogramType type, int binSize, int numChannel);

            int GetBinSize(){return mBinSize;}
            HistogramType GetType(){return mType;}
            bool IsCummulative(){return mIsCummulative;}

            const int* GetChannel(int channel);

            const int GetNumChannel(){return mNumChannel;}

            int* GetData(){return mData.data(); }
            int GetDataSizeBytes(){return mData.size() * sizeof(int); }

        protected:
            int mBinSize;
            HistogramType mType;
            int mNumChannel;
            bool mIsCummulative;
            std::vector<int> mData;
    };
}
}
