Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __OPENNI_IR_IMAGE__
00037 #define __OPENNI_IR_IMAGE__
00038
00039 #include <pcl/pcl_macros.h>
00040 #include "openni.h"
00041 #include "openni_exception.h"
00042 #include <pcl/io/boost.h>
00043
00044 namespace openni_wrapper
00045 {
00046
00051 class PCL_EXPORTS IRImage
00052 {
00053 public:
00054 typedef boost::shared_ptr<IRImage> Ptr;
00055 typedef boost::shared_ptr<const IRImage> ConstPtr;
00056
00057 inline IRImage (boost::shared_ptr<xn::IRMetaData> ir_meta_data) throw ();
00058 inline virtual ~IRImage () throw ();
00059
00060 void fillRaw (unsigned width, unsigned height, unsigned short* ir_buffer, unsigned line_step = 0) const;
00061
00062 inline unsigned getWidth () const throw ();
00063 inline unsigned getHeight () const throw ();
00064 inline unsigned getFrameID () const throw ();
00065 inline unsigned long getTimeStamp () const throw ();
00066 inline const xn::IRMetaData& getMetaData () const throw ();
00067
00068 protected:
00069 boost::shared_ptr<xn::IRMetaData> ir_md_;
00070 };
00071
00072 IRImage::IRImage (boost::shared_ptr<xn::IRMetaData> ir_meta_data) throw ()
00073 : ir_md_ (ir_meta_data)
00074 {
00075 }
00076
00077 IRImage::~IRImage () throw ()
00078 {
00079 }
00080
00081 unsigned IRImage::getWidth () const throw ()
00082 {
00083 return ir_md_->XRes ();
00084 }
00085
00086 unsigned IRImage::getHeight () const throw ()
00087 {
00088 return ir_md_->YRes ();
00089 }
00090
00091 unsigned IRImage::getFrameID () const throw ()
00092 {
00093 return ir_md_->FrameID ();
00094 }
00095
00096 unsigned long IRImage::getTimeStamp () const throw ()
00097 {
00098 return static_cast<unsigned long> (ir_md_->Timestamp ());
00099 }
00100
00101 const xn::IRMetaData& IRImage::getMetaData () const throw ()
00102 {
00103 return *ir_md_;
00104 }
00105 }
00106 #endif //__OPENNI_IR_IMAGE__