]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
f02d7d89c8dec2ae57ce64dedc16d2d9765d12a5
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkMPR3DView.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 #ifndef WXVTKMPR3DVIEW_H_
27 #define WXVTKMPR3DVIEW_H_
28
29 #include "vtkMPR3DDataViewer.h"
30 #include "wxVtkMPR3DViewCntrlPanel.h"
31 #include "wxVtk3DBaseView.h"
32
33 #include "vtkProbeFilter.h"
34 #include "vtkPlaneWidget.h"
35 #include "vtkPointWidget.h"
36 #include "vtkImagePlaneWidget.h"
37
38
39 //class vtkmyPWCallback_3DPointWidget;
40 class wxVtkMPR3DViewCntrlPanel;
41
42 class creaMaracasVisu_EXPORT wxVtkMPR3DView
43 {
44 public:
45         wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview );
46         virtual ~wxVtkMPR3DView();      
47         void                            VisibleImageActor(int idPosition, bool visible);
48         void                            VisiblePointWidget( bool visible );
49         void                            VisiblePlaneWidget( bool visible );
50
51         void                            SetVisibleTissue(int idTissue, bool visible);
52         bool                            GetVisibleTissue(int idTissue);
53         virtual void            Refresh();
54         virtual void            RefreshView();
55         virtual void            Configure();
56         void                            SetBackGroundType(int type);
57         void                            SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
58         wxPanel*                        CreateControlPanel(wxWindow *parent, bool align);
59
60         vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
61         wxVtk3DBaseView*        GetWxvtk3Dbaseview() throw (char*);
62
63         void                            InitOrientationPointWidget(); 
64         void                            showOutlineActor(bool value);
65
66         // EED 25 Janvier 2007 testLoic
67         void                            TestLoic1();
68         void                            TestLoic2();
69
70         void RemoveActor(vtkActor* actor);
71
72 //EED 27/05/2013
73 //      void ResetCamera(int *ext=NULL,double* spc=NULL);
74
75         void setColorTransferFunction(vtkColorTransferFunction* colortable);
76
77         
78         //Free planes
79         //-------------------------------------------------------------------
80         void ConfigureFreePlanes();
81         vtkImagePlaneWidget* GetPlaneWidget(unsigned char activationkey, double r, double g, double b, vtkCellPicker* picker);
82         void FreePlaneVisible(int plane, bool ok);
83         void FreePlaneInteraction(bool ok);
84         void SetFreePlanesOrtho();
85         
86         void SetColorWindow(double colorWindow);
87         void SetColorLevel(double colorLevel);
88
89         
90 private:
91         wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
92         vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
93         wxVtkMPR3DViewCntrlPanel                *_wxvtkmpr3DviewCntrlPanel;
94
95         // Plane Widget (3D)
96         vtkPolyData                                             *_vtkplane;
97         vtkActor                                                *_contourPlaneActor;
98         vtkPlaneWidget                                  *_planeWidget;
99
100         // Point Widget (3D)
101         vtkPointWidget                                  *_pointWidget;
102         //vtkmyPWCallback_3DPointWidget *_myCallback;
103         vtkProbeFilter                                  *_probe;
104         vtkPolyDataMapper                               *_contourMapper;
105
106         //Free planes
107         vtkImagePlaneWidget *_planeWidgetX;
108         vtkImagePlaneWidget *_planeWidgetY;
109         vtkImagePlaneWidget *_planeWidgetZ;
110         
111
112 protected:
113 };
114
115 #endif /*WXVTKMPR3DVIEW_H_*/