forked from SRaent/FiNTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.h
88 lines (69 loc) · 2.23 KB
/
node.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef NODE_H
#define NODE_H NODE_H
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
using namespace std;
using namespace cv;
class united_junction;
class node {
public:
vector<node*> neighbors;
vector<node*> connections;
vector<node*>* list;
vector<node**>* closures;
node* mother;
Mat* img;
Size s;
bool procreated;
double x;
double y;
double x_orig;
double y_orig;
united_junction* j;
node(double, double,vector<node*>*,Mat*);
node(double, double,vector<node*>*,vector<node**>*,Mat*);
node(double, double, node*);
~node();
bool connect(node*);
bool connect(node*,node*&);
void disconnect(node*);
void procreate(bool);
void procreate_hessian(bool);
void procreate_hessian_rate(bool);
bool repair_tight_closure(node*, unsigned long long, vector<node*>&);
vector<node*> find_worst_sect(const vector<vector<node*>>&);
// void procreate_hessian_intersect(bool);
bool connected(node*, unsigned long long);
bool connected(node*, node*, unsigned long long);
vector<node*> connecting_line(node*);
vector<node*> get_distant_connected(unsigned long long);
vector<node*> get_distant_connected(node*, unsigned long long);
vector<node*> get_all_distant_connected(unsigned long long);
vector<node*> get_all_distant_connected(node*, unsigned long long);
vector<node*> get_all_distant_connected(vector<node*>&, unsigned long long);
node* get_straight_distant_connected(node*, unsigned long long);
double score_connections(double,double,double);
void wiggle(unsigned long long, double);
vector<node*> unite_junctions(unsigned long long);
bool junction_in_steps(unsigned long long, node*);
bool junc_free_path(unsigned long long, node*, bool*);
bool is_in(vector<node*>);
bool is_in(vector<vector<node*>>);
bool is_in(vector<united_junction*>);
double brightness(Mat, unsigned long long, unsigned long long);
unsigned long long del_til_junc();
vector<node*> nodes_til_junc();
void nodes_til_junc(vector<node*>&);
void local_network(vector<node*>&);
vector<node*> local_network();
bool is_junc(unsigned long long);
bool scraggle(node*, unsigned long long);
};
#endif