1 /*=========================================================================
4 Module: $RCSfile: wxMPRWidget.h,v $
6 Date: $Date: 2009/05/14 13:54:35 $
7 Version: $Revision: 1.10 $
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 =========================================================================*/
18 #ifndef __WX__MPR__WIDGET__HXX__
19 #define __WX__MPR__WIDGET__HXX__
24 #include <vtkObjectBase.h>
25 #include <vtkCommand.h>
27 #include <vtkPoints.h>
28 #include <vtkPolyData.h>
29 #include <vtkPolyDataMapper.h>
30 #include <vtkProbeFilter.h>
31 #include <vtkPlaneSource.h>
32 #include <vtkImageChangeInformation.h>
33 #include <vtkStructuredPoints.h>
34 #include <vtkTransform.h>
35 #include <vtkImageViewer2.h>
36 #include <vtkBoxWidget.h>
37 #include <vtkPointWidget.h>
38 #include <vtkPlaneWidget.h>
40 #include <vtkCubeSource.h>
41 #include <vtkCylinderSource.h>
42 #include <vtkSphereSource.h>
43 #include <vtkProperty2D.h>
44 #include <vtkTextProperty.h>
45 #include <vtkXYPlotActor.h>
48 //#include "kernel/marInterface.h"
49 #include "manualContour.h"
51 #include "wxMPRBaseData.h"
52 #include "wxVtkBaseView.h"
54 #include <wx/notebook.h>
55 #include <wx/listbox.h>
56 #include <wx/tglbtn.h>
57 #include <wx/splitter.h>
59 #include "vtkInteractorStyleSphere.h"
62 #include "wxVtkMPR3DView.h"
63 #include "wxVtkMPR2DView.h"
64 #include "vtkPlane2DView.h"
65 #include "wxSphereView.h"
66 #include "wxVtkClipping3DView.h"
67 #include "wxPanelCuttingImageData.h"
68 #include "wxWidgetMesure2D_Plane_in_MPR.h"
70 #include "wxVtk3DBaseView.h"
73 //class vtkInteractorStylePlane2D;
74 //class vtkInfoTextImageInteractorPlane2D;
75 //class vtkInteractorStyleMPRView;
76 //class wxVtkMPR3DView;
77 //class wxVtkClipping3DView;
79 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
82 wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL,double voxelSize = -1);
86 virtual void OnRefreshView(wxCommandEvent & event);
87 void OnDClickLeft(wxCommandEvent & event);
89 void OnPageAChanged(wxNotebookEvent & event);
90 void OnPageBChanged(wxNotebookEvent & event);
92 vtkMPRBaseData *GetVtkMPRBaseData();
93 vtkPlane2DView *GetVtkPlane2DView();
95 //returns the 3d view of the widget
96 wxVtkMPR3DView *GetWxvtkmpr3Dview_BB();
98 void RefreshView(bool firsttime=false);
100 wxVtkBaseView *GetWxVtkBaseView(int page, int id);
102 //returns the 2d view of the specific direction (0|1|2)
103 wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
105 void setImageData(vtkImageData * img, double voxelsize);
109 marImageData *_marImageData;
110 vtkMPRBaseData *_vtkmprbasedata;
111 wxVtkMPR2DView *_vtkmpr2Dview[3];
112 vtkPlane2DView *_vtkplane2Dview;
113 wxSphereView *_wxsphereview;
114 wxVtkMPR2DView *_vtkmpr2Dview_B[3];
115 vtkPlane2DView *_vtkplane2Dview_B;
116 wxSphereView *_wxsphereview_B;
118 wxVtk3DBaseView *_wxvtk3Dbaseview_MPRClipping3D;
119 wxVtkMPR3DView *_wxvtkmpr3Dview;
120 wxVtkClipping3DView *_wxvtkclipping3Dview;
122 wxVtk3DBaseView *_wxvtk3Dbaseview_MPR3D_B;
123 wxVtkMPR3DView *_wxvtkmpr3Dview_B;
125 wxVtk3DBaseView *_wxvtk3Dbaseview_Clipping3D_BB;
126 wxVtkMPR3DView *_wxvtkmpr3Dview_BB;
127 wxVtkClipping3DView *_wxvtkclipping3Dview_BB;
133 wxFrame *_framePanelCutting;
134 wxCheckBox *_btnCutImageData;
135 wxPanelCuttingImageData *_panelCutting;
137 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure;
138 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure_B;
140 wxPanel *CreateControlPanel(wxWindow *parent);
141 wxPanel *CreateMPRPanel(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
142 wxPanel *CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
143 wxPanel *CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
145 void OnCutImagaData( wxCommandEvent &event);
147 DECLARE_EVENT_TABLE( );
150 #endif // __WX__MPR__WIDGET__HXX__
154 // EOF - wxMPRWidget.h