1 #ifndef __KERNELMANAGERCONTOUR__
2 #define __KERNELMANAGERCONTOUR__
6 //------------------------------------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------------------------------------
9 //#include "ImageSourceThing.h"
10 //#include "ImageSectionThing.h"
11 //#include "AxeThing.h"
12 //#include "ContourThing.h"
13 #include "OutlineModelManager.h"
14 #include "OutlineModelBuilder.h"
17 #include "ContourPropagation.h"
19 #include "manualContourModel.h"
20 #include "manualContourModelCircle.h"
21 #include "manualContourModelLine.h"
22 #include "manualContourModelRoi.h"
24 #include <vtkImageChangeInformation.h>
26 class KernelManagerContour{
28 //------------------------------------------------------------------------------------------------------------
29 // Constructors & Destructors
30 //------------------------------------------------------------------------------------------------------------
34 ** With this constructor the setVectImages and initialize environment must be called
36 KernelManagerContour();
38 ** If images are available before the construction of the kernelManager this method should be used
39 ** it sets the vector images and initializes the environment
41 KernelManagerContour(std::vector<vtkImageData*> images,std::string datadir,std::string tmpdir);
42 ~KernelManagerContour();
44 std::vector<vtkImageData*> getVectImages();
45 void setVectImages(std::vector<vtkImageData*> vectimg);
48 ** This method returns the source of the image data selected by the user.
50 vtkImageData* getSourceImage();
54 void initializeEnvironment(std::string datadir);
58 ** This methods connect the event in the class interfNewContourMenu with the world of the appli
61 std::string createOutline(manualContourModel * manModelContour,std::vector<int> instantVector);
62 /////////////////////////////////
64 std::string intToString(int num);
66 std::vector<std::string> GetLstNameThingsStatic();
68 void SaveThingName(FILE* pFile, std::string name );
70 std::vector<std::string> GetLstNameThings();
72 bool IsPartOfStaticList(std::string keyName );
74 void deleteCModel(std::string theKeyName);
76 void removeAllOutlines();
78 //void setInstance(theInstant);
80 std::vector<NameWrapper *> getActualInstantOutlines();
82 int getNamesWrappingSize();
84 std::string getNameWrapping(int i);
86 void setInstant(Instant* theInstant);
87 void setInstant(std::vector<int> vectInstant);
88 std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
90 Instant * getCurrentInstant();
92 manualContourModel* getOutlineByKeyName(std::string cloneName);
94 bool onRedo(std::string& filename);
96 bool onUndo(std::string& filename);
98 bool onUndoSaveFile(std::string& filename);
100 std::string saveState();
102 void changeContourOfManager(std::string keyName, Instant *instant);
106 std::string onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants);
108 void getMaxMinZ(double *minZ,double *maxZ);
110 manualContourModel* GetPoints(int z,int type, std::vector<double>* vecCtrlPointX,std::vector<double>* vecCtrlPointY,std::vector<double>* vecCtrlPointZ, std::string& theName,int typeofcontour, std::vector<int> tempVector);
112 manualContourModel* factoryManualContourModel(int typeContour);
114 void CalculeSplinePropagation();
116 std::vector<std::string> getOutlinesNameAtInstant(std::vector<int> tempvector);
118 std::vector<ContourThing**> getOutlinesAtInstant(Instant* instant );
120 std::vector<manualContourModel*> ExploseEachModel( std::vector<manualContourModel*> lstManConMod );
123 void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
125 vtkImageData* getImageAtInstant(std::vector<int> inst);
127 //------------------------------------------------------------------------------------------------------------
129 //------------------------------------------------------------------------------------------------------------
131 void setCurrentFileName(std::string filenam);
132 std::string getCurrentFileName();
134 //------------------------------------------------------------------------------------------------------------
136 //------------------------------------------------------------------------------------------------------------
137 std::vector<vtkImageData*> vectimages;
139 ImageSourceThing * imageSource;
141 //Instant * _actualInstant;
142 //Temporary attribute should be removed
143 OutlineModelManager * modelManager;
145 std::string filename;
150 std::string stundoredo;
152 ContourPropagation* _contourPropagation;
154 bool isInitContourPropagation();
156 OutlineModelManager* getOutlineModelManager();