1 /*=========================================================================
4 Module: $RCSfile: wxMPRWidget.h,v $
6 Date: $Date: 2009/05/19 11:17:28 $
7 Version: $Revision: 1.12 $
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>
47 #include "wxMPRBaseData.h"
48 #include "wxVtkBaseView.h"
50 #include <wx/notebook.h>
51 #include <wx/listbox.h>
52 #include <wx/tglbtn.h>
53 #include <wx/splitter.h>
55 #include "vtkInteractorStyleSphere.h"
58 #include "wxVtkMPR3DView.h"
59 #include "wxVtkMPR2DView.h"
60 #include "vtkPlane2DView.h"
61 #include "wxSphereView.h"
62 #include "wxVtkClipping3DView.h"
63 #include "wxPanelCuttingImageData.h"
64 #include "wxWidgetMesure2D_Plane_in_MPR.h"
66 #include "wxVtk3DBaseView.h"
69 //class vtkInteractorStylePlane2D;
70 //class vtkInfoTextImageInteractorPlane2D;
71 //class vtkInteractorStyleMPRView;
72 //class wxVtkMPR3DView;
73 //class wxVtkClipping3DView;
75 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
78 wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL,double voxelSize = -1);
82 virtual void OnRefreshView(wxCommandEvent & event);
83 void OnDClickLeft(wxCommandEvent & event);
85 void OnPageAChanged(wxNotebookEvent & event);
86 void OnPageBChanged(wxNotebookEvent & event);
88 vtkMPRBaseData *GetVtkMPRBaseData();
89 vtkPlane2DView *GetVtkPlane2DView();
91 //returns the 3d view of the widget
92 wxVtkMPR3DView *GetWxvtkmpr3Dview_BB();
94 void RefreshView(bool firsttime=false);
96 wxVtkBaseView *GetWxVtkBaseView(int page, int id);
98 //returns the 2d view of the specific direction (0|1|2)
99 wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
101 void setImageData(vtkImageData * img, double voxelsize);
105 marImageData *_marImageData;
106 vtkMPRBaseData *_vtkmprbasedata;
107 wxVtkMPR2DView *_vtkmpr2Dview[3];
108 vtkPlane2DView *_vtkplane2Dview;
109 wxSphereView *_wxsphereview;
110 wxVtkMPR2DView *_vtkmpr2Dview_B[3];
111 vtkPlane2DView *_vtkplane2Dview_B;
112 wxSphereView *_wxsphereview_B;
114 wxVtk3DBaseView *_wxvtk3Dbaseview_MPRClipping3D;
115 wxVtkMPR3DView *_wxvtkmpr3Dview;
116 wxVtkClipping3DView *_wxvtkclipping3Dview;
118 wxVtk3DBaseView *_wxvtk3Dbaseview_MPR3D_B;
119 wxVtkMPR3DView *_wxvtkmpr3Dview_B;
121 wxVtk3DBaseView *_wxvtk3Dbaseview_Clipping3D_BB;
122 wxVtkMPR3DView *_wxvtkmpr3Dview_BB;
123 wxVtkClipping3DView *_wxvtkclipping3Dview_BB;
129 wxFrame *_framePanelCutting;
130 wxCheckBox *_btnCutImageData;
131 wxPanelCuttingImageData *_panelCutting;
133 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure;
134 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure_B;
136 wxPanel *CreateControlPanel(wxWindow *parent);
137 wxPanel *CreateMPRPanel(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
138 wxPanel *CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
139 wxPanel *CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
141 void OnCutImagaData( wxCommandEvent &event);
143 DECLARE_EVENT_TABLE( );
146 #endif // __WX__MPR__WIDGET__HXX__
150 // EOF - wxMPRWidget.h