template class cv::WImageC

Image class when both the pixel type and number of channels are known at compile time. This wrapper will speed up some of the operations like accessing individual pixels using the () operator.

#include <wimage.hpp>

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

    typedef WImage<T>::BaseType BaseType;

    // enums

    enum
    {
        kChannels = C,
    };

    // construction

    WImageC(IplImage* img);

    // methods

    int
    Channels() const;

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

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

protected:
    // construction

    WImageC(const WImageC&);

    // methods

    void
    operator=(const WImageC&);

    void
    SetIpl(IplImage* image);
};

// direct descendants

template <
    typename T,
    int C
    >
class WImageBufferC;

template <
    typename T,
    int C
    >
class WImageViewC;

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