]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h
5beffe7be8723c47013cc97fa9f9df165f63929d
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / ThresholdImageView / LayerImageBase.h
1
2
3
4 /**
5  *  \file
6  *  \brief Class ThresholdImageView .
7  */
8
9 /**
10  * \class ThresholdImageView
11  * \brief
12  */
13
14 #ifndef __LayerImageBase_h__
15 #define __LayerImageBase_h__
16
17 #include <vtkImageReslice.h>
18 #include <vtkLookupTable.h>
19 #include <vtkImageMapToColors.h>
20 #include <vtkImageActor.h>
21 #include <vtkImageData.h>
22 #include "wxVtkBaseView.h"
23
24 #include "InteractorStyleMaracas.h"
25
26 //----------------------------------------------------------------------------------
27 //----------------------------------------------------------------------------------
28 //----------------------------------------------------------------------------------
29 class LayerImageBase;
30
31 class ColorLayerImageBasevtkInteractor : public InteractorStyleMaracas {
32 public:
33         ColorLayerImageBasevtkInteractor(LayerImageBase* layerImageBase);
34         virtual ~ColorLayerImageBasevtkInteractor();
35
36         virtual bool  OnMouseMove();
37
38 private:
39     LayerImageBase* _layerImageBase;
40
41 protected:
42
43 };
44
45
46 //----------------------------------------------------------------------------------
47 //----------------------------------------------------------------------------------
48 //----------------------------------------------------------------------------------
49
50
51
52 class LayerImageBase
53   {
54   public:
55                 LayerImageBase();
56                 virtual ~LayerImageBase();
57                 void SetZ(int z);
58                 void SetImage(vtkImageData* image);
59                 void SetwxVtkBaseView(wxVtkBaseView *baseview);
60
61                 void onThreshold();
62                 void onThresholdChange();
63                 void onThresholdInterpolation(bool interpolate);
64                 void onThresholdChangeOpacity (int opacity);
65                 void onThresholdRemove();
66                 wxVtkBaseView *GetwxVtkBaseView();
67         void Refresh();
68         vtkLookupTable *GetvtkLookupTable();
69         vtkImageReslice *GetvtkImageReslice();
70                 virtual int GetZ();
71
72   private:
73                 int                                     _Z;
74                 bool                            _actorPresent;
75                 vtkImageData            *_image;
76                 vtkImageReslice         *_imageReslicer;
77                 vtkLookupTable          *_thresholdTable;
78                 vtkImageMapToColors     *_thresholdMapper;
79                 vtkImageActor           *_thresholdActor;
80                 wxVtkBaseView           *_baseView;
81
82                 virtual void ConfigLookupTable() = 0;
83                 bool GetActorPresent();
84                 int CleanZ(int z);
85
86
87   protected:
88                 vtkLookupTable* GetThresholdTable();
89                 vtkImageData* GetImage();
90  };
91
92
93
94 #endif  // __LayerImageBase_h__
95