Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "frame_impl.hpp"
#include "image_impl.hpp"
#include <ftl/rgbd/frame.hpp>
#include <voltu/types/errors.hpp>
using voltu::internal::FrameImpl;
FrameImpl::FrameImpl()
{
}
FrameImpl::~FrameImpl()
{
}
std::list<voltu::ImagePtr> FrameImpl::getImageSet(voltu::Channel c)
{
std::list<voltu::ImagePtr> result;
ftl::codecs::Channel channel = ftl::codecs::Channel::Colour;
switch (c)
{
case voltu::Channel::kColour : channel = ftl::codecs::Channel::Colour; break;
case voltu::Channel::kDepth : channel = ftl::codecs::Channel::Depth; break;
default: throw voltu::exceptions::BadImageChannel();
}
for (const auto &fs : framesets_)
{
for (const auto &f : fs->frames)
{
if (f.hasChannel(channel))
{
auto img = std::make_shared<voltu::internal::ImageImpl>(
f.cast<ftl::rgbd::Frame>(), channel
);
result.push_back(img);
}
}
}
return result;
}
voltu::PointCloudPtr FrameImpl::getPointCloud(voltu::PointCloudFormat cloudfmt, voltu::PointFormat pointfmt)
{
return nullptr;
}
void FrameImpl::pushFrameSet(const std::shared_ptr<ftl::data::FrameSet> &fs)
{
framesets_.push_back(fs);
}
int64_t FrameImpl::getTimestamp()
{
return 0;
}