X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FColorLayerImageView.h;h=d1ec556f7d30000ef5df6320c6260ffb03d930f4;hb=f050938d3947f6b785289da6d58f8fec2da57421;hp=e1f4a533bd6fc8c884f19693ee04b1ef46701b71;hpb=d8edef346f2d6c64f6ed3bea7225aeb3a8b3970c;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.h index e1f4a53..d1ec556 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.h @@ -1,6 +1,3 @@ - - - /** * \file * \brief Class ThresholdImageView . @@ -21,17 +18,67 @@ class ColorLayerImageView : public LayerImageBase { public: ColorLayerImageView( ); - ~ColorLayerImageView(); - void SetSliceFixDinamic(bool fix_dinamic); + ~ColorLayerImageView( ); + void SetSliceFixDynamic(bool fix_dynamic); void SetZ2(int z2); virtual int GetZ(); + + /** + * \brief Each color is described by its RGB coordinates. Therefore, the vector should have the size of a multiple of 3 elements. + * + * \param base_color the base color vector. + */ + void SetBaseColors(std::vector & base_color); + /** + * \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.). + * + * \param index for which we would like to get the base color. + * \return The corresponding base color value. + */ + double GetBaseColors(unsigned int index); + /** + * \brief The boundaries include the extrema. There must be one more element in this vector than GetBaseColorNb. + * + * \param grey_level_boundary the grey level boundary vector. + */ + void SetGreyLevelBoundaries(std::vector & grey_level_boundary); + /** + * \brief Returns the grey level boundary for a given index. + * + * \param index for which we would like to get the grey level boundary. + * \return The corresponding grey level value. + */ + double GetGreyLevelBoundaries(unsigned int index); + /** + * \brief Sets the color type. True for plain color, false for gradient color. Default is false. + * + * \param color_type the color type + */ + void SetPlainOrGradientColor(bool color_type); + /** + * \brief Returns the number of base colors. + * + * \return The number of base colors. + */ + int GetBaseColorNb(); private: int _z2; - bool _fix_dinamic; + bool _fix_dynamic; + void SetDefaultGreyLevelBoundary(); + void SetDefaultBaseColorAndGreyLevelBoundary(); virtual void ConfigLookupTable(); + //! Range values in the colored image. + double _range[2]; + + //! Base colors for the overlaid image. + std::vector _base_color; + //! Grey level boundaries. + std::vector _grey_level_boundary; + //! Color type (plain or gradient color). + bool _color_type; protected: };