36 #include <pcl/pcl_config.h> 37 #ifndef PCL_IO_IMAGE_H_ 38 #define PCL_IO_IMAGE_H_ 40 #include <pcl/pcl_exports.h> 41 #include <pcl/io/boost.h> 42 #include <boost/chrono.hpp> 44 #include <pcl/io/image_metadata_wrapper.h> 59 typedef boost::shared_ptr<Image>
Ptr;
60 typedef boost::shared_ptr<const Image>
ConstPtr;
62 typedef boost::chrono::high_resolution_clock
Clock;
63 typedef boost::chrono::high_resolution_clock::time_point
Timestamp;
73 : wrapper_ (image_metadata)
74 , timestamp_ (
Clock::now ())
78 : wrapper_ (image_metadata)
96 isResizingSupported (
unsigned input_width,
unsigned input_height,
97 unsigned output_width,
unsigned output_height)
const = 0;
107 fillRGB (
unsigned width,
unsigned height,
unsigned char* rgb_buffer,
unsigned rgb_line_step = 0)
const = 0;
114 getEncoding ()
const = 0;
123 memcpy (rgb_buffer, wrapper_->getData (), wrapper_->getDataSize ());
134 fillGrayscale (
unsigned width,
unsigned height,
unsigned char* gray_buffer,
135 unsigned gray_line_step = 0)
const = 0;
143 return (wrapper_->getWidth ());
152 return (wrapper_->getHeight ());
162 return (wrapper_->getFrameID ());
172 return (wrapper_->getTimestamp ());
190 return (wrapper_->getData ());
197 return (wrapper_->getDataSize ());
204 return (getDataSize() / getHeight());
215 #endif //PCL_IO_IMAGE_H_ boost::shared_ptr< FrameWrapper > Ptr
Timestamp getSystemTimestamp() const
Image(FrameWrapper::Ptr image_metadata)
unsigned getFrameID() const
FrameWrapper::Ptr wrapper_
boost::shared_ptr< const Image > ConstPtr
Image(FrameWrapper::Ptr image_metadata, Timestamp time)
unsigned getWidth() const
A structure representing RGB color information.
virtual void fillRaw(unsigned char *rgb_buffer) const
fills a user given buffer with the raw values.
boost::shared_ptr< Image > Ptr
unsigned getHeight() const
Image interface class providing an interface to fill a RGB or Grayscale image buffer.
pcl::uint64_t getTimestamp() const
boost::chrono::high_resolution_clock::time_point Timestamp
boost::chrono::high_resolution_clock Clock
virtual ~Image()
virtual Destructor that never throws an exception.