X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvLandmarks.h;h=7920d6f9357787b3ccea6ff27b2e80214a4932d1;hb=4cc4b061cd3a55c91f3f09256f68336a2a748d4f;hp=29995c72978c6e7019fa27998cda7b5e4fcc0e95;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/vv/vvLandmarks.h b/vv/vvLandmarks.h index 29995c7..7920d6f 100644 --- a/vv/vvLandmarks.h +++ b/vv/vvLandmarks.h @@ -24,6 +24,7 @@ #include "vtkPolyData.h" #include "vtkPoints.h" #include "vvLandmarksGlyph.h" +#include "vtkStringArray.h" //typedef struct vvLandmark { @@ -38,16 +39,19 @@ public : vvLandmarks(int size); ~vvLandmarks(); - void LoadFile(std::string filename); + bool LoadFile(std::vector filename); void SaveFile(std::string filename); void AddLandmark(float x,float y,float z,float t,double value); void RemoveLastLandmark(); + void RemoveLandmark(int index); + void RemoveAll(); + void ChangeComments(int index, std::string comments); float* GetCoordinates(int index); double GetPixelValue(int index); std::string GetComments(int index); - unsigned int GetNumberOfPoints() { return (unsigned int) mLandmarks.size(); } + unsigned int GetNumberOfPoints() { return (unsigned int) mLandmarks[mTime].size(); } //int GetNumberOfSources(){return mText.size();} vtkPolyData* GetOutput() { @@ -55,19 +59,29 @@ public : } //vtkPolyData* GetSources(int i){return mText[i]->GetOutput();} void SetTime(int time); + int GetTime() {return mTime; } bool ErrorMsg(int num,const char * text); private: ///Helper function to tackle the use of the comma as the decimal separator std::string replace_dots(std::string input); - std::vector mLandmarks; + + typedef std::vector LandmarkContainerType; + std::vector mLandmarks; + vtkPolyData *mPolyData; std::vector mPoints; - vtkFloatArray* mIds; + std::vector mIds; //std::vector mText; - std::string mFilename; + std::vector mLabels; + std::vector mFilenames; int mFormatVersion; + int mTime; + + bool LoadTxtFile(std::vector filenames); + bool LoadPtsFile(std::vector filenames); + }; #endif