]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h
#3012 creaMaracasVisu Bug New Normal - Update Image in ViewerNV
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkMPR3DDataViewer.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 VTKMPR3DDATAVIEWER_H_
27 #define VTKMPR3DDATAVIEWER_H_
28
29 #include "wxMPRBaseData.h"
30 #include "vtkProperty.h"
31 #include <vtkImageMapToColors.h> 
32 #include "vtkOutlineFilter.h"
33 #include "vtkPolyDataMapper.h"
34 #include "vtkActor.h"
35 #include <vtkColorTransferFunction.h>
36 #include "vtkImageActor.h"
37
38 #ifdef _DEBUG
39 #include <crtdbg.h>
40 #define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
41 #else
42 #define DEBUG_NEW new
43 #endif
44
45 class creaMaracasVisu_EXPORT vtkMPR3DDataViewer {
46 public:
47         vtkMPR3DDataViewer();
48         virtual                                         ~vtkMPR3DDataViewer();
49         vtkImageActor*                          GetImageActor(int id);
50         vtkActor*                                       GetOutlineActor();
51         virtual void                            Refresh();
52         virtual void                            Configure();
53                         void                            SetImage();
54         void                                            SetVisiblePosition(int idPosition, bool visible);
55         bool                                            GetVisiblePosition(int idPosition);
56         vtkImageActor*                          GetvtkActor_saggital();
57         vtkImageActor*                          GetvtkActor_axial();
58         vtkImageActor*                          GetvtkActor_coronal();
59         void                                            SetPositionX(int pos);
60         void                                            SetPositionY(int pos);
61         void                                            SetPositionZ(int pos);
62         void                                            SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
63         vtkMPRBaseData*                         GetVtkMPRBaseData();
64         
65         vtkColorTransferFunction        *GetvtkColorTransferFunction();
66         std::vector<double >            *GetctFunVectorPoint();
67         std::vector<double >            *GetctFunVectorRed();
68         std::vector<double >            *GetctFunVectorGreen();
69         std::vector<double >            *GetctFunVectorBlue();
70
71         void setColorTransferFunction(vtkColorTransferFunction* colortable);
72
73 private:
74         
75         bool                                            _visiblePosition[3];
76
77         // outline
78         vtkOutlineFilter                        *_outlineData;
79         vtkPolyDataMapper                       *_mapOutline;
80         vtkActor                                        *_outline;
81
82         //
83         vtkColorTransferFunction        *_ctfun;
84         std::vector<double>                     _ctFunVectorPoint;
85         std::vector<double>                     _ctFunVectorRed;
86         std::vector<double>                     _ctFunVectorGreen;
87         std::vector<double>                     _ctFunVectorBlue;
88
89 //      vtkLookupTable                          *_bwLut;
90 //      vtkLookupTable                          *_hueLut;
91 //      vtkLookupTable                          *_satLut;
92
93         vtkImageMapToColors                     *_saggitalColors;
94         vtkImageActor                           *_saggital;
95         vtkImageMapToColors                     *_axialColors;
96         vtkImageActor                           *_axial;
97         vtkImageMapToColors                     *_coronalColors;
98         vtkImageActor                           *_coronal;
99         vtkMPRBaseData                          *_vtkmprbasedata;
100
101
102 };
103
104 #endif /*VTKMPR3DDATAVIEWER_H_*/