KernelManagerContour.h

Go to the documentation of this file.
00001 #ifndef __KERNELMANAGERCONTOUR__
00002 #define __KERNELMANAGERCONTOUR__
00003 
00004 
00005 
00006 //------------------------------------------------------------------------------------------------------------
00007 // Includes
00008 //------------------------------------------------------------------------------------------------------------
00009 //#include "ImageSourceThing.h"
00010 //#include "ImageSectionThing.h"
00011 //#include "AxeThing.h"
00012 //#include "ContourThing.h"
00013 #include "OutlineModelManager.h"
00014 #include "OutlineModelBuilder.h"
00015 #include "time.h"
00016 #ifdef ParserOsirix_BUILD
00017 #include "OsirixParser.h"
00018 #endif
00019 #include "ContourPropagation.h"
00020 
00021 #include "manualContourModel.h"
00022 #include "manualContourModelCircle.h"
00023 #include "manualContourModelLine.h"
00024 #include "manualContourModelRoi.h"
00025 #include "manualContourModelPolygon.h"
00026 
00027 #include <vtkImageChangeInformation.h>
00028 
00029 class KernelManagerContour{
00030 
00031 //------------------------------------------------------------------------------------------------------------
00032 // Constructors & Destructors
00033 //------------------------------------------------------------------------------------------------------------
00034 public:
00035 
00039         KernelManagerContour();
00044         KernelManagerContour(std::vector<vtkImageData*> images,std::string datadir,std::string tmpdir);
00045         ~KernelManagerContour();
00046 
00047         std::vector<vtkImageData*> getVectImages();
00048         void setVectImages(std::vector<vtkImageData*> vectimg);
00049 
00050         void GetSpacing(double *vecspc, int iImage);
00051 
00052         
00056         vtkImageData* getSourceImage();
00057 
00058 
00059 
00060         void initializeEnvironment(std::string datadir);
00061 
00062 
00067         std::string createOutline(manualBaseModel * manModelContour,std::vector<int> instantVector);
00069 
00070         std::string intToString(int num);
00071 
00072         std::vector<std::string> GetLstNameThingsStatic();
00073 
00074         void SaveThingName(FILE* pFile, FILE *pFileData, std::string name );
00075 
00076         std::vector<std::string> GetLstNameThings();
00077 
00078         bool IsPartOfStaticList(std::string keyName );
00079 
00080         void deleteCModel(std::string theKeyName);
00081 
00082         void removeAllOutlines();
00083 
00084         //void setInstance(theInstant);
00085 
00086         std::vector<NameWrapper *> getActualInstantOutlines();
00087 
00088         int getNamesWrappingSize();
00089 
00090         std::string getNameWrapping(int i);
00091 
00092         void setInstant(Instant* theInstant);
00093         void setInstant(std::vector<int> vectInstant);
00094         std::string createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData);
00095 
00096         Instant * getCurrentInstant();
00097 
00098         manualBaseModel* getOutlineByKeyName(std::string cloneName);
00099 
00100         bool onRedo(std::string& filename);
00101 
00102         bool onUndo(std::string& filename);
00103 
00104         bool onUndoSaveFile(std::string& filename);
00105 
00106         std::string saveState();
00107 
00108         void changeContourOfManager(std::string keyName, Instant *instant);
00109 
00110         void resetAppend();
00111 
00112         std::string onSpreadAdd( std::vector<double> *vecX, std::vector<double> *vecY, std::vector<double> *vecZ, std::vector<int> instants);
00113 
00114         void getMaxMinZ(double *minZ,double *maxZ);
00115 
00116         manualBaseModel* 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);
00117 
00118         //
00119         // Method which creates the model associated with the type in parameter. The possible contour types are:
00120         // 0-spline
00121         // 1-spline
00122         // 2-rectangle
00123         // 3-circle
00124         // 4-BullEye
00125         // 5-BullEyeSector
00126         // 6-Line
00127         // 7-Points
00128         // NOTE: The view and the controler are created in the wxVtkBaseView_SceneManager class, configureViewControlTo method
00129         // @param typeContour - int
00130         // @return manualBaseModel - Model created based on the type
00131         manualBaseModel* factoryManualContourModel(int typeContour);
00132 
00133         void CalculeSplinePropagation();
00134 
00135         std::vector<std::string> getOutlinesNameAtInstant(std::vector<int> tempvector);
00136 
00137         std::vector<ContourThing**> getOutlinesAtInstant(Instant* instant );
00138 
00139         std::vector<manualBaseModel*> ExploseEachModel( std::vector<manualBaseModel*> lstManConMod );
00140 
00141 
00142         void getConceptsInformation(std::vector<std::string>& conceptNameVect, std::vector<int>& conceptSizeVect);
00143 
00144         vtkImageData* getImageAtInstant(std::vector<int> inst);
00145 
00146 //------------------------------------------------------------------------------------------------------------
00147 // Constants
00148 //------------------------------------------------------------------------------------------------------------
00149 
00150         void setCurrentFileName(std::string filenam);
00151         std::string getCurrentFileName();
00152 
00153         std::string parseOsirixFile(std::string filename);
00154 private:
00155 //------------------------------------------------------------------------------------------------------------
00156 // Attributes
00157 //------------------------------------------------------------------------------------------------------------
00158         std::vector<vtkImageData*>                              vectimages;
00159         std::vector<std::vector<double> >               vectimagesSpacing;
00160 
00161         ImageSourceThing                                                *imageSource;
00162 
00163         //Instant * _actualInstant;
00164 //Temporary attribute should be removed
00165         OutlineModelManager                                             *modelManager;
00166 
00167         std::string                                                             filename;
00168 
00169         int                                                                             inredo;
00170         int                                                                             inundo;
00171         int                                                                             _currentIndex;
00172         std::string                                                             stundoredo;
00173         std::string                                                             _datadir;
00174 
00175         ContourPropagation                                              *_contourPropagation;
00176 
00177         OutlineModelManager                                             *getOutlineModelManager();
00178 };
00179 #endif

Generated on Wed Jun 27 23:28:33 2012 for creaContours_lib by  doxygen 1.5.7.1