c3d-utils
uuc3dlib/subjects.hpp
00001 #ifndef SUBJ83SNKRIWON423KHTJEIYU589
00002 #define SUBJ83SNKRIWON423KHTJEIYU589
00003 
00004 // vim:set tabstop=4 cindent:
00005 
00006 // Author: Geert-Jan Giezeman <geert@cs.uu.nl>
00007 // Copyright: Utrecht University, 2011
00008 
00009 #include "uuc3d.hpp"
00010 #include "skeleton_info.hpp"
00011 
00012 namespace UuIcsC3d
00013 {
00022         struct LabeledSubject {
00026                 LabeledSubject(std::string const &name, MarkerNames const &label_info);
00030                 std::string name() const {return m_name;}
00033                 unsigned label_count() const { return m_label_count;}
00038                 std::vector<int> const &point_index() const { return m_point_index;}
00041                 void set_name(std::string const &name) {m_name=name;}
00045                 void set_index(int el, int val) {m_point_index[el]=val;}
00046         private:
00047                 std::string m_name; // The prefix that is used in the labelling
00048                 unsigned m_label_count;
00049                 std::vector<int> m_point_index; 
00050         };
00060         std::vector<unsigned> fill_subjects(std::vector<LabeledSubject> &subjects,
00061                                         std::vector<SpacePaddedString> const &labels,
00062                                         MarkerNames const &marker_names);
00066         struct LabeledSkeleton {
00070                 LabeledSkeleton(std::string const &name, SkeletonInfo const &skel_info);
00074                 std::string name() const {return m_name;}
00077                 unsigned label_count() const { return m_label_count;}
00082                 std::vector< std::vector<int> > const &point_index() const { return m_point_index;}
00085                 void set_name(std::string const &name) {m_name=name;}
00089                 void set_index(int gr, int el, int val) {m_point_index[gr][el]=val;}
00090         private:
00091                 std::string m_name; // The prefix that is used in the labelling
00092                 unsigned m_label_count;
00093                 std::vector< std::vector<int> > m_point_index; 
00094         };
00095 
00105         std::vector<unsigned> fill_skeletons(std::vector<LabeledSkeleton> &subjects,
00106                                         std::vector<SpacePaddedString> const &labels,
00107                                         SkeletonInfo const &skel_info);
00108 
00109         
00113 }
00114 
00115 #endif // SUBJ83SNKRIWON423KHTJEIYU589
 All Classes Namespaces Files Functions Variables Typedefs Enumerations