/*========================================================================= Program: wxMaracas Module: $RCSfile: CutModelManager.h,v $ Language: C++ Date: $Date: 2009/08/31 08:46:12 $ Version: $Revision: 1.1 $ 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 __CutModelManagerH__ #define __CutModelManagerH__ #include #include #include "vtkImageData.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "CutModelException.h" #include "CutModelData.h" class CutModelManager { public: CutModelManager(); ~CutModelManager(); void setImageData(vtkImageData* img); void setInteractor(vtkRenderWindowInteractor* interactor); void setRenderer(vtkRenderer* renderer); void onAddCutModel(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(); private: void checkInvariant() throw( CutModelException); vtkImageData* _img; vtkImageData* _copyimg; vtkRenderer* _render; vtkRenderWindowInteractor* _interactor; std::vector _vectordata; CutModelData* getCutModelData(int id)throw( CutModelException); }; #endif