Program Listing for File OutputIOWrapper.h

Return to documentation for file (lib/IOWrapper/OutputIOWrapper.h)

#pragma once
#include <string>
#include <vector>

#include <opencv2/core/core.hpp>

#include "DataStructures/Frame.h"
#include "GlobalMapping/KeyFrameGraph.h"
#include "util/SophusUtil.h"

namespace lsd_slam
{

class OutputIOWrapper
{
public:
    virtual ~OutputIOWrapper() {};

    virtual void publishPose( const Sophus::Sim3f &pose ) = 0;

    virtual void publishKeyframeGraph( const std::shared_ptr<KeyFrameGraph> &graph) = 0;

    virtual void publishPointCloud( const Frame::SharedPtr &kf ) = 0;

    // publishes a keyframe. if that frame already exists, it is overwritten, otherwise it is added.
    virtual void publishKeyframe(const Frame::SharedPtr &kf) = 0;

    virtual void updateDepthImage(unsigned char * data) = 0 ;

    // published a tracked frame that did not become a keyframe (yet; i.e. has no depth data)
    virtual void publishTrackedFrame(const Frame::SharedPtr &kf) = 0;

    // publishes graph and all constraints, as well as updated KF poses.
    virtual void publishTrajectory(std::vector<Eigen::Matrix<float, 3, 1>> trajectory, std::string identifier) = 0;
    virtual void publishTrajectoryIncrement(Eigen::Matrix<float, 3, 1> pt, std::string identifier) = 0;

    virtual void publishDebugInfo(Eigen::Matrix<float, 20, 1> data) = 0;

    virtual void updateFrameNumber( int ) = 0;
    virtual void updateLiveImage( const cv::Mat &img ) = 0;

};
}