1 /*=========================================================================
4 Module: $RCSfile: CutModelData.h,v $
6 Date: $Date: 2009/09/01 14:01:36 $
7 Version: $Revision: 1.2 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
21 #ifndef __CutModelDataH__
22 #define __CutModelDataH__
27 #include "vtkImageData.h"
28 #include "vtkRenderWindowInteractor.h"
29 #include "vtkCommand.h"
30 #include "vtkBoxWidget.h"
31 #include "vtkPolyDataMapper.h"
33 #include "vtkProperty.h"
34 #include "CutModelException.h"
35 #include "CutModelFigure.h"
36 #include "CutModelFigureCube.h"
37 #include "CutModelFigureSphere.h"
38 #include "CutModelFigureCylinder.h"
45 CutModelData(int id, vtkRenderWindowInteractor* interactor, vtkCommand* observer, vtkImageData* img);
52 void changeOpacity(int opacity)throw( CutModelException);
54 void ShowViewBox(bool check)throw( CutModelException);
56 void ChangeShape(int selection)throw( CutModelException);
58 vtkActor* getActor()throw( CutModelException);
60 void changeColor(double r,double g,double b)throw( CutModelException);
62 void udapteActorDirection()throw( CutModelException);
64 void ExecuteCut( double* range, bool isinside, vtkImageData* copyimage)throw( CutModelException);
66 void RefreshViewBox();
69 void checkInvariant()throw( CutModelException);
71 void createBoxWidget(vtkRenderWindowInteractor* interactor, vtkCommand* observer);
73 void setTransform(vtkImageData* img)throw( CutModelException);
76 vtkBoxWidget* _boxWidgetVolume;
77 vtkPolyDataMapper* _Mapper;
83 CutModelFigureCube* _cubefigure;
84 CutModelFigureCylinder* _cylinderfigure;
85 CutModelFigureSphere* _spherefigure;
86 vtkTransform* currentmatrix;
87 vtkTransform* modeltransform;
88 vtkTransform* inversModel;
90 CutModelFigure* getCurentCuttingModel();
92 vtkTransform* getModelTransform(vtkImageData* copyimage);
93 vtkTransform* getModelTransformInvers();