X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvLandmarks.h;h=285b24a741033d30cd8be685d5a88c38d1397bc8;hb=HEAD;hp=29995c72978c6e7019fa27998cda7b5e4fcc0e95;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/vv/vvLandmarks.h b/vv/vvLandmarks.h index 29995c7..285b24a 100644 --- a/vv/vvLandmarks.h +++ b/vv/vvLandmarks.h @@ -24,6 +24,8 @@ #include "vtkPolyData.h" #include "vtkPoints.h" #include "vvLandmarksGlyph.h" +#include "vtkStringArray.h" +#include //typedef struct vvLandmark { @@ -38,16 +40,22 @@ 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 TransformUpdate(vtkAbstractTransform* transform); void RemoveLastLandmark(); + void RemoveLandmarkWithLabel(vtkStdString, int); + 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(); } + vtkStringArray* GetLabels() { return mLabels[mTime]; } + unsigned int GetNumberOfPoints() { return (unsigned int) mLandmarks[mTime].size(); } //int GetNumberOfSources(){return mText.size();} vtkPolyData* GetOutput() { @@ -55,19 +63,30 @@ 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; + std::vector mLandmarksInitial; + 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