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"
16 #include "ContourPropagation.h"
18 #include <vtkImageChangeInformation.h>
20 class KernelManagerContour{
22 //------------------------------------------------------------------------------------------------------------
23 // Constructors & Destructors
24 //------------------------------------------------------------------------------------------------------------
28 ** With this constructor the setVectImages and initialize environment must be called
30 KernelManagerContour();
32 ** If images are available before the construction of the kernelManager this method should be used
33 ** it sets the vector images and initializes the environment
35 KernelManagerContour(std::vector<vtkImageData*> images);
36 ~KernelManagerContour();
38 std::vector<vtkImageData*> getVectImages();
39 void setVectImages(std::vector<vtkImageData*> vectimg);
42 ** This method returns the source of the image data selected by the user.
44 vtkImageData* getSourceImage();
48 void initializeEnvironment();
52 ** This methods connect the event in the class interfNewContourMenu with the world of the appli
55 std::string createOutline(manualContourModel * manModelContour,std::vector<int> instantVector);
56 /////////////////////////////////
58 std::string intToString(int num);
60 std::vector<std::string> GetLstNameThingsStatic();
62 void SaveThingName(FILE* pFile, std::string name );
64 std::vector<std::string> GetLstNameThings();
66 bool IsPartOfStaticList(std::string keyName );
68 void deleteCModel(std::string theKeyName);
70 void removeAllOutlines();
72 //void setInstance(theInstant);
74 std::vector<NameWrapper *> getActualInstantOutlines();
76 int getNamesWrappingSize();
78 std::string getNameWrapping(int i);
80 void setInstant(Instant* theInstant);
81 void setInstant(std::vector<int> vectInstant);
82 std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
84 Instant * getCurrentInstant();
86 manualContourModel* getOutlineByKeyName(std::string cloneName);
88 bool onRedo(std::string& filename);
90 bool onUndo(std::string& filename);
92 bool onUndoSaveFile(std::string& filename);
94 std::string saveState();
96 void changeContourOfManager(std::string keyName, Instant *instant);
100 std::string onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants);
102 void getMaxMinZ(double *minZ,double *maxZ);
104 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);
106 manualContourModel* factoryManualContourModel(int typeContour);
108 void CalculeSplinePropagation();
110 std::vector<std::string> getOutlinesNameAtInstant(std::vector<int> tempvector);
112 std::vector<ContourThing**> getOutlinesAtInstant(Instant* instant );
114 std::vector<manualContourModel*> ExploseEachModel( std::vector<manualContourModel*> lstManConMod );
117 void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
119 vtkImageData* getImageAtInstant(std::vector<int> inst);
121 //------------------------------------------------------------------------------------------------------------
123 //------------------------------------------------------------------------------------------------------------
125 void setCurrentFileName(std::string filenam);
126 std::string getCurrentFileName();
128 //------------------------------------------------------------------------------------------------------------
130 //------------------------------------------------------------------------------------------------------------
131 std::vector<vtkImageData*> vectimages;
133 ImageSourceThing * imageSource;
135 //Instant * _actualInstant;
136 //Temporary attribute should be removed
137 OutlineModelManager * modelManager;
139 std::string filename;
144 std::string stundoredo;
146 ContourPropagation* _contourPropagation;
148 bool isInitContourPropagation();
150 OutlineModelManager* getOutlineModelManager();