]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.h
d1ec556f7d30000ef5df6320c6260ffb03d930f4
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / ThresholdImageView / ColorLayerImageView.h
1 /**
2  *  \file 
3  *  \brief Class ThresholdImageView . 
4  */
5
6 /**
7  * \class ThresholdImageView
8  * \brief 
9  */
10  
11 #ifndef __ColorLayerImageView_h__
12 #define __ColorLayerImageView_h__
13
14 #include "LayerImageBase.h"
15
16
17 class  ColorLayerImageView : public LayerImageBase
18   {
19   public: 
20           ColorLayerImageView( );
21           ~ColorLayerImageView( );
22           void SetSliceFixDynamic(bool fix_dynamic);
23           void SetZ2(int z2);
24           virtual int GetZ();
25           
26           /** 
27            * \brief  Each color is described by its RGB coordinates. Therefore, the vector should have the size of a multiple of 3 elements.
28            *
29            * \param base_color the base color vector.
30            */
31           void SetBaseColors(std::vector<double> & base_color);
32           /** 
33            * \brief  Returns the base color for a given index (first coordinate of the first color being 1, second coordinate of the first color being 2, etc.).
34            *
35            * \param index for which we would like to get the base color.
36            * \return The corresponding base color value.
37            */
38           double GetBaseColors(unsigned int index);
39           /** 
40            * \brief The boundaries include the extrema. There must be one more element in this vector than GetBaseColorNb.
41            *
42            * \param grey_level_boundary the grey level boundary vector.
43            */
44           void SetGreyLevelBoundaries(std::vector<double> & grey_level_boundary);
45           /** 
46            * \brief  Returns the grey level boundary for a given index.
47            *
48            * \param index for which we would like to get the grey level boundary.
49            * \return The corresponding grey level value.
50            */
51           double GetGreyLevelBoundaries(unsigned int index);
52           /** 
53            * \brief Sets the color type. True for plain color, false for gradient color. Default is false.
54            *
55            * \param color_type the color type
56            */
57           void SetPlainOrGradientColor(bool color_type);
58           /** 
59            * \brief  Returns the number of base colors.
60            *
61            * \return The number of base colors.
62            */
63           int GetBaseColorNb();
64
65   private:
66
67           int _z2;
68           bool _fix_dynamic;
69           void SetDefaultGreyLevelBoundary();
70           void SetDefaultBaseColorAndGreyLevelBoundary();
71           virtual void ConfigLookupTable();
72
73           //! Range values in the colored image.
74           double _range[2];
75
76           //! Base colors for the overlaid image.
77           std::vector<double> _base_color;
78           //! Grey level boundaries.
79           std::vector<double> _grey_level_boundary;
80           //! Color type (plain or gradient color).
81           bool _color_type;
82
83   protected:
84  };
85
86 #endif
87