/*========================================================================= Program: wxMaracas Module: $RCSfile: CutModel2Manager.h,v $ Language: C++ Date: $Date: 2009/11/23 13:00:31 $ Version: $Revision: 1.3 $ 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. =========================================================================*/ #ifndef __CutModel2ManagerH__ #define __CutModel2ManagerH__ #include #include #include #include "vtkImageData.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include #include "CutModelException.h" #include "CutModelData.h" #include "CutModelSaveBinInfo.h" class CutModel2Manager { public: CutModel2Manager(std::string path); ~CutModel2Manager(); void setImageData(vtkImageData* img); void setInteractor(vtkRenderWindowInteractor* interactor); void setRenderer(vtkRenderer* renderer); void onAddCutModel2(int id, vtkCommand* observer) throw( CutModelException); double* getImageRange()throw( CutModelException); void changeOpacity(int id,int opacity)throw( CutModelException); void ShowViewBox(int id,bool check)throw( CutModelException); void ChangeShape(int id,int selection)throw( CutModelException); void changeColor(int id,double r,double g,double b)throw( CutModelException); void updateActorDirection(int id)throw( CutModelException); void RemoveActor(int id)throw( CutModelException); void ExecuteCut(int id, double* range, bool isinside)throw( CutModelException); vtkImageData* GetResultImage(); void RefreshActor(int id); 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); private: int _currentaction; void checkInvariant() throw( CutModelException); std::string _path; vtkImageData* _img; vtkImageData* _copyimg; vtkRenderer* _render; vtkRenderWindowInteractor* _interactor; std::vector _vectordata; std::vector _undoredo; CutModelData* getCutModelData(int id)throw( CutModelException); }; #endif