1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
23 #include "vtkFloatArray.h"
24 #include "vtkPolyData.h"
25 #include "vtkPoints.h"
26 #include "vvLandmarksGlyph.h"
27 #include "vtkStringArray.h"
39 vvLandmarks(int size);
42 bool LoadFile(std::vector<std::string> filename);
43 void SaveFile(std::string filename);
45 void AddLandmark(float x,float y,float z,float t,double value);
46 void RemoveLastLandmark();
47 void RemoveLandmark(int index);
50 void ChangeComments(int index, std::string comments);
51 float* GetCoordinates(int index);
52 double GetPixelValue(int index);
53 std::string GetComments(int index);
54 unsigned int GetNumberOfPoints() { return (unsigned int) mLandmarks[mTime].size(); }
55 //int GetNumberOfSources(){return mText.size();}
57 vtkPolyData* GetOutput() {
60 //vtkPolyData* GetSources(int i){return mText[i]->GetOutput();}
61 void SetTime(int time);
62 int GetTime() {return mTime; }
64 bool ErrorMsg(int num,const char * text);
67 ///Helper function to tackle the use of the comma as the decimal separator
68 std::string replace_dots(std::string input);
70 typedef std::vector<vvLandmark> LandmarkContainerType;
71 std::vector<LandmarkContainerType> mLandmarks;
73 vtkPolyData *mPolyData;
74 std::vector<vtkPoints*> mPoints;
75 std::vector<vtkFloatArray*> mIds;
76 //std::vector<vvLandmarksGlyph*> mText;
77 std::vector<vtkStringArray*> mLabels;
78 std::vector<std::string> mFilenames;
82 bool LoadTxtFile(std::vector<std::string> filenames);
83 bool LoadPtsFile(std::vector<std::string> filenames);