Commit da89bce94257ccbd1a92dc7051517ec404f6f6b2

Authored by Jiaming Guo
1 parent 62d95dcd

fixed splitting bugs

stim/biomodels/centerline.h
... ... @@ -149,7 +149,7 @@ public:
149 149 //if the index is not an end point
150 150 else{
151 151  
152   - unsigned int N1 = idx; //calculate the size of both fibers
  152 + unsigned int N1 = idx + 1; //calculate the size of both fibers
153 153 unsigned int N2 = N - idx;
154 154  
155 155 fl.resize(2); //set the array size to 2
... ...
stim/visualization/cylinder.h
... ... @@ -233,7 +233,7 @@ public:
233 233 unsigned i = 0;
234 234 C[0] = LL[0];
235 235 //C[0].R.resize(idx);
236   - for (; i < idx; i++) {
  236 + for (; i < idx + 1; i++) {
237 237 //for(unsigned d = 0; d < 3; d++)
238 238 //C[0][i][d] = LL[0].c[i][d];
239 239 C[0].R[i] = R[i];
... ... @@ -241,6 +241,7 @@ public:
241 241 }
242 242 if (C.size() == 2) {
243 243 C[1] = LL[1];
  244 + i--;
244 245 //C[1].M.resize(N - idx);
245 246 for (; i < N; i++) {
246 247 //for(unsigned d = 0; d < 3; d++)
... ...
stim/visualization/swc.h
... ... @@ -96,7 +96,7 @@ namespace stim {
96 96  
97 97 // if the file is invalid, throw an error
98 98 if (!infile) {
99   - std::cerr << "STUN::SWC Error loading file" << filename << std::endl;
  99 + std::cerr << "STIM::SWC Error loading file" << filename << std::endl;
100 100 exit(-1);
101 101 }
102 102  
... ... @@ -138,7 +138,7 @@ namespace stim {
138 138  
139 139 // if the file is invalid, throw an error
140 140 if (!infile) {
141   - std::cerr << "STUN::SWC Error loading file" << filename << std::endl;
  141 + std::cerr << "STIM::SWC Error loading file" << filename << std::endl;
142 142 exit(1);
143 143 }
144 144  
... ...