39#include <pcl/pcl_config.h>
43#include <pcl/pcl_exports.h>
45#include "openni_exception.h"
61 using Ptr = pcl::shared_ptr<Image>;
76 inline Image (pcl::shared_ptr<xn::ImageMetaData> image_meta_data)
noexcept;
93 unsigned output_width,
unsigned output_height) const = 0;
103 virtual
void fillRGB (
unsigned width,
unsigned height,
unsigned char* rgb_buffer,
104 unsigned rgb_line_step = 0) const = 0;
119 fillRaw (
unsigned char* rgb_buffer) const noexcept
132 virtual void fillGrayscale (
unsigned width,
unsigned height,
unsigned char* gray_buffer,
133 unsigned gray_line_step = 0)
const = 0;
139 inline unsigned getWidth () const noexcept;
145 inline
unsigned getHeight () const noexcept;
165 inline const xn::ImageMetaData&
getMetaData () const noexcept;
199 return static_cast<unsigned long> (
image_md_->Timestamp ());
202 const xn::ImageMetaData&
Image class containing just a reference to image meta data.
virtual bool isResizingSupported(unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const =0
pcl::shared_ptr< Image > Ptr
pcl::shared_ptr< xn::ImageMetaData > image_md_
void fillRaw(unsigned char *rgb_buffer) const noexcept
fills a user given buffer with the raw values.
unsigned long getTimeStamp() const noexcept
pcl::shared_ptr< const Image > ConstPtr
virtual void fillRGB(unsigned width, unsigned height, unsigned char *rgb_buffer, unsigned rgb_line_step=0) const =0
fills a user given buffer with the RGB values, with an optional nearest-neighbor down sampling and an...
Image(pcl::shared_ptr< xn::ImageMetaData > image_meta_data) noexcept
Constructor.
virtual ~Image() noexcept
virtual Destructor that never throws an exception.
virtual Encoding getEncoding() const =0
returns the encoding of the native data.
unsigned getFrameID() const noexcept
unsigned getWidth() const noexcept
unsigned getHeight() const noexcept
virtual void fillGrayscale(unsigned width, unsigned height, unsigned char *gray_buffer, unsigned gray_line_step=0) const =0
fills a user given buffer with the gray values, with an optional nearest-neighbor down sampling and a...
const xn::ImageMetaData & getMetaData() const noexcept
Defines functions, macros and traits for allocating and using memory.