]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/CutModule/kernel/CutModelManager.h
comment out unused
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / kernel / CutModelManager.h
index 280e85ca4ba4cdbb2b7e01908764d6ba03122a62..abc8d3e95686142707cf1d225f6da9b39aa95075 100644 (file)
@@ -1,17 +1,17 @@
 /*=========================================================================
 
-  Program:   wxMaracas
-  Module:    $RCSfile: CutModelManager.h,v $
-  Language:  C++
-  Date:      $Date: 2009/09/01 14:01:36 $
-  Version:   $Revision: 1.2 $
-
-  Copyright: (c) 2002, 2003
-  License:
-  
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notice for more information.
+Program:   wxMaracas
+Module:    $RCSfile: CutModelManager.h,v $
+Language:  C++
+Date:      $Date: 2010/02/24 13:56:08 $
+Version:   $Revision: 1.5 $
+
+Copyright: (c) 2002, 2003
+License:
+
+This software is distributed WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+PURPOSE.  See the above copyright notice for more information.
 
 =========================================================================*/
 
 #define __CutModelManagerH__
 
 #include <iostream>
+#include <stdio.h>
 #include <vector>
 
 #include "vtkImageData.h"
 #include "vtkRenderWindowInteractor.h"
 #include "vtkRenderer.h"
+#include "wxVtkBaseView.h"
+#include "wxVtk3DBaseView.h"
+#include <vtkPolyDataWriter.h>
 
 #include "CutModelException.h"
 #include "CutModelData.h"
+#include "CutModelSaveBinInfo.h"
+
+#include "vtkPoints.h"
+#include "CutModelPolygon.h"
+#include "vtkInteractorStyleTrackballCamera.h"
+#include "vtkInteractorStyleCutter.h"
+#include "wxVTKRenderWindowInteractor.h"
+#include "vtkImplicitSelectionLoop.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkSampleFunction.h"
+#include "vtkContourFilter.h"
+#include "vtkPolyData.h"
+#include "vtkActor.h"
+
+
 
 class CutModelManager  {
 
 public:
-       CutModelManager();
+       CutModelManager(std::string path);
        ~CutModelManager();
 
        void setImageData(vtkImageData* img);
 
+       vtkImageData* getImageData();
+
        void setInteractor(vtkRenderWindowInteractor* interactor);
 
        void setRenderer(vtkRenderer* renderer);
-       
+
+       void setBaseView(wxVtkBaseView* baseView);
+
        void onAddCutModel(int id, vtkCommand* observer) throw( CutModelException);
 
        double* getImageRange()throw( CutModelException);
@@ -64,16 +87,54 @@ public:
        vtkImageData* GetResultImage();
 
        void RefreshActor(int id);
-private:       
+
+       void SaveCutModelData(std::string filename)throw( CutModelException);
+
+       void LoadCutModelData(std::string filename)throw( CutModelException);
+
+       CutModelSaveBinInfo* AddActionUndo(int id, UNDOTYPE type)throw( CutModelException);
+
+       int Undo()throw( CutModelException);
+
+       int Redo()throw( CutModelException);
+
+       void ParallelProjectionOn();
+
+       void ParallelProjectionOff();
+
+       void UpdatePolygon(bool mode);
+
+       void ExecuteCutPolygon(bool inOutCut);
+
+       void InitializePolygonInteractorStyle();
+
+private:
+
+       int _currentaction;
+
        void checkInvariant() throw( CutModelException);
+       std::string _path;
        vtkImageData* _img;
-       vtkImageData* _copyimg;
+       vtkImageData* _img2;
        vtkRenderer* _render;
        vtkRenderWindowInteractor* _interactor;
 
        std::vector<CutModelData*> _vectordata;
+       std::vector<CutModelSaveBinInfo*> _undoredo;
        CutModelData* getCutModelData(int id)throw( CutModelException);
-       
+
+       CutModelPolygon* _polygonCutter;
+       vtkPoints *contourPoints ;
+       double *contourDirection;       
+       vtkInteractorStyleTrackballCamera *interactorstyle;
+       vtkInteractorStyleCutter *cutterstyle;
+       vtkContourFilter *contour;
+       vtkSampleFunction *sample;
+       vtkPolyData *actor;
+       vtkActor *actor3D;
+       vtkImplicitSelectionLoop *loop;
+       vtkPolyDataMapper *mapper;
+
 };
 
 #endif