]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h
11e0030810ee30ea7dd14678704779236837eeba
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkMPR2DView.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 WXVTKMPR2DVIEW_H_
27 #define WXVTKMPR2DVIEW_H_
28
29 #include "vtkInteractorStyleMPRView.h"
30
31 #include "wxMPRBaseData.h"
32 #include "wxVtk2DBaseView.h"
33
34 #include "vtkPolyDataMapper.h"
35 #include <vtkPolyData.h>
36 #include <vtkPoints.h>
37 #include "vtkActor.h"
38 #include "vtkPolyData.h"
39
40 class creaMaracasVisu_EXPORT wxVtkMPR2DView :  public wxVtk2DBaseView
41 {
42 public:
43         wxVtkMPR2DView( wxWindow *parent, int direction );
44         ~wxVtkMPR2DView();
45         void Configure();
46         virtual void                    Refresh();
47                         vtkMPRBaseData  *GetVtkmprbasedata();
48         virtual int                             GetActualSlice();
49         virtual void                    SetActualSlice(int slice);
50
51                         bool                    IfMouseTouchX(double x, double y, double z);
52                         bool                    IfMouseTouchY(double x, double y, double z);
53                         bool                    IfMouseTouchZ(double x, double y, double z);
54                         void                    MoveX(double x, double y, double z);
55                         void                    MoveY(double x, double y, double z);
56                         void                    MoveZ(double x, double y, double z);
57                         void                    ChangeAxisColor(double x, double y, double z);
58         virtual void                    TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2);
59
60                         void                    SetVisibleAxis(bool ok);
61     virtual int             GetDirection();
62
63
64
65 private:
66
67         int                                                     _backX;
68         int                                                     _backY;
69         int                                                     _backZ;
70
71         bool                                            _visibleAxis;
72
73         int                                                     _direction;
74         vtkPoints                                       *_ptsA;
75         vtkActor                                        *_lineAActor;
76         vtkPolyDataMapper                       *_lineAMapper;
77     vtkPolyData                                 *_pdA;
78         vtkPoints                                       *_ptsB;
79         vtkActor                                        *_lineBActor;
80         vtkPolyDataMapper                       *_lineBMapper;
81     vtkPolyData                                 *_pdB;
82 //      vtkInteractorStyle2DMaracas     *_interactorStyle2DMaracas;
83         vtkInteractorStyleMPRView       *_interactorstylemprview;
84 };
85
86
87 #endif /*WXVTKMPR2DVIEW_H_*/