1 #ifndef __KERNELMANAGERCONTOUR__
2 #define __KERNELMANAGERCONTOUR__
6 //------------------------------------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------------------------------------
9 #include "ImageSourceThing.h"
10 #include "ImageSectionThing.h"
12 #include "ContourThing.h"
13 #include "OutlineModelManager.h"
14 #include "OutlineModelBuilder.h"
16 #include "ContourPropagation.h"
19 class KernelManagerContour{
21 //------------------------------------------------------------------------------------------------------------
22 // Constructors & Destructors
23 //------------------------------------------------------------------------------------------------------------
27 ** With this constructor the setVectImages and initialize environment must be called
29 KernelManagerContour();
31 ** If images are available before the construction of the kernelManager this method should be used
32 ** it sets the vector images and initializes the environment
34 KernelManagerContour(std::vector<vtkImageData*> images);
35 ~KernelManagerContour();
37 std::vector<vtkImageData*> getVectImages();
38 void setVectImages(std::vector<vtkImageData*> vectimg);
41 ** This method returns the source of the image data selected by the user.
43 vtkImageData* getSourceImage();
47 void initializeEnvironment();
51 ** This methods connect the event in the class interfNewContourMenu with the world of the appli
54 std::string createOutline(manualContourModel * manModelContour,std::vector<int> instantVector);
55 /////////////////////////////////
57 std::string intToString(int num);
59 std::vector<std::string> GetLstNameThingsStatic();
61 void SaveThingName(FILE* pFile, std::string name );
63 std::vector<std::string> GetLstNameThings();
65 bool IsPartOfStaticList(std::string keyName );
67 void deleteCModel(std::string theKeyName);
69 void removeAllOutlines();
71 //void setInstance(theInstant);
73 std::vector<NameWrapper *> getActualInstantOutlines();
75 int getNamesWrappingSize();
77 std::string getNameWrapping(int i);
79 void setInstant(Instant* theInstant);
80 void setInstant(std::vector<int> vectInstant);
81 std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
83 Instant * getCurrentInstant();
85 manualContourModel* getOutlineByKeyName(std::string cloneName);
87 bool onRedo(std::string& filename);
89 bool onUndo(std::string& filename);
91 bool onUndoSaveFile(std::string& filename);
93 std::string saveState();
95 void changeContourOfManager(std::string keyName, Instant *instant);
99 std::string onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants);
101 void getMaxMinZ(double *minZ,double *maxZ);
103 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);
105 manualContourModel* factoryManualContourModel(int typeContour);
107 void CalculeSplinePropagation();
109 std::vector<std::string> getOutlinesNameAtInstant(std::vector<int> tempvector);
111 std::vector<ContourThing**> getOutlinesAtInstant(Instant* instant );
113 std::vector<manualContourModel*> ExploseEachModel( std::vector<manualContourModel*> lstManConMod );
116 void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
118 vtkImageData* getImageAtInstant(std::vector<int> inst);
120 //------------------------------------------------------------------------------------------------------------
122 //------------------------------------------------------------------------------------------------------------
125 //------------------------------------------------------------------------------------------------------------
127 //------------------------------------------------------------------------------------------------------------
128 std::vector<vtkImageData*> vectimages;
130 ImageSourceThing * imageSource;
132 //Instant * _actualInstant;
133 //Temporary attribute should be removed
134 OutlineModelManager * modelManager;
139 std::string stundoredo;
141 ContourPropagation* _contourPropagation;
143 bool isInitContourPropagation();
145 OutlineModelManager* getOutlineModelManager();