00001 #ifndef IMPORT_H_ 00002 #define IMPORT_H_ 00003 00004 #include <vector> 00005 #include <complex> 00006 #include <iostream> 00007 #include <fstream> 00008 00009 #include <Matrix.h> 00010 00011 00012 using namespace std; 00013 00015 class GMMData 00016 { 00017 00018 public: 00019 00021 GMMData(); 00022 00024 ~GMMData(); 00025 00028 int ReadRawTextFile(const char * filename); 00029 00032 int ReadMorphologikaFile(const char * filename); 00033 00036 int ReadNTSFile(const char * filename); 00037 00040 int ReadTPSFile(const char * filename); 00041 00044 int ReadMorphoJFile(const char * filename); 00045 00048 int GetNumberOfSpecimens(); 00049 00052 int GetNumberOfLandmarks(); 00053 00056 int GetNumberOfDimensions(); 00057 00058 void GetRawData(vector<vector<double> > *rawData) 00059 { 00060 *rawData = m_rawdata; 00061 } 00062 void GetWireframe(vector<vector<int> > *wireframe) 00063 { 00064 *wireframe = m_wireframe; 00065 } 00066 void GetPolygons(vector<vector<int> > *polygons) 00067 { 00068 *polygons = m_polygons; 00069 } 00070 void GetGroups(vector<string> *groups) 00071 { 00072 *groups = m_groups; 00073 } 00074 void GetNames(vector<string> *names) 00075 { 00076 *names = m_names; 00077 } 00078 void GetComments(vector<string> *comments) 00079 { 00080 *comments = m_comments; 00081 } 00082 void GetLabelnames(vector<string> *labelnames) 00083 { 00084 *labelnames = m_labelnames; 00085 } 00086 void GetLabelvalues(vector<vector<string> > *labelvalues) 00087 { 00088 *labelvalues = m_labelvalues; 00089 } 00090 void SetGroups(vector<string> groups) 00091 { 00092 m_groups = groups; 00093 } 00094 void SetNames(vector<string> names) 00095 { 00096 m_names = names; 00097 } 00098 void SetComments(vector<string> comments) 00099 { 00100 m_comments = comments; 00101 } 00102 void SetLabelnames(vector<string> labelnames) 00103 { 00104 m_labelnames = labelnames; 00105 } 00106 void SetLabelvalues(vector<vector<string> > labelvalues) 00107 { 00108 m_labelvalues = labelvalues; 00109 } 00110 00111 private: 00112 00113 int m_dimensions; 00114 int m_landmarks; 00115 int m_individuals; 00116 00117 vector<vector<double> > m_rawdata; 00118 vector<Matrix<double> > m_coordinates; 00119 00120 vector<vector<int> > m_wireframe; 00121 vector<vector<int> > m_polygons; 00122 00123 vector<string> m_groups; 00124 vector<string> m_names; 00125 vector<string> m_comments; 00126 vector<string> m_labelnames; 00127 vector<vector<string> > m_labelvalues; 00128 vector<string> m_images; 00129 vector<string> m_rowLabels; 00130 vector<string> m_colLabels; 00131 }; 00132 00133 00134 00135 #endif // IMPORT_H 00136