]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h
1720af7ea161633570b1a43f3cddfd090e3d1473
[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: 2012/11/14 07:30:52 $
7   Version:   $Revision: 1.12 $
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  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 SetColorWindowLevel(double colorWindow, double colorLevel);
82           
83   private:
84                 int                                                             mType;
85
86                 bool                            minternalVtkmprbasedata;
87                 vtkMPRBaseData                                  *mvtkmprbasedata;
88
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 #endif // __WX__MARACAS__VIEWERWIDGET__H__