Core classes


class Branch

class Branch
  : public neurostr::WithProperties

Summary

Members Descriptions
public Branch() Default constructor.
public Branch(const id_type & id,int order) Creates a branch with given id and order.
public Branch(const id_type & id,int order,constNode& root) Creates a branch with given id,order and root.
public Branch(const id_type & id,int order,constNode& root,const std::vector<Node> & nodes) Creates a branch with given id,order, root and nodes.
public template<typename Iter>
inline Branch(const id_type & id,int order,constNode& root,const Iter & b,const Iter & e)
Creates a branch with given id,order, root and nodes.
public inline ~Branch() Empty destructor.
public Branch(constBranch& b) = delete Copy constructor is not allowed.
publicBranch& operator=(constBranch& b) = delete Copy assign is not allowed.
public Branch(Branch&& b) = default Default move constructor.
publicBranch& operator=(Branch&& b) = default Defaul move assign.
public inline int order() const Centrifugal order accessor.
public inline const id_type & id() const ID accessor.
public std::string idString() const Returns Branch ID as a string.
public inline bool valid_neurite() const Branch neurite reference validity check.
public constNeurite& neurite() const Branch parent neurite.
publicNeurite& neurite() Branch parent neurite.
publicBranch& id(const id_type & id) Set branch id.
publicBranch& order(int o) Set branch centrifugal order.
publicBranch& neurite(Neurite* n) Set branch parent neurite.
public inline void root(constNode& n) Copy a node as new root.
public inline void remove_root() Removes the current root.
public inline void root(Node&& n) Move a node as new root.
public inline bool operator==(constBranch& b) const Compares two branches by their ID.
public inline bool operator!=(constBranch& b) const Compares two branches by their ID.
public inline size_type size() const Number of nodes in the b.
public inline bool has_root() const Branch root validity check.
public constNode& root() const Get root node reference.
publicNode& root() Get root node reference.
public constNode& first() const Returns branch first node.
public constNode& last() const Returns branch last node.
publicNode& first() Returns branch first node.
publicNode& last() Returns branch last node.
public point_type director_vector() const Returns vector from the first node of the branch to the last.
public template<typename T>
inline auto add_property(const std::string & key,T value,bool recursive)
Adds a property to the branch and optionally to its nodes.
public inline auto add_property(const std::string & key,bool recursive) Adds an empty property to the branch and optionally to its nodes.
public inline iterator begin() Begin node iterator (indirect iterator)
public inline iterator end() End node iterator (indirect iterator)
public inline reverse_iterator rbegin() Reverse begin node iterator (indirect iterator)
public inline reverse_iterator rend() Reverse end node iterator (indirect iterator)
public inline const_iterator begin() const Begin node iterator (indirect iterator)
public inline const_iterator end() const End node iterator (indirect iterator)
public inline const_reverse_iterator rbegin() const Reverse begin node iterator (indirect iterator)
public inline const_reverse_iterator rend() const Reverse end node iterator (indirect iterator)
public inline const_iterator cbegin() const Begin const node iterator (indirect iterator)
public inline const_iterator cend() const End const node iterator (indirect iterator)
public void push_back(constNode& n) Copy a node to the end of the branch.
public void push_back(Node&& n) Move a node to the end of the branch.
public iterator insert(iterator pos,constNode& n) Copies the given node at the position.
public template<typename Iter>
inline void insert(iterator pos,Iter b,Iter e)
Copies a range of nodes into the branch.
public iterator erase(const iterator & pos) Deletes a node in the branch.
public iterator erase(const iterator & first,const iterator & last) Deletes a range of nodes in the branch.
public inline void clear() Deletes all nodes in the brnach.
publicBranchsplit(const iterator & pos) Divides the branch at given position and creates a new branch.
public void simplify(float eps) Applies RDF simplification to the branch nodes.
public void scale(float r) Scales the branch wrt root by r (>1 bigger, <1 smaller)
public void normalize() Scales the branch so its length is equal to 1.
public void scale(float rx,float ry,float rz) Scales branch (including root)
public float length() const Computes branch path length.
public void traslate(const point_type & p) Moves the branch (root included) by the vector p.
public void rotate(const Eigen::Quaternionf & q) Rotates the branch (Root included) aplying the quaternion q.
public void remove_null_segments() Removes zero-length segments in the branch.
public float discrete_frechet(constBranch& other) const Computes the frechet distance between two branche s.
public float distance(constBranch& other,bool ignore_radius) const Computes the distance between both branches.
public void set_nodes_branch() Updates branch memeber in all nodes.
public box_type boundingBox() const Gets bounding box.

Members

public Branch()

Default constructor.

creates a branch with order -1 and empty id

Returns

Branch


public Branch(const id_type & id,int order)

Creates a branch with given id and order.

Parameters

Returns

Branch


public Branch(const id_type & id,int order,constNode& root)

Creates a branch with given id,order and root.

Parameters

  • id Branch id

  • order Centrifugal order

  • root Branch root node

Returns

Branch


public Branch(const id_type & id,int order,constNode& root,const std::vector<Node> & nodes)

Creates a branch with given id,order, root and nodes.

Parameters

Returns

Branch


public template<typename Iter>
inline Branch(const id_type & id,int order,constNode& root,const Iter & b,const Iter & e)

Creates a branch with given id,order, root and nodes.

Parameters

  • id Branch id

  • order Centrifugal order

  • root Branch root node

  • b Node begin iterator

  • e Node end iterator

Returns

Branch


public inline ~Branch()

Empty destructor.


public Branch(constBranch& b) = delete

Copy not allowed.

DELETED


publicBranch& operator=(constBranch& b) = delete

Copy not allowed.

DELETED


public Branch(Branch&& b) = default

Default move constructor.


publicBranch& operator=(Branch&& b) = default

Defaul move assign.


public inline int order() const

Centrifugal order accessor.

Returns

Centrifugal order


public inline const id_type & id() const

Returns the Branch ID as a vector of integers.

Returns

Branch Id


public std::string idString() const

Returns Branch ID as a string.

Returns

ID as string


public inline bool valid_neurite() const

Branch neurite reference validity check.

Returns

True if the Neurite reference is valid


public constNeurite& neurite() const

Branch parent neurite.

Returns

Parent Neurite reference


publicNeurite& neurite()

Branch parent neurite.

Returns

Parent neurite reference


publicBranch& id(const id_type & id)

Set branch id.

Parameters

  • id new id

Returns

Updated branch reference


publicBranch& order(int o)

Set branch centrifugal order.

Parameters

  • o new centrifugal order

Returns

Update branch reference


publicBranch& neurite(Neurite* n)

Set branch parent neurite.

Parameters

Returns

Update branch reference


public inline void root(constNode& n)

Copy a node as new root.

Parameters

  • n node to copy

public inline void remove_root()

Removes the current root.


public inline void root(Node&& n)

Move a node as new root.

Parameters

  • n node to move

public inline bool operator==(constBranch& b) const

Compares two branches by their ID.

Parameters

Returns

True if two ids are equal


public inline bool operator!=(constBranch& b) const

Compares two branches by their ID.

Parameters

Returns

True if two ids are NOT equal


public inline size_type size() const

Number of nodes in the b.

Returns

Branch size


public inline bool has_root() const

Branch root validity check.

Returns

True/False


public constNode& root() const

Get root node reference.

Throws

  • runtime_error Attempt to access nullptr reference

Returns

Root node reference


publicNode& root()

Get root node reference.

Throws

  • runtime_error Attempt to access nullptr reference

Returns

Root node reference


public constNode& first() const

Returns branch first node.

Throws

  • runtime_error Attempt to access empty branch

Returns

Node reference


public constNode& last() const

Returns branch last node.

Throws

  • runtime_error Attempt to access empty branch

Returns

Node reference


publicNode& first()

Returns branch first node.

Throws

  • runtime_error Attempt to access empty branch

Returns

Node reference


publicNode& last()

Returns branch last node.

Throws

  • runtime_error Attempt to access empty branch

Returns

Node reference


public point_type director_vector() const

Returns vector from the first node of the branch to the last.

Returns

Vector


public template<typename T>
inline auto add_property(const std::string & key,T value,bool recursive)

Adds a property to the branch and optionally to its nodes.

Parameters

  • key Property name

  • value Property value

  • recursive If true, property is also added to branch nodes

Returns

Iterator to added property


public inline auto add_property(const std::string & key,bool recursive)

Adds an empty property to the branch and optionally to its nodes.

Parameters

  • key Property name

  • recursive If true, property is also added to branch nodes

Returns

Iterator to added property


public inline iterator begin()

Begin node iterator (indirect iterator)

Returns

Indirect iterator


public inline iterator end()

End node iterator (indirect iterator)

Returns

Indirect iterator


public inline reverse_iterator rbegin()

Reverse begin node iterator (indirect iterator)

Returns

Indirect iterator


public inline reverse_iterator rend()

Reverse end node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_iterator begin() const

Begin node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_iterator end() const

End node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_reverse_iterator rbegin() const

Reverse begin node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_reverse_iterator rend() const

Reverse end node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_iterator cbegin() const

Begin const node iterator (indirect iterator)

Returns

Indirect iterator


public inline const_iterator cend() const

End const node iterator (indirect iterator)

Returns

Indirect iterator


public void push_back(constNode& n)

Copy a node to the end of the branch.

Parameters


public void push_back(Node&& n)

Move a node to the end of the branch.

Parameters


public iterator insert(iterator pos,constNode& n)

Copies the given node at the position.

Parameters

  • pos Position to insert

  • n Node

Returns

Updated iterator


public template<typename Iter>
inline void insert(iterator pos,Iter b,Iter e)

Copies a range of nodes into the branch.

Parameters

  • pos Insert position

  • b Range begin iterator

  • e Range end iterator

public iterator erase(const iterator & pos)

Deletes a node in the branch.

Parameters

  • pos Position to delete

Returns

Updated iterator


public iterator erase(const iterator & first,const iterator & last)

Deletes a range of nodes in the branch.

Parameters

  • first first position to delete

  • last last position to delete

Returns

Updated iterator


public inline void clear()

Deletes all nodes in the branch.


publicBranchsplit(const iterator & pos)

Divides the branch at given position and creates a new branch.

Parameters

  • pos Split position

Returns

Split branch


public void simplify(float eps)

Applies RDF simplification to the branch nodes.

Root and last are always keeped

Parameters

  • eps RDF algorithm epsilon parameter (tolerance). If eps is <0 is used as a relative tolerance to the node radius

public void scale(float r)

Scales the branch wrt root by r (>1 bigger, <1 smaller)

Parameters

  • r Scale rate

public void normalize()

Scales the branch so its length is equal to 1.


public void scale(float rx,float ry,float rz)

Scales branch (including root)

Parameters

  • rx x-axis scale

  • ry y-axis scale

  • rz z-axis scale

public float length() const

Computes branch path length.

Returns

branch length


public void traslate(const point_type & p)

Moves the branch (root included) by the vector p.

Parameters

  • p Translation vector

public void rotate(const Eigen::Quaternionf & q)

Rotates the branch (Root included) aplying the quaternion q.

Parameters

  • q rotation quaternion

public void remove_null_segments()

Removes zero-length segments in the branch.


public float discrete_frechet(constBranch& other) const

Computes the Discrete Frechet distance between two branches.

Parameters

Returns

Discrete frechet distance


public float distance(constBranch& other,bool ignore_radius) const

Computes the distance between both branches.

Ignores nodes shared by both branches

Parameters

  • other

Returns

euclidean distance


public void set_nodes_branch()

Updates branch memeber in all nodes.


public box_type boundingBox() const

Gets bounding box.


class Neurite

class Neurite
  : public neurostr::WithProperties

Summary

Members Descriptions
classconst_node_iterator
classnode_iterator
classstem_iterator
public Neurite() Empty neurite constructor.
public Neurite(int id) Create a neurite with given id and type undefined.
public Neurite(int id,constNeuriteType& t) Create a neurite with given id and type.
public Neurite(constNeurite& n) = default Default copy constructor.
public Neurite(Neurite&& n) = default Default move constructor.
publicNeurite& operator=(constNeurite& n) = default Default copy assign.
publicNeurite& operator=(Neurite&& n) = default Default move assign.
public inline ~Neurite() Empty destructor (Default)
public inline bool operator==(constNeurite& n) const Compares two neurites by ID.
public inline bool operator!=(constNeurite& n) const Compares two neurites by ID.
public inline constNeuriteType& type() const Return neurite type.
public inline const int id() const Returns neurite id.
public inline bool root_is_soma() const Checks if root is soma.
public inlineNeuron& neuron() const Return neurite parent neuron reference.
public inline void type(constNeuriteType& t) Set neurite type.
public inline void id(int id) Set neurite ID.
public inline void neuron(Neuron*const n) Set neurite parent neuron pointer.
public inline bool has_root() const Checks if the root branch of the neurite has root.
public inline constNode& root() const Get root reference.
public void set_root() Sets an empt branch as the root branch without root node.
public void set_root(constNode& node) Creates an empty branch with node as root as root branch.
public int max_centrifugal_order() const Get neurite max c.order.
public inline int size() const Neurite size (branch count)
public int node_count() const Neurite node count.
public template<typename T>
inline auto add_property(const std::string & key,T v,bool recursive)
Adds a property to the neurite and optionally to its branches.
public inline auto add_property(const std::string & key,bool recursive) Adds an empty property to the neurite and optionally to its branches.
public inline branch_iterator begin_branch() const Begin DFS branch iterator.
public inline branch_iterator end_branch() const End DFS branch iterator.
public inline branch_iterator begin_branch_subtree(const typename tree_type::iterator_base & other) const Creates a branch DFS iterator over the subtree of the branch pointed by €{other}.
public branch_iterator end_branch_subtree(const typename tree_type::iterator_base & other) const Creates a branch DFS iterator over the subtree of the branch pointed by €{other}.

Members

public Neurite()

Empty neurite constructor.

Id -1 and type undefined

Returns

Neurite


public Neurite(int id)

Create a neurite with given id and type undefined.

Parameters

Returns

Neurite


public Neurite(int id,constNeuriteType& t)

Create a neurite with given id and type.

Parameters

Returns

Neurite


public Neurite(constNeurite& n) = default

Default copy constructor.


public Neurite(Neurite&& n) = default

Default move constructor.


publicNeurite& operator=(constNeurite& n) = default

Default copy assign.


publicNeurite& operator=(Neurite&& n) = default

Default move assign.


public inline ~Neurite()

Empty destructor (Default)


public inline bool operator==(constNeurite& n) const

Compares two neurites by ID.

Parameters

  • n Other neurite

Returns

True if ids match


public inline bool operator!=(constNeurite& n) const

Compares two neurites by ID.

Parameters

  • n Other neurite

Returns

True if ids dont match


public inline constNeuriteType& type() const

Return neurite type.

Returns

NeuriteType


public inline const int id() const

Returns neurite id.

Returns

Neurite ID


public inline bool root_is_soma() const

Checks if root is soma.

Returns

True if neurite root is soma


public inlineNeuron& neuron() const

Return neurite parent neuron reference.

Returns

Neuron reference


public inline void type(constNeuriteType& t)

Set neurite type.

Parameters

  • t New neurite type

public inline void id(int id)

Set neurite ID.

Parameters

  • id New neurite ID

public inline void neuron(Neuron*const n)

Set neurite parent neuron pointer.

Parameters

  • n Nueron pointer

public inline bool has_root() const

Checks if the root branch of the neurite has root.

Returns

True if the neurite is rooted (i.e. attached to soma)


public inline constNode& root() const

Get root reference.

Returns

Root reference


public void set_root()

Sets an empt branch as the root branch without root node.


public void set_root(constNode& node)

Creates an empty branch with node as root as root branch.

Parameters

  • node Root node

public int max_centrifugal_order() const

Get neurite max c.order.

Returns

Centrifugal order


public inline int size() const

Neurite size (branch count)

Returns

Number of branches in the neurite


public int node_count() const

Neurite node count.

Returns

Number of distinct node ins the neurite (roots excluded)


public template<typename T>
inline auto add_property(const std::string & key,T v,bool recursive)

Adds a property to the neurite and optionally to its branches.

Parameters

  • key Property key

  • v Property value

  • recursive If true, property is also added to braches and nodes

public inline auto add_property(const std::string & key,bool recursive)

Adds an empty property to the neurite and optionally to its branches.

Parameters

  • key Property key

  • recursive If true, property is also added to braches and nodes

public inline branch_iterator begin_branch() const

Begin DFS branch iterator.

Returns

branch_iterator


public inline branch_iterator end_branch() const

End DFS branch iterator.

Returns

branch_iterator


public inline branch_iterator begin_branch_subtree(const typename tree_type::iterator_base & other) const

Creates a branch DFS iterator over the subtree of the branch pointed by €{other}.

Parameters

Returns

DFS branch iterator


public branch_iterator end_branch_subtree(const typename tree_type::iterator_base & other) const

Creates a branch DFS iterator over the subtree of the branch pointed by €{other}.

Parameters

Returns

DFS branch iterator


class node_iterator

class node_iterator
  : public boost::iterator_facade< node_iterator< iter >, Node, std::iterator_traits< iter >::iterator_category >

Template iterator that references directly to the nodes in the tree. The template parameter Iter, a branch iterator, determines tree-visitor strategy.

Summary

Members Descriptions
public node_iterator() Empty constructor.
public node_iterator(const iter & b,const iter & e) Creates a node iterator that starts at the first node of b and ends at the first node of e.
public node_iterator(const iter & b,const iter & e,const iter & c) Creates a node iterator that starts at the first node of b and ends at the first node of e.
public node_iterator(const iter & b,const iter & e,const iter & c,const typename Branch::iterator & nodeit) Creates a node iterator that starts at the first node of b and ends at the first node of e.
public node_iterator(constnode_iterator< iter > &) = default Default copy constructor.
publicnode_iterator& operator=(constnode_iterator< iter > &) = default Default copy assign.
public node_iterator(node_iterator< iter > &&) = default Default move constructor.
publicnode_iterator& operator=(node_iterator< iter > &&) = default Default move assign.
public iter begin() const Get iterator first branch.
public iter end() const Get iterator last branch.
public iter current() const Get iterator current branch.
public iter branch() const Get iterator current branch.
public Branch::iterator node() const Get iterator current noe.
publicNeurite& neurite() const Get current branch neurite.
publicNeuron& neuron() const Get current branch neuron.
publicnode_iterator< iter > last() const Get an iterator to the end node.
publicnode_iterator< iter > first() const Get an iterator to the first node.

Members

public node_iterator()

Empty constructor.

Returns

Node iterator


public node_iterator(const iter & b,const iter & e)

Creates a node iterator that starts at the first node of b and ends at the first node of e.

Parameters

  • b First branch

  • e Last branch

Returns

Node iterator


public node_iterator(const iter & b,const iter & e,const iter & c)

Creates a node iterator that starts at the first node of b and ends at the first node of e.

Current node is the first node of c.

Parameters

  • b First branch

  • e Last branch

  • c Current branch

Returns

Node iterator


public node_iterator(const iter & b,const iter & e,const iter & c,const typename Branch::iterator & nodeit)

Creates a node iterator that starts at the first node of b and ends at the first node of e.

Current node is the nodeit node of c.

Parameters

  • b First branch

  • e Last branch

  • c Current branch

  • nodeit Current node

Returns

Node iterator


public node_iterator(constnode_iterator< iter > &) = default

Default copy constructor.


publicnode_iterator& operator=(constnode_iterator< iter > &) = default

Default copy assign.


public node_iterator(node_iterator< iter > &&) = default

Default move constructor.


publicnode_iterator& operator=(node_iterator< iter > &&) = default

Default move assign.


public iter begin() const

Get iterator first branch.

Returns

First branch


public iter end() const

Get iterator last branch.

Returns

Last branch


public iter current() const

Get iterator current branch.

Returns

Current branch


public iter branch() const

Get iterator current branch.

Returns

Current branch


public Branch::iterator node() const

Get iterator current noe.

Returns

Current node


publicNeurite& neurite() const

Get current branch neurite.

Returns

Neurite reference


publicNeuron& neuron() const

Get current branch neuron.

Returns

Neuron reference


publicnode_iterator< iter > last() const

Get an iterator to the end node.

Returns

End node iterator


publicnode_iterator< iter > first() const

Get an iterator to the first node.

Returns

First node iterator


class stem_iterator

class stem_iterator
  : public iterator_base

Tree iterator (Actually a forward iterator) that ascends from the given tree node to the root.

Summary

Members Descriptions
public stem_iterator() Empty constructor.
public stem_iterator(tree_node * tn) Creates an stem iterator that points to tn.
public stem_iterator(const typename tree_type::iterator_base & other) Copies the given iterator as stem iterator.
public bool operator==(conststem_iterator& other) const Equality operator (compares two iterators)
public bool operator!=(conststem_iterator& other) const Inequality operator (compares two iterators)
publicstem_iterator& operator++() Stem iterator single step - ascend one branch.
publicstem_iteratoroperator++(int) Stem iterator single step - ascend one branch.
publicstem_iterator& operator+=(unsigned int num) Stem iterator multi step - ascend num branches.

Members

public stem_iterator()

Empty constructor.

Returns

Default iterator (actually, useless)


public stem_iterator(tree_node * tn)

Creates an stem iterator that points to tn.

Parameters

  • tn Tree node pointer

Returns

Stem iterator


public stem_iterator(const typename tree_type::iterator_base & other)

Copies the given iterator as stem iterator.

Parameters

  • other Iterator

Returns

Copied stem iterator


public bool operator==(conststem_iterator& other) const

Equality operator (compares two iterators)

Parameters

  • other The other stem iterator

Returns

True if they both point to the same node


public bool operator!=(conststem_iterator& other) const

Inequality operator (compares two iterators)

Parameters

  • other The other stem iterator

Returns

True if they both dont point to the same node


publicstem_iterator& operator++()

Stem iterator single step - ascend one branch.

Returns

Updated iterator


publicstem_iteratoroperator++(int)

Stem iterator single step - ascend one branch.

Returns

new updated iterator


publicstem_iterator& operator+=(unsigned int num)

Stem iterator multi step - ascend num branches.

Returns

Updated iterator


class Contour

Summary

Members Descriptions
public Contour() Contour empty constructor.
public Contour(const std::vector< point_type > & v) Creates a contour from a point vector.
public Contour(constContour&) = default Copy constructor.
publicContour& operator=(constContour&) = default Copy assign.
public Contour(Contour&&) = default Move constructor.
publicContour& operator=(Contour&&) = default Move assign.
public iterator begin() Returns an iterator to the first point in the contour.
public const_iterator begin() const Returns an iterator to the first point in the contour.
public iterator end() Returns an iterator to the next position after the last point in the contour.
public const_iterator end() const Returns an iterator to the next position after the last point in the contour.
public std::size_t size() const Contour size.
public float length() const Computes the length of the contour.
public float area(int component) const Contour planar area as 2D projection in the given component.
public const std::string & name() const Returns contour name.
public void name(const std::string & n) Set contour name.
public const std::string & face_color() const Returns contour face color.
public const std::string & back_color() const Returns contour back color.
public void face_color(const std::string & s) Set contour face color.
public void back_color(const std::string & s) Set contour back color.
public float fill_density() const Return contour fill density (alpha channel)
public void fill_density(float f) Set fill density value.
public float resolution() const Contour resolution (im not sure what this actually is..like a ratio?)
public void resolution(float f) Set resolution value.
public bool is_closed() const True if the contour is defined as closed.
public void properties_from_map(constPropertyMap& p) Set all contour properties getting them from a p.
public float closing_gap() const Distance between the last and the first point in the contour.
public void close() Mark the contour as closed (add a segment bw the last and the first)
public int planar_axis() const Cehcks if the contour is planar for some axis.
public std::pair< float, float > range(int component) const Computes min and max values for the given component (0,1,2 x,y,z)
public std::vector<geometry::planar_point> planar_projection(int component) const Returns the contour points removing the ith component.
public bool clockwise_oriented(int i) const Checks if the contour points are clockwise ordered (shoelace formula applied)
public void reverse() Reverses the contour point order.
public void rotate(iterator new_first) Rotates the contour (if it is closed) so the point pointed by new_first becomes the new first point.
public point_type barycenter() const Computes contour barycenter.

Members

public Contour()

Contour empty constructor.

Initializes all members to its default value and leaves the contour as empty


public Contour(const std::vector< point_type > & v)

Creates a contour from a point vector.

Parameters


public Contour(constContour&) = default

Copy constructor.


publicContour& operator=(constContour&) = default

Copy assign.


public Contour(Contour&&) = default

Move constructor.


publicContour& operator=(Contour&&) = default

Move assign.


public iterator begin()

Returns an iterator to the first point in the contour.

Returns

point iterator


public const_iterator begin() const

Returns an iterator to the first point in the contour.

Returns

const point iterator


public iterator end()

Returns an iterator to the next position after the last point in the contour.

Returns

point iterator


public const_iterator end() const

Returns an iterator to the next position after the last point in the contour.

Returns

const point iterator


public std::size_t size() const

Contour size.

Returns

number of points that describe the contour


public float length() const

Computes the length of the contour.

Returns

Contour length


public float area(int component) const

Contour planar area as 2D projection in the given component.

Parameters

  • component Component that is ignored to compute the area

Returns

Contour planar area


public const std::string & name() const

Returns contour name.

Returns

Contour name as string


public void name(const std::string & n)

Set contour name.

Parameters

  • n The new contour name

public const std::string & face_color() const

Returns contour face color.

Returns

Color as hex string #RRGGBB


public const std::string & back_color() const

Returns contour back color.

Returns

Color as hex string #RRGGBB


public void face_color(const std::string & s)

Set contour face color.

Parameters

  • s Hex-string color. e.g. #FFFFFF

public void back_color(const std::string & s)

Set contour back color.

Parameters

  • s Hex-string color. e.g. #FFFFFF

public float fill_density() const

Return contour fill density (alpha channel)

Returns

Alpha (opacity) value


public void fill_density(float f)

Set fill density value.

Parameters

  • f Contour fill opacity. Between 0 and 1.

public float resolution() const

Contour resolution (im not sure what this actually is..like a ratio?)

Returns

Resolution as float


public void resolution(float f)

Set resolution value.

Parameters

  • f resolution value. Actual meaning is unknown.

public bool is_closed() const

True if the contour is defined as closed.

Returns

boolean flag


public void properties_from_map(constPropertyMap& p)

Set all contour properties getting them from a p.

map

Parameters

  • p input Property map

public float closing_gap() const

Distance between the last and the first point in the contour.

Returns

Closing gap distance


public void close()

Mark the contour as closed (add a segment bw the last and the first)


public int planar_axis() const

Cehcks if the contour is planar for some axis.

Returns

-1 is not planar, 0,1,2 x,y,z are constant respectively


public std::pair< float, float > range(int component) const

Computes min and max values for the given component (0,1,2 x,y,z)

Parameters

  • component Contour component index (0,1,2 <-> x,y,z)

Returns

Pair (min,max)


public std::vector<geometry::planar_point> planar_projection(int component) const

Returns the contour points removing the ith component.

Parameters

  • component Index of component to remove

Returns

Planar points


public bool clockwise_oriented(int i) const

Checks if the contour points are clockwise ordered (shoelace formula applied)

Parameters

  • i component index (0,1,2 <-> x,y,z) that is ignored to compute the orientation

Returns

True if clockwise ordered


public void reverse()

Reverses the contour point order.


public void rotate(iterator new_first)

Rotates the contour (if it is closed) so the point pointed by new_first becomes the new first point.

Parameters

  • new_first Point to become the first point

public point_type barycenter() const

Computes contour barycenter.

Returns

Barycenter


class Neuron

class Neuron
  : public neurostr::WithProperties

Summary

Members Descriptions
public Neuron() Empty constructor.
public Neuron(const std::string & id) Create a neuron with given id, and no neurites nor soma.
public Neuron(const std::string & id,const std::vector<Node> & soma) Creates a neuron with given id and soma nodes.
public inline ~Neuron() Default destructor.
public Neuron(constNeuron&) = delete Deleted.
publicNeuron& operator=(constNeuron&) = delete Deleted.
public Neuron(Neuron&&) = default Default implementation.
publicNeuron& operator=(Neuron&&) = default Default implementation.
public inline const std::string & id() const Get neuron id string.
public inline const point_type & up() const Get neuron Up vector.
public void up(const point_type & up) Set neuron up vector.
public inline int size() const Count number of neurites.
public int node_count() const Number of different nodes in the neuron.
public neurite_iterator add_neurite(Neurite*const n) Add new neurite to the neuron.
public void add_soma(const std::vector<Node> & v) Add node set to soma.
public inline void add_soma(constNode& n) Add single node to soma.
public template<typename T>
inline auto add_property(const std::string & key,const T & v,bool recursive)
Adds a proprety to the neuron and, optionally, to its neurites.
public inline auto add_property(const std::string & key,bool recursive) Adds an empty proprety to the neuron and, optionally, to its neurites.
public inline neurite_iterator begin_neurite() Creates neurite iterator.
public inline neurite_iterator end_neurite() Creates neurite iterator.
public inline const_neurite_iterator begin_neurite() const Creates neurite iterator.
public inline const_neurite_iterator end_neurite() const Creates neurite iterator.
public inline soma_iterator begin_soma() Iterator over soma nodes.
public inline soma_iterator end_soma() Iterator over soma nodes.
public inline const_soma_iterator begin_soma() const Iterator over soma nodes.
public inline const_soma_iterator end_soma() const Iterator over soma nodes.
public inline auto begin_axon() Iterator over axon.
public inline auto end_axon() Iterator over axon.
public inline auto begin_apical() Iterator over apical.
public inline auto end_apical() Iterator over apical.
public inline auto begin_dendrite() Iterator over basal dendrites.
public inline auto end_dendrite() Iterator over basal dendrites.
public inline auto begin_axon() const Iterator over axon.
public inline auto end_axon() const Iterator over axon.
public inline auto begin_apical() const Iterator over apical.
public inline auto end_apical() const Iterator over apical.
public inline auto begin_dendrites() const Iterator over basal dendrites.
public inline auto end_dendrites() const Iterator over basal dendrites.
public inline int axon_count() const Counts number of axon neuritesin the neuron.
public inline int apical_count() const Counts number of apical neurites in the neuron.
public inline int dendrite_count() const Counts number of basal dendrites in the neuron.
public inline bool has_soma() const Checks if the neuron soma is not empty.
publicNeurite::base_node_iteratorfind(constNode& n) Finds a node in the neuron.
public inlineNeurite::base_node_iteratorfind(Node::id_type id) Finds a node in the neuron that matches the id.
public soma_iterator find_soma(constNode& n) Finds a node in the soma.
public inline soma_iterator find_soma(Node::id_type id) Finds a node in the soma by id.
public bool point_in_soma(const point_type & p) const Checks if the given point is within the soma.
public void correct() Correct function calls the correct function over each.
public void remove_null_segments() Removes zero-length segements in all neurites.
public point_type soma_barycenter() const Computes soma barycenter.
public void scale(float r) Scales all nodes in the neuron by r.
public void scale(float rx,float ry,float rz) Scales all nodes in the neuron by (rx,ry,rz)
public void traslate(const point_type & p) Moves all nodes in the neuron by p.
public void rotate(const Eigen::Quaternionf & q) rotates all nodes in the neuron
public void center() Traslates the neuron so the soma barycenter lies at 0,0,0.
public neurite_iterator erase(const neurite_iterator & n) Removes a neurite from the neuron.
public void erase_axon() Removes all axon neurites from the neuron.
public void erase_apical() Removes all apical dendrties from the neuron.
public void erase_dendrites() Removes all non-apical dendrties from the neuron.
public void set_apical_up() Rotates the neuron so the apical towards "up" direction.
public void set_basal_roots_xz() Rotates the neuron so the basal plane is close to the z=0 plane.
public box_type boundingBox() Computes the axis-aligned bounding box of the neuron.
public float somaArea() const Computes soma area.
public void order() Order all neurites.
public void simplify(float eps) Applies RDP simplification to all branches in the neruon.

Members

public Neuron()

Empty constructor.

Create a neuron with no id, neurites nor soma. up vector is set to default value (0,0,1)

Returns

Neuron


public Neuron(const std::string & id)

Create a neuron with given id, and no neurites nor soma.

up vector is set to default value (0,0,1)

Parameters

Returns

Neuron


public Neuron(const std::string & id,const std::vector<Node> & soma)

Creates a neuron with given id and soma nodes.

up vector is set to default value (0,0,1)

Parameters

  • id Neuron id

  • soma Soma nodes

Returns

Neuron


public inline ~Neuron()

Default destructor.


public Neuron(constNeuron&) = delete

DELETED


publicNeuron& operator=(constNeuron&) = delete

DELETED


public Neuron(Neuron&&) = default

Default implementation.


publicNeuron& operator=(Neuron&&) = default

Default implementation.


public inline const std::string & id() const

Get neuron id string.

Returns

Neuron id string


public inline const point_type & up() const

Get neuron Up vector.

Up vector allows us to orient angles in 3D space

Returns

Point


public void up(const point_type & up)

Set neuron up vector.

Given vector is normalized

Parameters

  • up New up vector

public inline int size() const

Count number of neurites.

Returns

Neurite count


public int node_count() const

Number of different nodes in the neuron.

Returns

Node count


public neurite_iterator add_neurite(Neurite*const n)

Add new neurite to the neuron.

Parameters

Returns

Insert point


public void add_soma(const std::vector<Node> & v)

Add node set to soma.

Parameters

  • v Vector of nodes to add to the soma

public inline void add_soma(constNode& n)

Add single node to soma.

Parameters


public template<typename T>
inline auto add_property(const std::string & key,const T & v,bool recursive)

Adds a proprety to the neuron and, optionally, to its neurites.

Parameters

  • key Property key

  • v Property value

  • recursive If true, property is also added to neuron neurites.

public inline auto add_property(const std::string & key,bool recursive)

Adds an empty proprety to the neuron and, optionally, to its neurites.

Parameters

  • key Property key

  • recursive If true, property is also added to neuron neurites.

public inline neurite_iterator begin_neurite()

Creates neurite iterator.

Returns

Begin neurite iterator


public inline neurite_iterator end_neurite()

Creates neurite iterator.

Returns

End neurite iterator


public inline const_neurite_iterator begin_neurite() const

Creates neurite iterator.

Returns

Begin neurite iterator


public inline const_neurite_iterator end_neurite() const

Creates neurite iterator.

Returns

End neurite iterator


public inline soma_iterator begin_soma()

Iterator over soma nodes.

Returns

Begin soma iterator


public inline soma_iterator end_soma()

Iterator over soma nodes.

Returns

End soma iterator


public inline const_soma_iterator begin_soma() const

Iterator over soma nodes.

Returns

Begin soma iterator


public inline const_soma_iterator end_soma() const

Iterator over soma nodes.

Returns

End soma iterator


public inline auto begin_axon()

Iterator over axon.

Axon is supposed to be unique...

Returns

Begin axon iterator


public inline auto end_axon()

Iterator over axon.

Axon is supposed to be unique...

Returns

End axon iterator


public inline auto begin_apical()

Iterator over apical.

Apical is supposed to be unique...

Returns

Begin apical iterator


public inline auto end_apical()

Iterator over apical.

Apical is supposed to be unique...

Returns

End apical iterator


public inline auto begin_dendrite()

Iterator over basal dendrites.

Returns

Begin basal dendrites iterator


public inline auto end_dendrite()

Iterator over basal dendrites.

Returns

End basal dendrites iterator


public inline auto begin_axon() const

Iterator over axon.

Axon is supposed to be unique...

Returns

Begin axon iterator


public inline auto end_axon() const

Iterator over axon.

Axon is supposed to be unique...

Returns

End axon iterator


public inline auto begin_apical() const

Iterator over apical.

Apical is supposed to be unique...

Returns

Begin apical iterator


public inline auto end_apical() const

Iterator over apical.

Apical is supposed to be unique...

Returns

End apical iterator


public inline auto begin_dendrites() const

Iterator over basal dendrites.

Returns

Begin basal dendrites iterator


public inline auto end_dendrites() const

Iterator over basal dendrites.

Returns

End basal dendrites iterator


public inline int axon_count() const

Counts number of axon neuritesin the neuron.

Returns

Number of axon


public inline int apical_count() const

Counts number of apical neurites in the neuron.

Returns

Number of apical


public inline int dendrite_count() const

Counts number of basal dendrites in the neuron.

Returns

Number of apical


public inline bool has_soma() const

Checks if the neuron soma is not empty.

Returns

True if soma is not empty


publicNeurite::base_node_iteratorfind(constNode& n)

Finds a node in the neuron.

doesnt search in soma nodes

Parameters

  • n Node to be found

Returns

Node iterator. IF node is not found returns the iterator created by the empty constructor


public inlineNeurite::base_node_iteratorfind(Node::id_type id)

Finds a node in the neuron that matches the id.

doesnt search in soma nodes

Parameters

Returns

Node iterator. IF node is not found returns the iterator created by the empty constructor


public soma_iterator find_soma(constNode& n)

Finds a node in the soma.

Parameters

  • n Node to be found

Returns

Iterator to the node. end_soma otherwise


public inline soma_iterator find_soma(Node::id_type id)

Finds a node in the soma by id.

Parameters

  • id ID of the node to be found

Returns

Iterator to the node. end_soma otherwise


public bool point_in_soma(const point_type & p) const

Checks if the given point is within the soma.

The condition is that the given point should be closer to the soma barycenter than at least one point in the soma

Parameters

  • p Point

Returns

True if point is considered to be in the soma


public void correct()

Correct function calls the correct function over each.

Additionaly checks if the neurite root is part of the soma and set is as such if necessary.


public void remove_null_segments()

Removes zero-length segements in all neurites.


public point_type soma_barycenter() const

Computes soma barycenter.

Returns

soma barycenter


public void scale(float r)

Scales all nodes in the neuron by r.

Parameters

  • r scale rate

public void scale(float rx,float ry,float rz)

Scales all nodes in the neuron by (rx,ry,rz)

Parameters

  • rx x-axis scale

  • ry y-axis scale

  • rz z-axis scale

public void traslate(const point_type & p)

Moves all nodes in the neuron by p.

Parameters

  • p Traslation vector

public void rotate(const Eigen::Quaternionf & q)

rotates all nodes in the neuron

Parameters

  • q rotation quaternion

public void center()

Traslates the neuron so the soma barycenter lies at 0,0,0.


public neurite_iterator erase(const neurite_iterator & n)

Removes a neurite from the neuron.

Parameters

Returns

updated iterator


public void erase_axon()

Removes all axon neurites from the neuron.


public void erase_apical()

Removes all apical dendrties from the neuron.


public void erase_dendrites()

Removes all non-apical dendrties from the neuron.


public void set_apical_up()

Rotates the neuron so the apical towards "up" direction.


public void set_basal_roots_xz()

Rotates the neuron so the basal plane is close to the z=0 plane.


public box_type boundingBox()

Computes the axis-aligned bounding box of the neuron.

Returns

bounding box


public float somaArea() const

Computes soma area.

Returns

Soma area


public void order()

Order all neurites.


public void simplify(float eps)

Applies RDP simplification to all branches in the neruon.

Parameters

  • eps Tolerance

class Node

class Node
  : public neurostr::WithProperties

Summary

Members Descriptions
public Node() Empty constructor, creates a node with ID -1 at 0,0,0 with radius 0.
public Node(int id) Creates a node with ID id at 0,0,0 with radius 0.
public Node(int id,const point_type & p,double r) Creates a node with ID id at position p with radius r.
public Node(int id,double x,double y,double z,double r) Creates a node with ID id at position (x,y,z) with radius r
public Node(constNode& n) = default Default.
public Node(Node&& n) = default Default.
publicNode& operator=(constNode& n) = default Default.
publicNode& operator=(Node&& n) = default Default.
public inline ~Node() Empty destructor.
public inline bool operator==(constNode& n) const Compare two nodes by ID.
public inline bool operator!=(constNode& n) const Compare two nodes by ID.
public inline float radius() const Returns node radius.
public inline const id_type id() const Returns node id.
public inline const point_type & position() const Return node position.
public inline float x() const Returns node X coordinate.
public inline float y() const Returns node Y coordinate.
public inline float z() const Returns node Z coordinate.
public inline bool valid_branch() const Checks wether the parent branch referece is valid.
publicBranch& branch() Returns parent branch.
public constBranch& branch() const Returns parent branch.
publicNode& position(const point_type & p) Changes node position for.

Members

public Node()

Empty constructor, creates a node with ID -1 at 0,0,0 with radius 0.

Returns

Node


public Node(int id)

Creates a node with ID id at 0,0,0 with radius 0

Parameters

  • id The Node ID

public Node(int id,const point_type & p,double r)

Creates a node with ID id at position p with radius r

Parameters

  • id The Node ID
  • p Node position (3D point)
  • r Node radius

public Node(int id,double x,double y,double z,double r)

Creates a node with ID id at position (x,y,z) with radius r

Parameters

  • id The Node ID
  • x Node x coord.
  • y Node y coord.
  • z Node z coord.
  • r Node radius

public Node(constNode& n) = default

Default.


public Node(Node&& n) = default

Default.


publicNode& operator=(constNode& n) = default

Default.


publicNode& operator=(Node&& n) = default

Default.


public inline ~Node()

Empty destructor.

Returns


public inline bool operator==(constNode& n) const

Compare two nodes by ID.

Parameters

  • n The other node

Returns

True if both ids are equal


public inline bool operator!=(constNode& n) const

Compare two nodes by ID.

Parameters

  • n The other node

Returns

True if both ids are different


public inline float radius() const

Returns node radius.

Returns

Radius


public inline const id_type id() const

Returns node id.

Returns

ID


public inline const point_type & position() const

Return node position.

Returns

Position


public inline float x() const

Returns node X coordinate.

Returns

X coord


public inline float y() const

Returns node Y coordinate.

Returns

Y coord


public inline float z() const

Returns node Z coordinate.

Returns

Z coordinate


public inline bool valid_branch() const

Checks whether the parent branch reference is valid.

Returns

True if the reference is valid


publicBranch& branch()

Returns parent branch.

Throws

  • runtime_exception If we attempt to access null branch

Returns

Parent branch reference


public constBranch& branch() const

Returns parent branch.

Parameters

  • runtime_exception If attempt to access null branch

Returns

Parent branch const reference


publicNode& position(const point_type & p)

Changes node position for.

Parameters

*


class PropertyMap

Summary

Members Descriptions
public PropertyMap() Initializes an empty property map.
public template<typename Iter>
inline PropertyMap(const Iter & begin,const Iter & end)
Initializes a property map with the content in the range.
public const_iterator find(const std::string & k) const Returns the property with key k.
public PropertyMap(constPropertyMap&) = default Default.
publicPropertyMap& operator=(constPropertyMap&) = default Default.
public PropertyMap(PropertyMap&&) = default Default.
publicPropertyMap& operator=(PropertyMap&&) = default Default.
public template<typename T>
inline T get(const std::string & k) const
Returns the value of the poperty with key k.
public std::pair< iterator, bool > set(const property_type & p) Adds a new property to the map.
public std::pair< iterator, bool > set(const std::string & k) Adds an empty property to the map.
public std::pair< iterator, bool > set(const std::string & k,int v) Adds a new int valued property to the map.
public std::pair< iterator, bool > set(const std::string & k,bool v) Adds a new bool valued property to the map.
public std::pair< iterator, bool > set(const std::string & k,float v) Adds a new float valued property to the map.
public std::pair< iterator, bool > set(const std::string & k,const std::string v) Adds a new string valued property to the map.
public std::pair< iterator, bool > set(const std::string & k,const point_type v) Adds a new point valued property to the map.
public std::pair< iterator, bool > set(const std::string & k,boost::any v) Adds a property to the map.
public bool exists(const std::string & k) const Property exists.
public void remove(const std::string & k) Deletes a property.
public void remove(const iterator & i) Deletes a property.
public map_type::size_type size() const Property map size.
public const_iterator begin() const Property begin iterator.
public iterator begin() Property begin iterator.
public const_iterator end() const Property end iterator.
public iterator end() Property end iterator.

Members

public PropertyMap()

Initializes an empty property map.


public template<typename Iter>
inline PropertyMap(const Iter & begin,const Iter & end)

Initializes a property map with the content in the range.

Parameters

  • begin property begin iterator

  • end property end iterator

public const_iterator find(const std::string & k) const

Returns the property with key k.

Parameters

  • k Property key

Returns

Const iterator. End() if no property with key k exists


public PropertyMap(constPropertyMap&) = default

Default.


publicPropertyMap& operator=(constPropertyMap&) = default

Default.


public PropertyMap(PropertyMap&&) = default

Default.


publicPropertyMap& operator=(PropertyMap&&) = default

Default.


public template<typename T>
inline T get(const std::string & k) const

Returns the value of the poperty with key k.

Parameters

  • k Key

Returns

Property value


public std::pair< iterator, bool > set(const property_type & p)

Adds a new property to the map.

Parameters

  • p Property to add

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k)

Adds an empty property to the map.

Parameters

  • k Property key

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,int v)

Adds a new int valued property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,bool v)

Adds a new bool valued property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,float v)

Adds a new float valued property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,const std::string v)

Adds a new string valued property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,const point_type v)

Adds a new point valued property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public std::pair< iterator, bool > set(const std::string & k,boost::any v)

Adds a property to the map.

Parameters

  • k Property key

  • v Property value

Returns

pair(iterator, T/F property added)


public bool exists(const std::string & k) const

Property exists.

Parameters

  • k Property name

Returns

True if the property exists


public void remove(const std::string & k)

Deletes a property.

Parameters

  • k Poperty key

public void remove(const iterator & i)

Deletes a property.

Parameters

  • i property iterator

public map_type::size_type size() const

Property map size.

Returns

Number of properties in the map


public const_iterator begin() const

Property begin iterator.

Returns

const iterator


public iterator begin()

Property begin iterator.

Returns

iterator


public const_iterator end() const

Property end iterator.

Returns

const iterator


public iterator end()

Property end iterator.

Returns

iterator


class Reconstruction

class Reconstruction
  : public neurostr::WithProperties

Summary

Members Descriptions
public Reconstruction() Creates a reconsturction with no id, neurons nor contour.
public Reconstruction(const std::string & id) Creates an empty reconstruction with given id.
public inline ~Reconstruction() Default.
public Reconstruction(constReconstruction&) = delete Not allowed.
publicReconstruction& operator=(constReconstruction&) = delete Not allowed.
public Reconstruction(Reconstruction&&) = default Default.
publicReconstruction& operator=(Reconstruction&&) = default Default.
public inline void addNeuron(Neuron*const n) Adds a neuron to the reconstruction.
public void addContour(constcontour_type& v) Sets a vector of points as reconstruction contour.
public inline std::vector<contour_type>::const_iterator contour_begin() const Get reconstruction contour as polygon.
public inline std::vector<contour_type>::const_iterator contour_end() const
public inline const std::string & id() const Get reconstruction ID.
public inline std::size_t n_contours() const Checks whether the contour is empty.
public inline int size() const Counts number of neurons in the reconstruction.
public int node_count() const Counts number of different nodes in the reconstruction.
public neuron_iterator closest_soma(const point_type & p) Finds the neuron whose soma is the closest one to a given point.
public neuron_iterator add_neurite_to_closest_soma(Neurite* n) Adds a neurite to the neuron whose soma is the closest one to the neurite root.
public inline neuron_iterator begin() Neuron iterator.
public inline neuron_iterator end() Neuron iterator.
public inline const_neuron_iterator begin() const Neuron iterator.
public inline const_neuron_iterator end() const Neuron iterator.

Members

public Reconstruction()

Creates a reconsturction with no id, neurons nor contour.


public Reconstruction(const std::string & id)

Creates an empty reconstruction with given id.

Parameters


public inline ~Reconstruction()

Default.


public Reconstruction(constReconstruction&) = delete

Not allowed.

DELETED


publicReconstruction& operator=(constReconstruction&) = delete

Not allowed.

DELETED


public Reconstruction(Reconstruction&&) = default

Default.


publicReconstruction& operator=(Reconstruction&&) = default

Default.


public inline void addNeuron(Neuron*const n)

Adds a neuron to the reconstruction.

Parameters


public void addContour(constcontour_type& v)

Sets a vector of points as reconstruction contour.

Parameters

  • v Point vector

public inline std::vector<contour_type>::const_iterator contour_begin() const

Get reconstruction contour as polygon.

Returns

Reconstruction contour


public inline std::vector<contour_type>::const_iterator contour_end() const


public inline const std::string & id() const

Get reconstruction ID.

Returns

ID


public inline std::size_t n_contours() const

Checks whether the contour is empty.

Returns

True if contour is not empty


public inline int size() const

Counts number of neurons in the reconstruction.

Returns

Neuron count


public int node_count() const

Counts number of different nodes in the reconstruction.

Returns

Node count


public neuron_iterator closest_soma(const point_type & p)

Finds the neuron whose soma is the closest one to a given point.

Parameters

  • p Point

Returns

Neuron iterator


public neuron_iterator add_neurite_to_closest_soma(Neurite* n)

Adds a neurite to the neuron whose soma is the closest one to the neurite root.

Parameters

Returns

Neuron iterator (insertion point)


public inline neuron_iterator begin()

Neuron iterator.

Returns

begin neuron interator


public inline neuron_iterator end()

Neuron iterator.

Returns

end neuron interator


public inline const_neuron_iterator begin() const

Neuron iterator.

Returns

begin neuron interator


public inline const_neuron_iterator end() const

Neuron iterator.

Returns

end neuron interator


class WithProperties

Summary

Members Descriptions
publicPropertyMapproperties
public WithProperties() create an empty property map
public WithProperties(constWithProperties& other) = default Default.
publicWithProperties& operator=(constWithProperties& b) = default Default.
public WithProperties(WithProperties&& b) = default Default.
publicWithProperties& operator=(WithProperties&& b) = default Default.
public inline auto begin_properties() const Proprerty begin iterator.
public inline auto end_properties() const Property end iterator.
public template<typename T>
inline auto add_property(const std::string & key,const T & v)
Adds a property.
public std::pair< PropertyMap::iterator, bool > add_property(const std::string & key) Adds an empty property.
public std::pair< PropertyMap::iterator, bool > add_property(const std::pair< std::string, boost::any > & v) Adds a property.
public PropertyMap::const_iterator get_property(const std::string & key) const Get property.

Members

publicPropertyMapproperties


public WithProperties()

create an empty property map


public WithProperties(constWithProperties& other) = default

Default.


publicWithProperties& operator=(constWithProperties& b) = default

Default.


public WithProperties(WithProperties&& b) = default

Default.


publicWithProperties& operator=(WithProperties&& b) = default

Default.


public inline auto begin_properties() const

Proprerty begin iterator.

Returns

property iterator


public inline auto end_properties() const

Property end iterator.

Returns

property iterator


public template<typename T>
inline auto add_property(const std::string & key,const T & v)

Adds a property.

Parameters

  • key Property key

  • v Property value

Returns

property iterator


public std::pair< PropertyMap::iterator, bool > add_property(const std::string & key)

Adds an empty property.

Parameters

  • key Property key

Returns

property iterator


public std::pair< PropertyMap::iterator, bool > add_property(const std::pair< std::string, boost::any > & v)

Adds a property.

Parameters

  • v Propery

Returns

property iterator


public PropertyMap::const_iterator get_property(const std::string & key) const

Get property.

Parameters

  • key Property key

Returns

property iterator