Cleaning and doxygen

This commit is contained in:
Thomas FORGIONE 2015-03-11 15:03:18 +01:00
parent 0446e87c46
commit 7812622439
2 changed files with 14 additions and 15 deletions

View File

@ -29,11 +29,13 @@ class Skeleton
Skeleton(); Skeleton();
////////////////////////////////////////////////////////////////////////
/// \brief
unsigned int numberOfBranches() { return m_branches.size(); } unsigned int numberOfBranches() { return m_branches.size(); }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// \brief loadFromFile : read a file at format skl and extract vertices /// \brief read a file at format skl and extract vertices
/// and edges /// and edges
/// ///
/// \param path String containing the path to the file at format skl /// \param path String containing the path to the file at format skl
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -41,8 +43,8 @@ class Skeleton
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// \brief loadFromVectors : create edges from a vector of vertices /// \brief create edges from a vector of vertices
/// index /// index
/// ///
/// For example, with the vector path = [1, 5, 8, 9, 12], the created /// For example, with the vector path = [1, 5, 8, 9, 12], the created
/// edges are (1,5), (5,8), (8,9) and (9,12) /// edges are (1,5), (5,8), (8,9) and (9,12)
@ -56,8 +58,8 @@ class Skeleton
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// \brief countNeighbors : count the number of neighbors of each /// \brief count the number of neighbors of each
/// vertex /// vertex
/// ///
/// Compute a vector of counters which has the same size as the number /// Compute a vector of counters which has the same size as the number
/// of vertices. The k-th element of the vector is the number of /// of vertices. The k-th element of the vector is the number of
@ -79,14 +81,14 @@ class Skeleton
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
/// \brief draw : Draw the skeleton /// \brief Draw the skeleton
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
void draw() const; void draw() const;
void draw(unsigned int i) const; void draw(unsigned int i) const;
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// \brief split : split the whole skeletons into branches of skeletons /// \brief split the whole skeletons into branches of skeletons
/// ///
/// \return a vector of branches /// \return a vector of branches
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -156,11 +158,10 @@ class Skeleton
unsigned int searchNearestBrancheIndex(cv::KeyPoint const& keypoint, unsigned int searchNearestBrancheIndex(cv::KeyPoint const& keypoint,
Skeleton branches Skeleton branches
); );
std::vector<geo::Vector3<float>> m_vertices;
std::vector<geo::Vector<unsigned int,2>> m_edges;
std::vector<Branch> m_branches;
static std::stringstream stream; std::vector<geo::Vector3<float>> m_vertices; ///< vertices of the skeleton
std::vector<geo::Vector<unsigned int,2>> m_edges; ///< edges of the skeleton
std::vector<Branch> m_branches; ///< branches of the skeleton, might be empty
}; };
#endif // SKELETON_HPP #endif // SKELETON_HPP

View File

@ -10,9 +10,6 @@
#include <Skeleton/Box.hpp> #include <Skeleton/Box.hpp>
#include <Geometry/MathFunctions.hpp> #include <Geometry/MathFunctions.hpp>
std::stringstream Skeleton::stream{};
Skeleton::Skeleton() : m_vertices{}, m_edges{}, m_branches{} Skeleton::Skeleton() : m_vertices{}, m_edges{}, m_branches{}
{ {
@ -23,6 +20,7 @@ bool Skeleton::loadFromFile(std::string const& path)
{ {
std::ifstream file{path}; std::ifstream file{path};
std::string line; std::string line;
std::stringstream stream;
if (!file) if (!file)
{ {