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 <vtkImageChangeInformation.h>
21 class KernelManagerContour{
23 //------------------------------------------------------------------------------------------------------------
24 // Constructors & Destructors
25 //------------------------------------------------------------------------------------------------------------
29 ** With this constructor the setVectImages and initialize environment must be called
31 KernelManagerContour();
33 ** If images are available before the construction of the kernelManager this method should be used
34 ** it sets the vector images and initializes the environment
36 KernelManagerContour(std::vector<vtkImageData*> images,std::string datadir);
37 ~KernelManagerContour();
39 std::vector<vtkImageData*> getVectImages();
40 void setVectImages(std::vector<vtkImageData*> vectimg);
43 ** This method returns the source of the image data selected by the user.
45 vtkImageData* getSourceImage();
49 void initializeEnvironment(std::string datadir);
53 ** This methods connect the event in the class interfNewContourMenu with the world of the appli
56 std::string createOutline(manualContourModel * manModelContour,std::vector<int> instantVector);
57 /////////////////////////////////
59 std::string intToString(int num);
61 std::vector<std::string> GetLstNameThingsStatic();
63 void SaveThingName(FILE* pFile, std::string name );
65 std::vector<std::string> GetLstNameThings();
67 bool IsPartOfStaticList(std::string keyName );
69 void deleteCModel(std::string theKeyName);
71 void removeAllOutlines();
73 //void setInstance(theInstant);
75 std::vector<NameWrapper *> getActualInstantOutlines();
77 int getNamesWrappingSize();
79 std::string getNameWrapping(int i);
81 void setInstant(Instant* theInstant);
82 void setInstant(std::vector<int> vectInstant);
83 std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
85 Instant * getCurrentInstant();
87 manualContourModel* getOutlineByKeyName(std::string cloneName);
89 bool onRedo(std::string& filename);
91 bool onUndo(std::string& filename);
93 bool onUndoSaveFile(std::string& filename);
95 std::string saveState();
97 void changeContourOfManager(std::string keyName, Instant *instant);
101 std::string onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants);
103 void getMaxMinZ(double *minZ,double *maxZ);
105 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);
107 manualContourModel* factoryManualContourModel(int typeContour);
109 void CalculeSplinePropagation();
111 std::vector<std::string> getOutlinesNameAtInstant(std::vector<int> tempvector);
113 std::vector<ContourThing**> getOutlinesAtInstant(Instant* instant );
115 std::vector<manualContourModel*> ExploseEachModel( std::vector<manualContourModel*> lstManConMod );
118 void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
120 vtkImageData* getImageAtInstant(std::vector<int> inst);
122 //------------------------------------------------------------------------------------------------------------
124 //------------------------------------------------------------------------------------------------------------
126 void setCurrentFileName(std::string filenam);
127 std::string getCurrentFileName();
129 //------------------------------------------------------------------------------------------------------------
131 //------------------------------------------------------------------------------------------------------------
132 std::vector<vtkImageData*> vectimages;
134 ImageSourceThing * imageSource;
136 //Instant * _actualInstant;
137 //Temporary attribute should be removed
138 OutlineModelManager * modelManager;
140 std::string filename;
145 std::string stundoredo;
147 ContourPropagation* _contourPropagation;
149 bool isInitContourPropagation();
151 OutlineModelManager* getOutlineModelManager();