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