From 1a1b4359da0c60c6528715a9d63eb63850c8cacb Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Mon, 30 Sep 2019 08:42:27 +0300 Subject: [PATCH] Allow remote enable disable of ilw --- applications/reconstruct/src/ilw/ilw.cpp | 6 ++++++ applications/reconstruct/src/ilw/ilw.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/applications/reconstruct/src/ilw/ilw.cpp b/applications/reconstruct/src/ilw/ilw.cpp index 121ee2f00..737a67d38 100644 --- a/applications/reconstruct/src/ilw/ilw.cpp +++ b/applications/reconstruct/src/ilw/ilw.cpp @@ -14,7 +14,11 @@ using ftl::rgbd::Format; using cv::cuda::GpuMat; ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) { + enabled_ = value("ilw_align", true); + on("ilw_align", [this](const ftl::config::Event &e) { + enabled_ = value("ilw_align", true); + }); } ILW::~ILW() { @@ -22,6 +26,8 @@ ILW::~ILW() { } bool ILW::process(ftl::rgbd::FrameSet &fs, cudaStream_t stream) { + if (!enabled_) return false; + _phase0(fs, stream); //for (int i=0; i<2; ++i) { diff --git a/applications/reconstruct/src/ilw/ilw.hpp b/applications/reconstruct/src/ilw/ilw.hpp index 5dbcdb733..06a8f0d23 100644 --- a/applications/reconstruct/src/ilw/ilw.hpp +++ b/applications/reconstruct/src/ilw/ilw.hpp @@ -59,6 +59,7 @@ class ILW : public ftl::Configurable { bool _phase2(ftl::rgbd::FrameSet &fs, float rate, cudaStream_t stream); std::vector<detail::ILWData> data_; + bool enabled_; }; } -- GitLab