]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h
#3472 TDx
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracas_ViewerWidget.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 /*=========================================================================
27
28   Program:   wxMaracas
29   Module:    $RCSfile: wxMaracas_ViewerWidget.h,v $
30   Language:  C++
31   Date:      $Date: 2012/11/15 14:14:35 $
32   Version:   $Revision: 1.13 $
33
34   Copyright: (c) 2002, 2003
35   License:
36
37      This software is distributed WITHOUT ANY WARRANTY; without even
38      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39      PURPOSE.  See the above copyright notice for more information.
40
41 =========================================================================*/
42
43 #ifndef __WX__MARACAS__VIEWERWIDGET__H__
44 #define __WX__MARACAS__VIEWERWIDGET__H__
45
46
47 // -----------------------------------------------------------------------------------------------------------
48 // WX headers inclusion.
49 // For compilers that support precompilation, includes <wx/wx.h>.
50 // -----------------------------------------------------------------------------------------------------------
51 #include <wx/wxprec.h>
52
53 #ifdef __BORLANDC__
54 #pragma hdrstop
55 #endif
56 #ifndef WX_PRECOMP
57 #include <wx/wx.h>
58 #endif
59
60 //------------------------------------------------------------------------------------------------------------
61 // Includes
62 //------------------------------------------------------------------------------------------------------------
63
64 #include "vtkImageData.h"
65 #include "vtkRenderer.h"
66
67 #include "wxVtkBaseView.h"
68 #include "wxMPRWidget.h"
69
70 //------------------------------------------------------------------------------------------------------------
71 // Class definition
72 //------------------------------------------------------------------------------------------------------------
73
74  class wxMaracas_ViewerWidget : public wxPanel
75   {
76   public:
77
78         //------------------------------------------------------------------------------------------------------------
79         // Constructors & Destructors
80         //------------------------------------------------------------------------------------------------------------
81
82     wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL,bool TDxWindow=false);
83     ~wxMaracas_ViewerWidget();
84
85         //------------------------------------------------------------------------------------------------------------
86         // Methods
87         //------------------------------------------------------------------------------------------------------------
88
89 //    vtkRenderer *GetRenderer();
90         void ConfigureVTK();
91         void RefreshView();
92         virtual void Refresh(bool eraseBackground = true,const wxRect* rect = NULL );
93
94         wxVtkBaseView *GetwxVtkBaseView();
95         void SetImage( vtkImageData *image      );
96         double GetX();
97         double GetY();
98         double GetZ();
99
100         //------------------------------------------------------------------------------------------------------------
101         // Attributes
102         //------------------------------------------------------------------------------------------------------------
103
104         void setColorTransferFunction(vtkColorTransferFunction* colortable);
105         void SetColorWindowLevel(double colorWindow, double colorLevel);
106   private:
107                 int                                                             mType;
108                 bool                            minternalVtkmprbasedata;
109                 vtkMPRBaseData                                  *mvtkmprbasedata;
110                 wxVtk2DBaseView                                 *mvtk2Dbaseview;
111                 wxVtkMPR2DView                                  *mvtkmpr2Dview_X;
112                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Y;
113                 wxVtkMPR2DView                                  *mvtkmpr2Dview_Z;
114                 wxWidgetMesure2D_Plane_in_MPR   *mwidgetMesure;
115                 vtkPlane2DView                                  *mvtkplane2Dview;
116                 wxSphereView                                    *mwxsphereview;
117                 wxVtkClipping3DView                             *mwxvtkclipping3Dview;
118                 wxVtk3DBaseView                                 *mwxvtk3Dbaseview_Clipping3D;
119                 wxVtkMPR3DView                                  *mwxvtkmpr3Dview;
120                 vtkMPR3DDataViewer                              *vtkmpr3Ddataviewer;
121   };
122
123 #endif // __WX__MARACAS__VIEWERWIDGET__H__