openni_ir_image.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011 Willow Garage, Inc.
5  * Patrick Mihelich <mihelich@willowgarage.com>
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 #ifndef __OPENNI_IR_IMAGE__
38 #define __OPENNI_IR_IMAGE__
39 
40 #include <XnCppWrapper.h>
41 #include "openni_exception.h"
42 #include <boost/shared_ptr.hpp>
43 
44 namespace openni_wrapper
45 {
46 
50 class IRImage
51 {
52 public:
55 
56  inline IRImage (boost::shared_ptr<xn::IRMetaData> ir_meta_data) throw ();
57  inline virtual ~IRImage () throw ();
58 
59  void fillRaw (unsigned width, unsigned height, unsigned short* ir_buffer, unsigned line_step = 0) const throw (OpenNIException);
60 
61  inline unsigned getWidth () const throw ();
62  inline unsigned getHeight () const throw ();
63  inline unsigned getFrameID () const throw ();
64  inline unsigned long getTimeStamp () const throw ();
65  inline const xn::IRMetaData& getMetaData () const throw ();
66 
67 protected:
68  boost::shared_ptr<xn::IRMetaData> ir_md_;
69 };
70 
71 IRImage::IRImage (boost::shared_ptr<xn::IRMetaData> ir_meta_data) throw ()
72 : ir_md_ (ir_meta_data)
73 {
74 }
75 
76 IRImage::~IRImage () throw ()
77 {
78 }
79 
80 unsigned IRImage::getWidth () const throw ()
81 {
82  return ir_md_->XRes ();
83 }
84 
85 unsigned IRImage::getHeight () const throw ()
86 {
87  return ir_md_->YRes ();
88 }
89 
90 unsigned IRImage::getFrameID () const throw ()
91 {
92  return ir_md_->FrameID ();
93 }
94 
95 unsigned long IRImage::getTimeStamp () const throw ()
96 {
97  return ir_md_->Timestamp ();
98 }
99 
100 const xn::IRMetaData& IRImage::getMetaData () const throw ()
101 {
102  return *ir_md_;
103 }
104 } // namespace
105 #endif //__OPENNI_IR_IMAGE__
void fillRaw(unsigned width, unsigned height, unsigned short *ir_buffer, unsigned line_step=0) const
unsigned getFrameID() const
IRImage(boost::shared_ptr< xn::IRMetaData > ir_meta_data)
General exception class.
unsigned getWidth() const
const xn::IRMetaData & getMetaData() const
boost::shared_ptr< const IRImage > ConstPtr
boost::shared_ptr< xn::IRMetaData > ir_md_
unsigned long getTimeStamp() const
boost::shared_ptr< IRImage > Ptr
unsigned getHeight() const
Class containing just a reference to IR meta data.


openni_camera
Author(s): Patrick Mihelich, Suat Gedikli, Radu Bogdan Rusu
autogenerated on Wed Jun 5 2019 20:15:22