template class cv::WImageBufferC

Like a WImageBuffer class but when the number of channels is known at compile time.

#include <wimage.hpp>

template <
    typename T,
    int C
    >
class WImageBufferC: public cv::WImageC
{
public:
    // typedefs

    typedef WImage<T>::BaseType BaseType;

    // enums

    enum
    {
        kChannels = C,
    };

    // construction

    WImageBufferC();

    WImageBufferC(
        int width,
        int height
        );

    WImageBufferC(IplImage* img);

    // methods

    void
    Allocate(
        int width,
        int height
        );

    void
    CloneFrom(const WImageC<T, C>& src);

    bool
    IsNull() const;

    void
    ReleaseImage();

    void
    SetIpl(IplImage* img);
};

Inherited Members

public:
    // typedefs

    typedef T BaseType;
    typedef WImage<T>::BaseType BaseType;

    // enums

    enum
    {
        kChannels = C,
    };

    // methods

    int
    Channels() const;

    int
    ChannelSize() const;

    void
    CopyFrom(const WImage<T>& src);

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Depth() const;

    int
    Height() const;

    T*
    ImageData();

    const T*
    ImageData() const;

    IplImage*
    Ipl();

    const IplImage*
    Ipl() const;

    T*
    operator()(
        int c,
        int r
        );

    const T*
    operator()(
        int c,
        int r
        ) const;

    int
    PixelSize() const;

    const T*
    Row(int r) const;

    T*
    Row(int r);

    void
    SetZero();

    WImageView<T>
    View(
        int c,
        int r,
        int width,
        int height
        );

    int
    Width() const;

    int
    WidthStep() const;

    int
    Channels() const;

    void
    CopyFrom(const WImageC<T, C>& src);

    WImageViewC<T, C>
    View(
        int c,
        int r,
        int width,
        int height
        );

protected:
    // fields

    IplImage* image_;

    // methods

    void
    operator=(const WImage&);

    void
    SetIpl(IplImage* image);

    void
    operator=(const WImageC&);

    void
    SetIpl(IplImage* image);