]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h
e45edd491af34088ddbdea877aa17c2b0d5c29c5
[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: 2009/09/15 11:25:07 $
7   Version:   $Revision: 1.8 $
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 #ifdef __BORLANDC__
28 #pragma hdrstop
29 #endif
30 #ifndef WX_PRECOMP
31 #include <wx/wx.h>
32 #endif
33
34 //------------------------------------------------------------------------------------------------------------
35 // Includes
36 //------------------------------------------------------------------------------------------------------------
37
38 #include "vtkImageData.h"
39 #include "vtkRenderer.h"
40
41 #include "wxVtkBaseView.h"
42 #include "wxMPRWidget.h"
43
44 //------------------------------------------------------------------------------------------------------------
45 // Class definition
46 //------------------------------------------------------------------------------------------------------------
47
48
49  class wxMaracas_ViewerWidget : public wxPanel
50   {
51   public:
52           
53         //------------------------------------------------------------------------------------------------------------
54         // Constructors & Destructors
55         //------------------------------------------------------------------------------------------------------------
56
57     wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL);
58     ~wxMaracas_ViewerWidget();
59
60         //------------------------------------------------------------------------------------------------------------
61         // Methods
62         //------------------------------------------------------------------------------------------------------------
63
64 //    vtkRenderer *GetRenderer();
65         void ConfigureVTK();
66         void RefreshView();
67         virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL );
68
69         wxVtkBaseView *GetwxVtkBaseView();
70         void SetImage( vtkImageData *image      );
71         double GetX();
72         double GetY();
73         double GetZ();
74
75         //------------------------------------------------------------------------------------------------------------
76         // Attributes
77         //------------------------------------------------------------------------------------------------------------
78
79         void setColorTransferFunction(vtkColorTransferFunction* colortable);
80
81         void setWindowLevel(double level);
82
83         void setColorLevel(double level);
84   private:
85                 int                                                             mType;
86
87                 bool                            minternalVtkmprbasedata;
88                 vtkMPRBaseData                                  *mvtkmprbasedata; 
89
90                 wxVtk2DBaseView                                 *mvtk2Dbaseview;
91                 wxVtkMPR2DView                                  *mvtkmpr2Dview_X; 
92                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Y; 
93                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Z; 
94                 wxWidgetMesure2D_Plane_in_MPR   *mwidgetMesure;
95                 vtkPlane2DView                                  *mvtkplane2Dview;
96                 wxSphereView                                    *mwxsphereview; 
97
98                 wxVtkClipping3DView                             *mwxvtkclipping3Dview;
99                 wxVtk3DBaseView                                 *mwxvtk3Dbaseview_Clipping3D;
100                 wxVtkMPR3DView                                  *mwxvtkmpr3Dview;
101
102
103                 vtkMPR3DDataViewer                              *vtkmpr3Ddataviewer;
104
105
106   };
107
108 #endif // __WX__MARACAS__VIEWERWIDGET__H__