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