]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h
9a076912affd94e84cce2890096208f559fef560
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracas_ViewerWidget.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracas_ViewerWidget.h,v $
5   Language:  C++
6   Date:      $Date: 2010/01/21 13:54:15 $
7   Version:   $Revision: 1.9 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
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.
15
16 =========================================================================*/
17
18 #ifndef __WX__MARACAS__VIEWERWIDGET__H__
19 #define __WX__MARACAS__VIEWERWIDGET__H__
20
21
22 // -----------------------------------------------------------------------------------------------------------
23 // WX headers inclusion.
24 // For compilers that support precompilation, includes <wx/wx.h>.
25 // -----------------------------------------------------------------------------------------------------------
26 #include <wx/wxprec.h>
27
28 #ifdef __BORLANDC__
29 #pragma hdrstop
30 #endif
31 #ifndef WX_PRECOMP
32 #include <wx/wx.h>
33 #endif
34
35 //------------------------------------------------------------------------------------------------------------
36 // Includes
37 //------------------------------------------------------------------------------------------------------------
38
39 #include "vtkImageData.h"
40 #include "vtkRenderer.h"
41
42 #include "wxVtkBaseView.h"
43 #include "wxMPRWidget.h"
44
45 //------------------------------------------------------------------------------------------------------------
46 // Class definition
47 //------------------------------------------------------------------------------------------------------------
48
49
50  class wxMaracas_ViewerWidget : public wxPanel
51   {
52   public:
53           
54         //------------------------------------------------------------------------------------------------------------
55         // Constructors & Destructors
56         //------------------------------------------------------------------------------------------------------------
57
58     wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL);
59     ~wxMaracas_ViewerWidget();
60
61         //------------------------------------------------------------------------------------------------------------
62         // Methods
63         //------------------------------------------------------------------------------------------------------------
64
65 //    vtkRenderer *GetRenderer();
66         void ConfigureVTK();
67         void RefreshView();
68         virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL );
69
70         wxVtkBaseView *GetwxVtkBaseView();
71         void SetImage( vtkImageData *image      );
72         double GetX();
73         double GetY();
74         double GetZ();
75
76         //------------------------------------------------------------------------------------------------------------
77         // Attributes
78         //------------------------------------------------------------------------------------------------------------
79
80         void setColorTransferFunction(vtkColorTransferFunction* colortable);
81
82         void setWindowLevel(double level);
83
84         void setColorLevel(double level);
85   private:
86                 int                                                             mType;
87
88                 bool                            minternalVtkmprbasedata;
89                 vtkMPRBaseData                                  *mvtkmprbasedata; 
90
91                 wxVtk2DBaseView                                 *mvtk2Dbaseview;
92                 wxVtkMPR2DView                                  *mvtkmpr2Dview_X; 
93                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Y; 
94                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Z; 
95                 wxWidgetMesure2D_Plane_in_MPR   *mwidgetMesure;
96                 vtkPlane2DView                                  *mvtkplane2Dview;
97                 wxSphereView                                    *mwxsphereview; 
98
99                 wxVtkClipping3DView                             *mwxvtkclipping3Dview;
100                 wxVtk3DBaseView                                 *mwxvtk3Dbaseview_Clipping3D;
101                 wxVtkMPR3DView                                  *mwxvtkmpr3Dview;
102
103
104                 vtkMPR3DDataViewer                              *vtkmpr3Ddataviewer;            
105
106   };
107
108 #endif // __WX__MARACAS__VIEWERWIDGET__H__