-
Notifications
You must be signed in to change notification settings - Fork 13
/
DataMgr.h
66 lines (51 loc) · 1.44 KB
/
DataMgr.h
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
61
62
63
64
65
66
#pragma once
#include "Algorithm/Skeleton.h"
#include "CMesh.h"
#include "GlobalFunction.h"
#include "Parameter.h"
#include <wrap/io_trimesh/export.h>
#include <wrap/io_trimesh/import.h>
#include <fstream>
#include <set>
#include <sstream>
using namespace vcg;
using namespace std;
using namespace tri;
class DataMgr
{
public:
DataMgr(RichParameterSet* _para);
~DataMgr(void);
void loadPlyToOriginal(QString fileName);
void loadPlyToSample(QString fileName);
void savePly(QString fileName, CMesh& mesh);
void loadImage(QString fileName);
void loadXYZN(QString fileName);
bool isSamplesEmpty();
bool isOriginalEmpty();
bool isSkeletonEmpty();
CMesh* getCurrentSamples();
CMesh* getCurrentOriginal();
Skeleton* getCurrentSkeleton();
void recomputeBox();
double getInitRadiuse();
void downSamplesByNum(bool use_random_downsample = true);
void subSamples();
void normalizeROSA_Mesh(CMesh& mesh);
Box3f normalizeAllMesh();
void eraseRemovedSamples();
void clearData();
void recomputeQuad();
void loadSkeletonFromSkel(QString fileName);
void saveSkeletonAsSkel(QString fileName);
private:
void clearCMesh(CMesh& mesh);
public:
CMesh original;
CMesh samples;
Skeleton skeleton;
// cv::Mat image;
RichParameterSet* para;
double init_radius;
QString curr_file_name;
};