namespace neurostr
Neurostr namespace contains all other namespaces in the library as well as the data model classes.
Summary
Members | Descriptions |
---|---|
namespace log |
Log namespace contains logger functions. |
namespace io |
IO namespace contains write/read functionality for most common file formats. |
namespace traits |
Core template traits |
namespace geometry |
Geometry namespace hides geometry specific implementation details from the rest of the library. |
class Branch |
Representation of a single branch in a reconstruction. Conceptually is an ordered sequence of nodes. |
class Neurite |
Represents a single neurite (dendrite, apical dend. or axon) |
class Contour |
3D contour in the reconstruction. It is an ordered sequence of 3D points (not nodes). Contours are usually closed but it is not mandatory. |
class Neuron |
Represents a single neuron, its soma and neurites |
class Node |
Node concept class. stores a numeric ID, x,y,z coordinates and radius. Also stores references to its branch and parent node if they exist and implements basic operations. |
class PropertyMap |
Auxiliar class. Stores key-value properties |
class Reconstruction |
Stores several neuron as well as common contours |
class WithProperties |
Base class for neuron , neurite ... that have a property map |
namespace geometry
Geometry namespace hides geometry specific implementation details from the rest of the library.
Summary
Members | Descriptions |
---|---|
class DiscreteFrechet |
|
class RDPSimplifier |
|
class TriangleMesh |
|
public template<int I> inline float get(const point_type & p) |
Gets the ith component from a point. |
public template<int I> inline float get(const planar_point & p) |
Gets the ith component from a 2D point. |
public inline float getx(const point_type & p) |
Gets point x coordinate. |
public inline float gety(const point_type & p) |
gets pòint y coordinate |
public inline float getz(const point_type & p) |
Gets point z coordinate. |
public inline float get(const point_type & p,int coord) |
Gets the ith component from a point. |
public template<int I> planar_point planar_projection(const point_type & p) |
Removes the ith component from P. |
public planar_point planar_projection(const point_type & p,int i) |
Dynamic planar projection. |
public float distance(const point_type & a,const point_type & b) |
Euclidean distance between a and b. |
public point_type vectorFromTo(const point_type & from,const point_type & to) |
Vector with origin in from and end in to. |
public void traslate( point_type & p,const point_type & v) |
Adds v to p. |
public void scale( point_type & p,float scale,const point_type & ref) |
Modifies the point p scaling it by scale wrt ref so its norm is multiplied by scale. |
public void scale( point_type & p,float rx,float ry,float rz) |
Modifies the point p scaling it by (rx,ry,rz) |
public void scale( point_type & p,float scale) |
Modifies p multiplying its norm by scale. |
public point_type cross_product(const point_type & p,const point_type & q) |
Computes the 3D cross product p ^ q. |
public float norm(const point_type & p) |
Returns de 2-norm of p as vector. |
public inline bool equal(const point_type & a,const point_type & b) |
Checks whether two point a and b are equal. |
public inline bool equal(const planar_point & a,const planar_point & b) |
Checks whether two point a and b are equal. |
public std::array< point_type , 3 > get_basis(const point_type & vx,const point_type & up) |
Retunrs a orthonormal right-oriented basis where vx is the first vector. |
public float segment_segment_distance(const point_type & p0,const point_type & p1,const point_type & q0,const point_type & q1) |
Computes the distance between two line-segments p and q. |
public Eigen::Quaternionf align_vectors(const point_type & v,const point_type & u,const point_type up) |
Returns the quaternion to transform v into u (both unitary) |
public bool segment_box_intersection(const box_type & b,const segment_type & s, point_type & inter) |
Computes the box-segment intersection of b and s. |
public template<typename G1,typename G2> inline bool covered_by(const G1 & g1,const G2 & g2) |
Checks if first geometry is covered by the second. |
public template<int I,typename Point> inline bool segment_cross_plane(const segment_type & s,const Point & v,Point & inter) |
Segment-axis plane intersection. |
public template<int I,typename Point> inline void min_component(const Point & p,Point & res) |
Set the ith component in res to the minimim betweeen the ith components in p and res. |
public template<int I,typename Point> inline void max_component(const Point & p,Point & res) |
Set the ith component in res to the maximum betweeen the ith components in p and res. |
public template<typename Point> inline void max_by_component(const Point & p,Point & res) |
Computes the component-wise maximum between p and res and stores it in res. |
public template<typename Point> inline void min_by_component(const Point & p,Point & res) |
Computes the component-wise minimum between p and res and stores it in res. |
public template< Axis axis> float axisLength(const box_type & b) |
Return box axis length. |
public template< Axis axis> void setAxis( box_type & b,float v) |
Set box axis to given value. |
public polygon_type as_planar_polygon(const std::vector< point_type > & v) |
|
public template<typename G> inline std::size_t num_points(const G & geom) |
Number of points in the geometry. |
public float polygon_area(const polygon_type & p) |
Computes the pclosed polygon area. |
public template<typename Iter> inline float polygon_area(const Iter & begin,const Iter & end) |
Computes the closed polygon area. |
public void negate( point_type & p) |
Multiplies every component by -1. |
public point_type barycenter(const std::vector< point_type > & v) |
Computes the barycenter of a pointset. |
public void normalize( point_type & p) |
Modifies p so its norm is equal to 1. |
public float vector_vector_angle(const point_type & a,const point_type & b) |
Computes the planar vector-vector shortest angle. |
public bool box_box_intersection(const box_type & a,const box_type & b) |
Checks if box a intersects with box b (axis aligned) |
public std::vector< point_type > box_corners(const box_type & b) |
Returns 8 corner points in a axis-aligned box. |
public float lineseg_dist(const std::vector< point_type > & u,const std::vector< point_type > & v) |
Euclidean distance between two line-segments. |
public box_type bounding_box(const std::vector< point_type > & v) |
Computes the bounding box of a node set. |
public float vector_vector_directed_angle(const point_type & a,const point_type & b,const point_type up) |
Computes the planar angle from a to b. |
public std::pair< float, float > local_orientation(const point_type & p,const std::array< point_type , 3 > & basis) |
Computes the local orientation (Azimuth and elevation) of p wrt basis. |
public bool in_triangle_border(const triangle_type & t,const point_type & p) |
Verifies if p is in the border of the triangle t. |
public bool is_triangle_vertex(const triangle_type & t,const point_type & p) |
Verifies if P is one of the vertices of T. |
public bool within_triangle(const triangle_type & t,const point_type & p) |
Verifies if p is inside the triangle t. |
public bool triangle_ray_intersection(const triangle_type & t,const point_type & ray_o,const point_type & ray_v, point_type & intersection) |
Computes Triangle-ray intersection with the moller-trumbore algorithm. |
public float tetrahedron_volume(const point_type & p0,const point_type & p1,const point_type & p2,const point_type & p3) |
Returns the volume of the tetrahedron. |
public float triangle_area(const triangle_type & t) |
Compute the triangle area. |
namespace traits
Summary
Members | Descriptions |
---|---|
Trait function_traits |
Extract basic information from a fuctor like out type, arg type, arity... |
Trait is_vector |
Base false trait is vector. |
Trait is_base_of_template |
Is base of template base trait. |
namespace log
Log namespace contains logger functions.
Summary
Members | Descriptions |
---|---|
class _logger_storage |
|
public _logger_storage _nstr_logger_ |
|
public void init_log_file(const std::string & path) |
Inits file logger. |
public void init_log_cout() |
Initializes the logger using the standard output stream. |
public void init_log_cerr() |
Initializes the logger using the standard error stream. |
public void disable_log() |
Disables the log. |
public void enable_log() |
Enables the log. |
public void set_format(const std::string & s) |
Changes current log format. |
public void set_level( severity_level l) |
Changes current logger severity threshold. |
namespace io
IO namespace contains write/read functionality for most common file formats.
Summary
Members | Descriptions |
---|---|
class ASCParser |
|
class DATParser |
|
class JSONParser |
|
class JSONWriter |
|
class Parser |
|
class SWCParser |
|
class SWCWriter |
|
struct contour_info |
Contour header in DAT files. |
struct marker_type |
Markerset structure for NL files. |
struct subtree_info |
SubTree header in DAT files. |
struct tree_info |
Tree header in DAT files. |
namespace selector
Summary
Members | Descriptions |
---|---|
struct selector_func_traits |
Selector function traits. |
struct type_chooser |
Trait that extracts the selector i/o type. |
struct type_chooser< true, T > |
|
public template<typename F1,typename F2,typename... Funcs,std::enable_if_t< sizeof...(Funcs)==0 > *> inline constexpr auto compose_selector(const F1 & f1,const F2 & f2,Funcs... fns) |
Recursive template for selector composition. |
public template<typename F,std::enable_if_t< selector_func_traits < F >::out_set > *> inline constexpr auto selector_out_single_to_set(const F & f) |
Converts a selector with single output in one with set output Case: Output is already set. |
public template<typename F,std::enable_if_t< selector_func_traits < F >::in_set > *> inline constexpr auto selector_in_single_to_set(const F & f) |
Converts a selector with single output in one with set output Case: Output is already set. |
public template<typename F1,typename F2,std::enable_if_t< selector_func_traits < F1 >::in_set > *,std::enable_if_t< selector_func_traits < F2 >::out_set > *> inline constexpr auto selector_foreach(const F1 & f1,const F2 & f2) |
Creates a new selector that applies the selector f2 to each selected element of f1. |
public template<typename F1,typename F2,typename... Funcs,std::enable_if_t< sizeof...(Funcs)==0 > *> inline constexpr auto union_selector(const F1 & f1,const F2 & f2,Funcs... fns) |
Recursive template for selector union. |
public template<typename F1,typename F2,typename... Funcs,std::enable_if_t< sizeof...(Funcs)==0 > *> inline constexpr auto intersection_selector(const F1 & f1,const F2 & f2,Funcs... fns) |
Recursive template for selector intersection. |
public template<typename F1,typename F2,std::enable_if_t<! selector_func_traits < F1 >::in_set > *> inline constexpr auto diff_selector_factory(const F1 & f_1,const F2 & f_2) |
Assymetric difference. |
namespace measure
Summary
Members | Descriptions |
---|---|
namespace aggregate |
Namespace that contains aggregate-related functions and traits |
template <typename Fn> auto measureEach(const Fn& f) |
Converts a single-input measure into a set measure that applies the original measure to each element of the input set |
template <typename Fn, typename Aggr> auto measureEachAggregate(const Fn& f, const Aggr& aggr) |
Converts a single-input measure into a set measure that applies the original measure to each element of the input set and then aggregates the output. |
template <typename S, typename M> auto selectorMeasureCompose(const S& selector, const M& measure) |
Creates a new measure as result of the composition of the selector and the measure (M o S). Types and arity must match |
template <typename... Measures> auto createMeasureTuple(const Measures&... measures ) |
Creates a measure that applies several measures to the same input and returns their result in a tuple |
template <typename F> struct measure_func_traits |
Measure function traits. Extracts input type, input arity and output type. |
namespace validator
Validator namespace contains the validator template class and the prebuilt validators and check functions.
Summary
Members | Descriptions |
---|---|
class Validator |
|
class ValidatorItem |
|
class check_func_traits |
|
public const auto is_true |
Dummy. Checks that a given boolean is true |
public const auto is_false |
Dummy. Checks that a given boolean is false |
public const auto empty_string |
Dummy. Checks that a given string is empty |
public template<typename T> inline auto range_check_factory(T min,T max) |
Range check factory. Checks that a given value is in the range [min, max) |
public const auto neurites_attached_to_soma |
Neurite validator. Checks that neurites are attached to the soma |
public const auto neuron_has_soma |
Neuron validator. Checks that neuron soma is defined |
public const auto no_trifurcations_validator |
Node validator. Checks that the number of descendants of a node is at most 2. |
public const auto zero_length_segments_validator |
Node validator. Checks that the length of the compartment associated to each node is not zero. |
public const auto radius_length_segments_validator |
Node validator. Check that the distance between two consecutive nodes is greater than the sum of their radii. |
public const auto increasing_radius_validator |
Node validator. Checks that the node radius is not increasing. |
public const auto segment_collision_validator |
Node validator. Check that the node compartment don't collide with any other compartment in the reconstruction |
public const auto extreme_angles_validator |
Node validator. Check that the elongation/bifurcation angle are not too high to be plausible |
public inline auto planar_reconstruction_validator_factory(float min) |
Neurite validator. Verifies that neurite reconstruction is not planar by checking that its non-axis aligned box volume is over the minimum value (close to 0) |
public inline auto dendrite_count_validator_factory(unsigned int min,unsigned int max) |
Neuron validator. Checks that the number of dendrites in the neuron is in the range [min,max) |
public inline auto apical_count_validator_factory(bool strict) |
Neuron validator. Checks that the number of apical dendrites in the neuron is not greater than 2 |
public inline auto axon_count_validator_factory(bool strict) |
Neuron validator. Checks that the number of axons in the neuron is not greater than 2 |
public inline auto linear_branches_validator_factory(float min) |
Branch validator. Verifies that the branch reconstruction is not a prefect straight line by checking that its tortuosity value is not equal to 1 |
public inline auto branch_collision_validator_factory(bool ignore_diams) |
Branch validator. Check that the Branch dont collide with any other branch in the neuron |