]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracas_N_ViewersWidget.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracas_N_ViewersWidget.h,v $
5   Language:  C++
6   Date:      $Date: 2009/11/30 20:52:51 $
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__N_VIEWERSWIDGET__H__
19 #define __WX__MARACAS__N_VIEWERSWIDGET__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 "wxMaracas_ViewerWidget.h"
40 #include <iostream>
41 #include <vector>
42
43 //------------------------------------------------------------------------------------------------------------
44 // Class definition
45 //------------------------------------------------------------------------------------------------------------
46
47 class creaMaracasVisu_EXPORT wxMaracas_N_ViewersWidget : public wxPanel
48   {
49   public:
50
51                   
52         //------------------------------------------------------------------------------------------------------------
53         // Constructors & Destructors
54         //------------------------------------------------------------------------------------------------------------
55
56         wxMaracas_N_ViewersWidget(wxWindow *parent, vtkImageData* imagedata = NULL, std::vector<int> *nTypeView = NULL);
57     ~wxMaracas_N_ViewersWidget();
58
59         
60         //------------------------------------------------------------------------------------------------------------
61         // Methods
62         //------------------------------------------------------------------------------------------------------------
63
64     void Update();
65     vtkRenderer *GetRenderer();
66         void RefreshView();
67
68         virtual void OnRefreshView(wxCommandEvent & event);
69         void OnDClickLeft(wxCommandEvent & event);
70         wxMaracas_ViewerWidget *GetWindow(int iWin);
71         wxVtkBaseView *GetwxVtkBaseView(int iWin);
72         virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL );
73         void SetImage( vtkImageData *image      );
74         void ConfigureVTK();
75         void SetType(std::vector<int>* type);
76         void UpdateLayout(vtkImageData* imagedata);
77 //      double GetZ(int iWin);
78         double GetX();
79         double GetY();
80         double GetZ();
81
82         void setColorTransferFunction(vtkColorTransferFunction* colortable);
83
84         void setWindowLevel(double level);
85         void setColorLevel(double level);
86
87         //------------------------------------------------------------------------------------------------------------
88         // Attributes
89         //------------------------------------------------------------------------------------------------------------
90
91   private:
92         
93         wxMaracas_ViewerWidget  *wxwindow1;
94         wxMaracas_ViewerWidget  *wxwindow2;
95         wxMaracas_ViewerWidget  *wxwindow3;
96         wxMaracas_ViewerWidget  *wxwindow4;
97
98         wxWindow *_currentwxw;
99
100
101         std::vector<int> *nTypeView;
102
103         vtkMPRBaseData* mvtkmprbasedata;  
104           
105   DECLARE_EVENT_TABLE( );
106   };
107
108
109 #endif // __WX__MARACAS__N_VIEWERWIDGET__H__