class sophus::ImageShapeΒΆ

Shape of image: width, height and pitch in bytes.

#include <image_size.h>

class ImageShape {
public:
    // construction

    ImageShape();

    ImageShape(
        ImageSize image_size,
        size_t pitch_bytes
        );

    ImageShape(
        int width,
        int height,
        size_t pitch_bytes
        );

    // methods

    sophus::ImageSize const& imageSize() const;
    int width() const;
    int height() const;
    size_t pitchBytes() const;
    int area() const;
    int sizeBytes() const;
    bool isEmpty() const;

    template <class TPixelType>
    static ImageShape makeFromSizeAndPitch(
        ImageSize image_size,
        size_t pitch_bytes
        );

    static ImageShape makeFromSizeAndPitchUnchecked(
        ImageSize image_size,
        size_t pitch_bytes
        );

    template <class TPixelTypeT>
    static ImageShape makeFromSize(sophus::ImageSize image_size);
};