template class cv::WImageBuffer

Image class which owns the data, so it can be allocated and is always freed. It cannot be copied but can be explicity cloned.

#include <wimage.hpp>

template <typename T>
class WImageBuffer: public cv::WImage
{
public:
    // typedefs

    typedef WImage<T>::BaseType BaseType;

    // construction

    WImageBuffer();

    WImageBuffer(
        int width,
        int height,
        int nchannels
        );

    WImageBuffer(IplImage* img);

    // methods

    void
    Allocate(
        int width,
        int height,
        int nchannels
        );

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

    bool
    IsNull() const;

    void
    ReleaseImage();

    void
    SetIpl(IplImage* img);
};

Inherited Members

public:
    // typedefs

    typedef T BaseType;

    // 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;

protected:
    // fields

    IplImage* image_;

    // methods

    void
    operator=(const WImage&);

    void
    SetIpl(IplImage* image);