/*=========================================================================
- Program: wxMaracas
- Module: $RCSfile: CutModelManager.h,v $
- Language: C++
- Date: $Date: 2009/12/08 13:42:39 $
- Version: $Revision: 1.4 $
-
- 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.
=========================================================================*/
#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 {
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);
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::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