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