From df480014be517aacc903e99bf78495068f69b988 Mon Sep 17 00:00:00 2001 From: pranathivemuri Date: Thu, 28 Jan 2016 03:56:59 -0600 Subject: [PATCH] added in comments the code to call resampling function --- stim/biomodels/network.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/stim/biomodels/network.h b/stim/biomodels/network.h index c210f54..63a6cd3 100644 --- a/stim/biomodels/network.h +++ b/stim/biomodels/network.h @@ -53,7 +53,7 @@ class network{ public: //std::vector edges; //indices of edges connected to this node. std::vector e[2]; //indices of edges going out (e[0]) and coming in (e[1]) - //stim::vec p; //position of this node in physical space. + //stim::vec p; //position of this node in physical space. //constructor takes a stim::vec vertex(stim::vec p) : stim::vec(p){} @@ -102,7 +102,7 @@ class network{ stim::obj O; //create an OBJ object O.load(filename); //load the OBJ file as an object - //grab each line in the OBJ object - these will be fibers + //prints each line in the obj file - vertex positions and fibers std::cout< id2vert; //this list stores the OBJ vertex ID associated with each network vertex @@ -115,7 +115,7 @@ class network{ std::vector< stim::vec > c; //allocate an array of points for the vessel centerline O.getLine(l, c); //get the fiber centerline - edge e(c); //create an edge from the given centerline + edge e = c; //create an edge from the given centerline //get the first and last vertex IDs for the line std::vector< unsigned > id; //create an array to store the centerline point IDs @@ -137,7 +137,7 @@ class network{ id2vert.push_back(i[0]); //add the ID to the ID->vertex conversion list } else{ //if the vertex already exists - V[it_idx].e[0].push_back(E.size()); //add the current edge as outgoing + V[it_idx].e[0].push_back(E.size()); //add the current edge as outgoing e.v[0] = it_idx; } @@ -151,10 +151,17 @@ class network{ id2vert.push_back(i[1]); //add the ID to the ID->vertex conversion list } else{ //if the vertex already exists - V[it_idx].e[1].push_back(E.size()); //add the current edge as incoming + V[it_idx].e[1].push_back(E.size()); //add the current edge as incoming e.v[1] = it_idx; } - + /*lines to be added for resampling each fiber in the network class + //std::vector< stim::vec > newFiberPos, fiberPos; + //fiberPos = e.centerline(); + //newFiberPos = e.Resample(fiberPos); + //edge newEdge = newFiberPos; + //E.push_back(newEdge); + */ + E.push_back(e); //push the edge to the list } -- libgit2 0.21.4