Commit ee17b90b85ed02d46daf671d28522da6293f1ec7
1 parent
da89bce9
make it compatible on linux
Showing
5 changed files
with
22 additions
and
16 deletions
Show diff stats
stim/biomodels/network.h
@@ -71,7 +71,7 @@ class network{ | @@ -71,7 +71,7 @@ class network{ | ||
71 | /// Constructor - creates an edge from a list of points by calling the stim::fiber constructor | 71 | /// Constructor - creates an edge from a list of points by calling the stim::fiber constructor |
72 | 72 | ||
73 | ///@param p is an array of positions in space | 73 | ///@param p is an array of positions in space |
74 | - edge(centerline p) : cylinder<T>(p){} | 74 | + edge(stim::centerline<T> p) : cylinder<T>(p){} |
75 | 75 | ||
76 | /// Copy constructor creates an edge from a cylinder | 76 | /// Copy constructor creates an edge from a cylinder |
77 | edge(stim::cylinder<T> f) : cylinder<T>(f) {} | 77 | edge(stim::cylinder<T> f) : cylinder<T>(f) {} |
@@ -673,7 +673,7 @@ public: | @@ -673,7 +673,7 @@ public: | ||
673 | //compare each point in the current network to the field produced by A | 673 | //compare each point in the current network to the field produced by A |
674 | kdt.create(c, n_data, MaxTreeLevels); // build a KD tree | 674 | kdt.create(c, n_data, MaxTreeLevels); // build a KD tree |
675 | 675 | ||
676 | - std::vector<std::vector<unsigned>> relation; // the relationship between GT and T corresponding to NN | 676 | + std::vector<std::vector<unsigned> > relation; // the relationship between GT and T corresponding to NN |
677 | relation.resize(A.E.size()); | 677 | relation.resize(A.E.size()); |
678 | 678 | ||
679 | for(unsigned e = 0; e < A.E.size(); e++){ //for each edge in A | 679 | for(unsigned e = 0; e < A.E.size(); e++){ //for each edge in A |
stim/math/circle.h
@@ -35,6 +35,8 @@ public: | @@ -35,6 +35,8 @@ public: | ||
35 | using stim::plane<T>::rotate; | 35 | using stim::plane<T>::rotate; |
36 | using stim::plane<T>::setU; | 36 | using stim::plane<T>::setU; |
37 | 37 | ||
38 | + using stim::plane<T>::init; | ||
39 | + | ||
38 | ///base constructor | 40 | ///base constructor |
39 | ///@param th value of the angle of the starting point from 0 to 360. | 41 | ///@param th value of the angle of the starting point from 0 to 360. |
40 | CUDA_CALLABLE | 42 | CUDA_CALLABLE |
@@ -137,7 +139,7 @@ public: | @@ -137,7 +139,7 @@ public: | ||
137 | bool | 139 | bool |
138 | operator==(const circle<T> & rhs) | 140 | operator==(const circle<T> & rhs) |
139 | { | 141 | { |
140 | - if(P == rhs.P && U == rhs.U && Y == rhs.Y) | 142 | + if(P == rhs.P && U == rhs.U) |
141 | return true; | 143 | return true; |
142 | else | 144 | else |
143 | return false; | 145 | return false; |
stim/structures/kdtree.cuh
@@ -360,7 +360,7 @@ namespace stim { | @@ -360,7 +360,7 @@ namespace stim { | ||
360 | //bb.init(&h_reference_points[0]); | 360 | //bb.init(&h_reference_points[0]); |
361 | //aaboundingboxing<T, D>(bb, h_reference_points, reference_count); | 361 | //aaboundingboxing<T, D>(bb, h_reference_points, reference_count); |
362 | 362 | ||
363 | - std::vector < typename cpu_kdtree::point<T, D>> reference_points(reference_count); // restore the reference points in particular way | 363 | + std::vector < typename cpu_kdtree::point<T, D> > reference_points(reference_count); // restore the reference points in particular way |
364 | for (size_t j = 0; j < reference_count; j++) | 364 | for (size_t j = 0; j < reference_count; j++) |
365 | for (size_t i = 0; i < D; i++) | 365 | for (size_t i = 0; i < D; i++) |
366 | reference_points[j].dim[i] = h_reference_points[j * D + i]; // creating a tree on cpu | 366 | reference_points[j].dim[i] = h_reference_points[j * D + i]; // creating a tree on cpu |
stim/visualization/cylinder.h
@@ -11,6 +11,8 @@ namespace stim | @@ -11,6 +11,8 @@ namespace stim | ||
11 | template<typename T> | 11 | template<typename T> |
12 | class cylinder : public centerline<T> { | 12 | class cylinder : public centerline<T> { |
13 | protected: | 13 | protected: |
14 | + | ||
15 | + using stim::centerline<T>::d; | ||
14 | 16 | ||
15 | std::vector< stim::vec3<T> > U; //stores the array of U vectors defining the Frenet frame | 17 | std::vector< stim::vec3<T> > U; //stores the array of U vectors defining the Frenet frame |
16 | std::vector< T > R; //stores a list of magnitudes for each point in the centerline (assuming mags[0] is the radius) | 18 | std::vector< T > R; //stores a list of magnitudes for each point in the centerline (assuming mags[0] is the radius) |
@@ -36,23 +38,25 @@ public: | @@ -36,23 +38,25 @@ public: | ||
36 | 38 | ||
37 | using stim::centerline<T>::size; | 39 | using stim::centerline<T>::size; |
38 | using stim::centerline<T>::at; | 40 | using stim::centerline<T>::at; |
41 | + using stim::centerline<T>::L; | ||
42 | + using stim::centerline<T>::length; | ||
39 | 43 | ||
40 | - cylinder() : centerline(){} | ||
41 | - | ||
42 | - cylinder(centerline& c) : centerline(c) { | ||
43 | - init(); | ||
44 | - } | 44 | + cylinder() : centerline<T>(){} |
45 | 45 | ||
46 | - cylinder(centerline& c, T r) : centerline(c) { | 46 | + cylinder(centerline<T>c) : centerline<T>(c) { |
47 | init(); | 47 | init(); |
48 | - //add_mag(r); | ||
49 | } | 48 | } |
50 | 49 | ||
50 | + //cylinder(centerline<T>c, T r) : centerline(c) { | ||
51 | + // init(); | ||
52 | + // //add_mag(r); | ||
53 | + //} | ||
54 | + | ||
51 | //initialize a cylinder with a list of points and magnitude values | 55 | //initialize a cylinder with a list of points and magnitude values |
52 | - cylinder(centerline& c, std::vector<T> r) : centerline(c){ | ||
53 | - init(); | ||
54 | - //add_mag(r); | ||
55 | - } | 56 | + //cylinder(centerline<T>c, std::vector<T> r) : centerline(c){ |
57 | + // init(); | ||
58 | + // //add_mag(r); | ||
59 | + //} | ||
56 | 60 | ||
57 | //copy the original radius | 61 | //copy the original radius |
58 | void copy_r(std::vector<T> radius) { | 62 | void copy_r(std::vector<T> radius) { |
stim/visualization/swc.h
@@ -85,7 +85,7 @@ namespace stim { | @@ -85,7 +85,7 @@ namespace stim { | ||
85 | template <typename T> | 85 | template <typename T> |
86 | class swc { | 86 | class swc { |
87 | public: | 87 | public: |
88 | - std::vector< typename swc_tree::swc_node<T>> node; | 88 | + std::vector< typename swc_tree::swc_node<T> > node; |
89 | swc() {}; // default constructor | 89 | swc() {}; // default constructor |
90 | 90 | ||
91 | // load the swc as tree nodes | 91 | // load the swc as tree nodes |