]> Creatis software - clitk.git/blob - vv/vvLandmarks.h
removed headers
[clitk.git] / vv / vvLandmarks.h
1 #ifndef vvLandmarks_h
2 #define vvLandmarks_h
3 #include <iostream>
4 #include <vector>
5
6 #include "vtkFloatArray.h"
7 #include "vtkPolyData.h"
8 #include "vtkPoints.h"
9 #include "vvLandmarksGlyph.h"
10
11 //typedef
12 struct vvLandmark {
13     float coordinates[4];
14     std::string comments;
15     double pixel_value;
16 };
17
18 class vvLandmarks
19 {
20 public :
21     vvLandmarks(int size);
22     ~vvLandmarks();
23
24     void LoadFile(std::string filename);
25     void SaveFile(std::string filename);
26
27     void AddLandmark(float x,float y,float z,float t,double value);
28     void RemoveLastLandmark();
29     void ChangeComments(int index, std::string comments);
30     float* GetCoordinates(int index);
31     double GetPixelValue(int index);
32     std::string GetComments(int index);
33     int GetNumberOfPoints() {
34         return mLandmarks.size();
35     }
36     //int GetNumberOfSources(){return mText.size();}
37
38     vtkPolyData* GetOutput() {
39         return mPolyData;
40     }
41     //vtkPolyData* GetSources(int i){return mText[i]->GetOutput();}
42     void SetTime(int time);
43
44     bool ErrorMsg(int num,const char * text);
45
46 private:
47     ///Helper function to tackle the use of the comma as the decimal separator
48     std::string replace_dots(std::string input);
49     std::vector<vvLandmark> mLandmarks;
50     vtkPolyData *mPolyData;
51     std::vector<vtkPoints*> mPoints;
52     vtkFloatArray* mIds;
53     //std::vector<vvLandmarksGlyph*> mText;
54     std::string mFilename;
55     int mFormatVersion;
56 };
57
58 #endif