1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 /*=========================================================================
29 Module: $RCSfile: wxMPRWidget.h,v $
31 Date: $Date: 2012/11/15 14:14:35 $
32 Version: $Revision: 1.13 $
34 Copyright: (c) 2002, 2003
37 This software is distributed WITHOUT ANY WARRANTY; without even
38 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39 PURPOSE. See the above copyright notice for more information.
41 =========================================================================*/
43 #ifndef __WX__MPR__WIDGET__HXX__
44 #define __WX__MPR__WIDGET__HXX__
49 #include <vtkObjectBase.h>
50 #include <vtkCommand.h>
52 #include <vtkPoints.h>
53 #include <vtkPolyData.h>
54 #include <vtkPolyDataMapper.h>
55 #include <vtkProbeFilter.h>
56 #include <vtkPlaneSource.h>
57 #include <vtkImageChangeInformation.h>
58 #include <vtkStructuredPoints.h>
59 #include <vtkTransform.h>
60 #include <vtkImageViewer2.h>
61 #include <vtkBoxWidget.h>
62 #include <vtkPointWidget.h>
63 #include <vtkPlaneWidget.h>
65 #include <vtkCubeSource.h>
66 #include <vtkCylinderSource.h>
67 #include <vtkSphereSource.h>
68 #include <vtkProperty2D.h>
69 #include <vtkTextProperty.h>
70 #include <vtkXYPlotActor.h>
72 #include "wxMPRBaseData.h"
73 #include "wxVtkBaseView.h"
75 #include <wx/notebook.h>
76 #include <wx/listbox.h>
77 #include <wx/tglbtn.h>
78 #include <wx/splitter.h>
80 #include "vtkInteractorStyleSphere.h"
83 #include "wxVtkMPR3DView.h"
84 #include "wxVtkMPR2DView.h"
85 #include "vtkPlane2DView.h"
86 #include "wxSphereView.h"
87 #include "wxVtkClipping3DView.h"
88 #include "wxPanelCuttingImageData.h"
89 #include "wxWidgetMesure2D_Plane_in_MPR.h"
91 #include "wxVtk3DBaseView.h"
94 //class vtkInteractorStylePlane2D;
95 //class vtkInfoTextImageInteractorPlane2D;
96 //class vtkInteractorStyleMPRView;
97 //class wxVtkMPR3DView;
98 //class wxVtkClipping3DView;
100 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
103 wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL);
107 virtual void OnRefreshView(wxCommandEvent & event);
108 void OnDClickLeft(wxCommandEvent & event);
110 void OnPageAChanged(wxNotebookEvent & event);
111 void OnPageBChanged(wxNotebookEvent & event);
113 vtkMPRBaseData *GetVtkMPRBaseData();
114 vtkPlane2DView *GetVtkPlane2DView();
116 //returns the 3d view of the widget
117 wxVtkMPR3DView *GetWxvtkmpr3Dview_BB();
119 void RefreshView(bool firsttime=false);
121 wxVtkBaseView *GetWxVtkBaseView(int page, int id);
123 //returns the 2d view of the specific direction (0|1|2)
124 wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
126 void setImageData(vtkImageData * img);
129 marImageData *_marImageData;
130 vtkMPRBaseData *_vtkmprbasedata;
131 wxVtkMPR2DView *_vtkmpr2Dview[3];
132 vtkPlane2DView *_vtkplane2Dview;
133 wxSphereView *_wxsphereview;
134 wxVtkMPR2DView *_vtkmpr2Dview_B[3];
135 vtkPlane2DView *_vtkplane2Dview_B;
136 wxSphereView *_wxsphereview_B;
138 wxVtk3DBaseView *_wxvtk3Dbaseview_MPRClipping3D;
139 wxVtkMPR3DView *_wxvtkmpr3Dview;
140 wxVtkClipping3DView *_wxvtkclipping3Dview;
142 wxVtk3DBaseView *_wxvtk3Dbaseview_MPR3D_B;
143 wxVtkMPR3DView *_wxvtkmpr3Dview_B;
145 wxVtk3DBaseView *_wxvtk3Dbaseview_Clipping3D_BB;
146 wxVtkMPR3DView *_wxvtkmpr3Dview_BB;
147 wxVtkClipping3DView *_wxvtkclipping3Dview_BB;
153 wxFrame *_framePanelCutting;
154 wxCheckBox *_btnCutImageData;
155 wxPanelCuttingImageData *_panelCutting;
157 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure;
158 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure_B;
160 wxPanel *CreateControlPanel(wxWindow *parent);
161 wxPanel *CreateMPRPanel(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
162 wxPanel *CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
163 wxPanel *CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
165 void OnCutImagaData( wxCommandEvent &event);
167 DECLARE_EVENT_TABLE( );
170 #endif // __WX__MPR__WIDGET__HXX__
174 // EOF - wxMPRWidget.h