From da89bce94257ccbd1a92dc7051517ec404f6f6b2 Mon Sep 17 00:00:00 2001 From: Jiaming Guo Date: Tue, 17 Jan 2017 15:56:54 -0600 Subject: [PATCH] fixed splitting bugs --- stim/biomodels/centerline.h | 2 +- stim/visualization/cylinder.h | 3 ++- stim/visualization/swc.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stim/biomodels/centerline.h b/stim/biomodels/centerline.h index 4b3b5bf..46d9369 100644 --- a/stim/biomodels/centerline.h +++ b/stim/biomodels/centerline.h @@ -149,7 +149,7 @@ public: //if the index is not an end point else{ - unsigned int N1 = idx; //calculate the size of both fibers + unsigned int N1 = idx + 1; //calculate the size of both fibers unsigned int N2 = N - idx; fl.resize(2); //set the array size to 2 diff --git a/stim/visualization/cylinder.h b/stim/visualization/cylinder.h index 12b21ac..50d8e8e 100644 --- a/stim/visualization/cylinder.h +++ b/stim/visualization/cylinder.h @@ -233,7 +233,7 @@ public: unsigned i = 0; C[0] = LL[0]; //C[0].R.resize(idx); - for (; i < idx; i++) { + for (; i < idx + 1; i++) { //for(unsigned d = 0; d < 3; d++) //C[0][i][d] = LL[0].c[i][d]; C[0].R[i] = R[i]; @@ -241,6 +241,7 @@ public: } if (C.size() == 2) { C[1] = LL[1]; + i--; //C[1].M.resize(N - idx); for (; i < N; i++) { //for(unsigned d = 0; d < 3; d++) diff --git a/stim/visualization/swc.h b/stim/visualization/swc.h index beaffe0..365aeca 100644 --- a/stim/visualization/swc.h +++ b/stim/visualization/swc.h @@ -96,7 +96,7 @@ namespace stim { // if the file is invalid, throw an error if (!infile) { - std::cerr << "STUN::SWC Error loading file" << filename << std::endl; + std::cerr << "STIM::SWC Error loading file" << filename << std::endl; exit(-1); } @@ -138,7 +138,7 @@ namespace stim { // if the file is invalid, throw an error if (!infile) { - std::cerr << "STUN::SWC Error loading file" << filename << std::endl; + std::cerr << "STIM::SWC Error loading file" << filename << std::endl; exit(1); } -- libgit2 0.21.4