#pragma once
#include "Algorithm.h"
#include "ZImage.h"
#include "CameraFrame.h"
#include "ActsFileParser.h"
#include "ParameterParser.h"
#include "../WmlMath/include/WmlMathLib.h"
#include <set>

namespace DFF_VideoMat
{



class CVideoReconstruction:public CAlgorithm
{
protected:
	//参数解析类对象
	CParameterParser m_parameterParser;
	//act解析类对象
	CActsFileParser m_actsParser;
	//相机参数
	std::vector<CCameraFrame> m_cameraFrames;

	std::string m_configFile;
	std::string m_colorImage_Path_Name;
	std::string m_depthImage_Path_Name;
	std::string m_reconstructPath;
	Eigen::Vector2i m_imgSize;
	static CVideoReconstruction* m_instance;


protected:
	CVideoReconstruction(const char* configfile);
	virtual ~CVideoReconstruction();

	//加载深度图
	ZFloatImage LoadDepthImage(int index);
	//加载RGB图
	ZByteImage LoadColorImage(int index);
	//重建程序
	bool Reconstruction();
	//点云采样和融合
	bool PointCloudReconstruct();
	//模型表面网格提取
	bool MeshReconstruct();
	
public:
	//获取重建程序对象的唯一接口
	static CVideoReconstruction* GetInstance(const char* configfile);
	//初始化函数
	virtual bool Init();
	//执行重建程序的外部接口
	virtual bool Execute();




};
}