wxMPRWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: wxMPRWidget.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/19 11:17:28 $
00007   Version:   $Revision: 1.12 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011   
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __WX__MPR__WIDGET__HXX__
00019 #define __WX__MPR__WIDGET__HXX__
00020 
00021 #include "marTypes.h"
00022 #include <vector>
00023 
00024 #include <vtkObjectBase.h>
00025 #include <vtkCommand.h>
00026 #include <vtkActor.h>
00027 #include <vtkPoints.h>
00028 #include <vtkPolyData.h>
00029 #include <vtkPolyDataMapper.h>
00030 #include <vtkProbeFilter.h>
00031 #include <vtkPlaneSource.h> 
00032 #include <vtkImageChangeInformation.h>
00033 #include <vtkStructuredPoints.h> 
00034 #include <vtkTransform.h> 
00035 #include <vtkImageViewer2.h> 
00036 #include <vtkBoxWidget.h>
00037 #include <vtkPointWidget.h>
00038 #include <vtkPlaneWidget.h>
00039 
00040 #include <vtkCubeSource.h>
00041 #include <vtkCylinderSource.h>
00042 #include <vtkSphereSource.h>
00043 #include <vtkProperty2D.h>
00044 #include <vtkTextProperty.h>
00045 #include <vtkXYPlotActor.h>
00046 
00047 #include "wxMPRBaseData.h"
00048 #include "wxVtkBaseView.h"
00049 
00050 #include <wx/notebook.h>
00051 #include <wx/listbox.h>
00052 #include <wx/tglbtn.h>
00053 #include <wx/splitter.h>
00054 #include "marTypes.h"
00055 #include "vtkInteractorStyleSphere.h"
00056 #include "idAlBeRa.h"
00057 
00058 #include "wxVtkMPR3DView.h"
00059 #include "wxVtkMPR2DView.h"
00060 #include "vtkPlane2DView.h"
00061 #include "wxSphereView.h"
00062 #include "wxVtkClipping3DView.h"
00063 #include "wxPanelCuttingImageData.h"
00064 #include "wxWidgetMesure2D_Plane_in_MPR.h"
00065 
00066 #include "wxVtk3DBaseView.h"
00067 
00068 //class wxMPRWidget;
00069 //class vtkInteractorStylePlane2D;
00070 //class vtkInfoTextImageInteractorPlane2D;
00071 //class vtkInteractorStyleMPRView;
00072 //class wxVtkMPR3DView;
00073 //class wxVtkClipping3DView;
00074 
00075 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
00076 {
00077 public:
00078     wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL,double voxelSize = -1);
00079         ~wxMPRWidget( );
00080         void ConfigureVTK();
00081 
00082         virtual void OnRefreshView(wxCommandEvent & event);
00083         void OnDClickLeft(wxCommandEvent & event);
00084 
00085         void OnPageAChanged(wxNotebookEvent & event);
00086         void OnPageBChanged(wxNotebookEvent & event);
00087 
00088         vtkMPRBaseData  *GetVtkMPRBaseData();
00089         vtkPlane2DView  *GetVtkPlane2DView();
00090         
00091         //returns the 3d view of the widget
00092         wxVtkMPR3DView  *GetWxvtkmpr3Dview_BB();
00093 
00094         void    RefreshView(bool firsttime=false);
00095 
00096         wxVtkBaseView *GetWxVtkBaseView(int page, int id);
00097 
00098         //returns the 2d view of the specific direction (0|1|2)
00099         wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
00100 
00101         void setImageData(vtkImageData * img, double voxelsize);
00102 
00103 private:
00104         double                                  _voxelSize;
00105         marImageData                    *_marImageData; 
00106         vtkMPRBaseData                  *_vtkmprbasedata; 
00107         wxVtkMPR2DView                  *_vtkmpr2Dview[3]; 
00108         vtkPlane2DView                  *_vtkplane2Dview;
00109         wxSphereView                    *_wxsphereview;
00110         wxVtkMPR2DView                  *_vtkmpr2Dview_B[3]; 
00111         vtkPlane2DView                  *_vtkplane2Dview_B;
00112         wxSphereView                    *_wxsphereview_B;
00113 
00114         wxVtk3DBaseView                 *_wxvtk3Dbaseview_MPRClipping3D;
00115         wxVtkMPR3DView                  *_wxvtkmpr3Dview;
00116         wxVtkClipping3DView             *_wxvtkclipping3Dview;
00117 
00118         wxVtk3DBaseView                 *_wxvtk3Dbaseview_MPR3D_B;
00119         wxVtkMPR3DView                  *_wxvtkmpr3Dview_B;
00120 
00121         wxVtk3DBaseView                 *_wxvtk3Dbaseview_Clipping3D_BB;
00122         wxVtkMPR3DView                  *_wxvtkmpr3Dview_BB;
00123         wxVtkClipping3DView             *_wxvtkclipping3Dview_BB;
00124 
00125         int                                             _refreshAPage;
00126         int                                             _refreshBPage;
00127 
00128 
00129         wxFrame                                 *_framePanelCutting;
00130         wxCheckBox                              *_btnCutImageData;
00131         wxPanelCuttingImageData *_panelCutting;
00132 
00133         wxWidgetMesure2D_Plane_in_MPR   *_widgetMesure;
00134         wxWidgetMesure2D_Plane_in_MPR   *_widgetMesure_B;
00135 
00136         wxPanel *CreateControlPanel(wxWindow *parent);
00137         wxPanel *CreateMPRPanel(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
00138         wxPanel *CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
00139         wxPanel *CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
00140 
00141         void    OnCutImagaData( wxCommandEvent &event);
00142 
00143         DECLARE_EVENT_TABLE( );
00144 };
00145 
00146 #endif // __WX__MPR__WIDGET__HXX__
00147 
00148 
00149 
00150 // EOF - wxMPRWidget.h

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1