forked from smistad/Tube-Segmentation-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobalCenterlineExtraction.hpp
More file actions
47 lines (40 loc) · 1.23 KB
/
Copy pathglobalCenterlineExtraction.hpp
File metadata and controls
47 lines (40 loc) · 1.23 KB
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
#ifndef GLOBAL_CENTERLINE_EXTRACTION_H
#define GLOBAL_CENTERLINE_EXTRACTION_H
#include "SIPL/Types.hpp"
#include <vector>
#include "tube-segmentation.hpp"
using namespace SIPL;
class CrossSection {
public:
int3 pos;
float TDF;
std::vector<CrossSection *> neighbors;
int label;
int index;
float3 direction;
};
class Connection;
class Segment {
public:
std::vector<CrossSection *> sections;
std::vector<Connection *> connections;
float benefit;
float cost;
int index;
};
class Connection {
public:
Segment * source;
Segment * target;
CrossSection * source_section;
CrossSection * target_section;
float cost;
};
std::vector<CrossSection *> createGraph(TubeSegmentation &T, SIPL::int3 size);
std::vector<Segment *> createSegments(OpenCL &ocl, TubeSegmentation &TS, std::vector<CrossSection *> &crossSections, SIPL::int3 size);
int selectRoot(std::vector<Segment *> segments);
int * createDepthFirstOrdering(std::vector<Segment *> segments, int root, int &Ns);
std::vector<Segment *> minimumSpanningTree(Segment * root, int3 size);
std::vector<Segment *> findOptimalSubtree(std::vector<Segment *> segments, int * depthFirstOrdering, int Ns);
void createConnections(TubeSegmentation &TS, std::vector<Segment *> segments, int3 size);
#endif