]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.h
#2844 creaMaracasVisu Feature New Normal - ManualPaint_model box, Refresh TransferF...
[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                                            SetVisiblePosition(int idPosition, bool visible);
54         bool                                            GetVisiblePosition(int idPosition);
55         vtkImageActor*                          GetvtkActor_saggital();
56         vtkImageActor*                          GetvtkActor_axial();
57         vtkImageActor*                          GetvtkActor_coronal();
58         void                                            SetPositionX(int pos);
59         void                                            SetPositionY(int pos);
60         void                                            SetPositionZ(int pos);
61         void                                            SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
62         vtkMPRBaseData*                         GetVtkMPRBaseData();
63         
64         vtkColorTransferFunction        *GetvtkColorTransferFunction();
65         std::vector<double >            *GetctFunVectorPoint();
66         std::vector<double >            *GetctFunVectorRed();
67         std::vector<double >            *GetctFunVectorGreen();
68         std::vector<double >            *GetctFunVectorBlue();
69
70         void setColorTransferFunction(vtkColorTransferFunction* colortable);
71
72 private:
73         
74         bool                                            _visiblePosition[3];
75
76         // outline
77         vtkOutlineFilter                        *_outlineData;
78         vtkPolyDataMapper                       *_mapOutline;
79         vtkActor                                        *_outline;
80
81         //
82         vtkColorTransferFunction        *_ctfun;
83         std::vector<double>                     _ctFunVectorPoint;
84         std::vector<double>                     _ctFunVectorRed;
85         std::vector<double>                     _ctFunVectorGreen;
86         std::vector<double>                     _ctFunVectorBlue;
87
88 //      vtkLookupTable                          *_bwLut;
89 //      vtkLookupTable                          *_hueLut;
90 //      vtkLookupTable                          *_satLut;
91
92         vtkImageMapToColors                     *_saggitalColors;
93         vtkImageActor                           *_saggital;
94         vtkImageMapToColors                     *_axialColors;
95         vtkImageActor                           *_axial;
96         vtkImageMapToColors                     *_coronalColors;
97         vtkImageActor                           *_coronal;
98         vtkMPRBaseData                          *_vtkmprbasedata;
99
100
101 };
102
103 #endif /*VTKMPR3DDATAVIEWER_H_*/