3 * \brief Class ThresholdImageView .
7 * \class ThresholdImageView
11 #ifndef __ColorLayerImageView_h__
12 #define __ColorLayerImageView_h__
14 #include "LayerImageBase.h"
17 class ColorLayerImageView : public LayerImageBase
20 ColorLayerImageView( );
21 ~ColorLayerImageView( );
22 void SetSliceFixDynamic(bool fix_dynamic);
27 * \brief Each color is described by its RGB coordinates. Therefore, the vector should have the size of a multiple of 3 elements.
29 * \param base_color the base color vector.
31 void SetBaseColors(std::vector<double> & base_color);
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.).
35 * \param index for which we would like to get the base color.
36 * \return The corresponding base color value.
38 double GetBaseColors(unsigned int index);
40 * \brief The boundaries include the extrema. There must be one more element in this vector than GetBaseColorNb.
42 * \param grey_level_boundary the grey level boundary vector.
44 void SetGreyLevelBoundaries(std::vector<double> & grey_level_boundary);
46 * \brief Returns the grey level boundary for a given index.
48 * \param index for which we would like to get the grey level boundary.
49 * \return The corresponding grey level value.
51 double GetGreyLevelBoundaries(unsigned int index);
53 * \brief Sets the color type. True for plain color, false for gradient color. Default is false.
55 * \param color_type the color type
57 void SetPlainOrGradientColor(bool color_type);
59 * \brief Returns the number of base colors.
61 * \return The number of base colors.
69 void SetDefaultGreyLevelBoundary();
70 void SetDefaultBaseColorAndGreyLevelBoundary();
71 virtual void ConfigLookupTable();
73 //! Range values in the colored image.
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).