39 #include <pcl/io/image_metadata_wrapper.h>
41 #include <pcl/pcl_config.h>
59 using Ptr = shared_ptr<Image>;
62 using Clock = std::chrono::high_resolution_clock;
63 using Timestamp = std::chrono::high_resolution_clock::time_point;
73 : wrapper_ (std::move(image_metadata))
74 , timestamp_ (
Clock::now ())
78 : wrapper_ (std::move(image_metadata))
96 unsigned output_width,
unsigned output_height)
const = 0;
106 fillRGB (
unsigned width,
unsigned height,
unsigned char* rgb_buffer,
unsigned rgb_line_step = 0)
const = 0;
122 memcpy (rgb_buffer, wrapper_->getData (), wrapper_->getDataSize ());
134 unsigned gray_line_step = 0)
const = 0;
142 return (wrapper_->getWidth ());
151 return (wrapper_->getHeight ());
161 return (wrapper_->getFrameID ());
171 return (wrapper_->getTimestamp ());
189 return (wrapper_->getData ());
196 return (wrapper_->getDataSize ());
203 return (getDataSize() / getHeight());
shared_ptr< FrameWrapper > Ptr
Image interface class providing an interface to fill a RGB or Grayscale image buffer.
Timestamp getSystemTimestamp() const
unsigned getWidth() const
virtual bool isResizingSupported(unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const =0
Image(FrameWrapper::Ptr image_metadata, Timestamp time)
unsigned getFrameID() const
shared_ptr< const Image > ConstPtr
unsigned getHeight() const
std::uint64_t getTimestamp() const
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...
FrameWrapper::Ptr wrapper_
virtual ~Image()=default
virtual Destructor that never throws an exception.
std::chrono::high_resolution_clock::time_point Timestamp
Image(FrameWrapper::Ptr image_metadata)
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...
std::chrono::high_resolution_clock Clock
virtual void fillRaw(unsigned char *rgb_buffer) const
fills a user given buffer with the raw values.
virtual Encoding getEncoding() const =0
returns the encoding of the native data.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.
A structure representing RGB color information.