![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpColorBlindFriendlyPalette.h>
Public Types | |
| enum class | Palette { Black = 0 , Orange = 1 , SkyBlue = 2 , Green = 3 , Yellow = 4 , Blue = 5 , Vermillon = 6 , Purple = 7 , COUNT = 8 } |
| typedef enum vpColorBlindFriendlyPalette::Palette | Palette |
Public Member Functions | |
| vpColorBlindFriendlyPalette () | |
| vpColorBlindFriendlyPalette (const Palette &colorID) | |
| vpColorBlindFriendlyPalette (const std::string &nameColor) | |
| Palette | get_colorID () const |
| vpColor | to_vpColor () const |
| std::vector< unsigned char > | to_RGB () const |
| std::vector< double > | to_colorRatio () const |
| bool | set_fromString (const std::string &nameColor) |
| std::string | to_string () const |
Static Public Member Functions | |
| static std::string | getAvailableColorsNames (const std::string &prefix="", const std::string &separator=" ", const std::string &suffix="") |
Static Public Attributes | |
| static std::vector< std::string > | s_paletteNames |
Class that furnishes a set of colors that color blind people should be able to distinguish one from another.
Definition at line 49 of file vpColorBlindFriendlyPalette.h.
Enum that list the different available colors.
|
strong |
Enum that list the different available colors.
Definition at line 55 of file vpColorBlindFriendlyPalette.h.
| vpColorBlindFriendlyPalette::vpColorBlindFriendlyPalette | ( | ) |
Construct a new vp Color Blind Friendly Palette. The default value vpColorBlindFriendlyPalette::Palette::COUNT is affected.
Definition at line 64 of file vpColorBlindFriendlyPalette.cpp.
| vpColorBlindFriendlyPalette::vpColorBlindFriendlyPalette | ( | const Palette & | colorID | ) |
Construct a new vp Color Blind Friendly Palette object.
| colorID | vpColorBlindFriendlyPalette::Palette that permits to determine the RGB values that we must affect to it. |
Definition at line 70 of file vpColorBlindFriendlyPalette.cpp.
| vpColorBlindFriendlyPalette::vpColorBlindFriendlyPalette | ( | const std::string & | nameColor | ) |
Construct a new vp Color Blind Friendly Palette object from the name of the color. WARNING: if the color is not found, it will be set to vpColorBlindFriendlyPalette::Palette::COUNT.
| nameColor |
Definition at line 76 of file vpColorBlindFriendlyPalette.cpp.
References set_fromString().
| vpColorBlindFriendlyPalette::Palette vpColorBlindFriendlyPalette::get_colorID | ( | ) | const |
Get the vpColorBlindFriendlyPalette::Palette the object corresponds to.
Definition at line 82 of file vpColorBlindFriendlyPalette.cpp.
|
static |
Get the list of available colors names.
| prefix | Optional prefix that will be written before starting the list. |
| separator | Optional separator between each member of the list. |
| suffix | Optional suffix that will be written after ending the list. |
Definition at line 133 of file vpColorBlindFriendlyPalette.cpp.
References s_paletteNames.
| bool vpColorBlindFriendlyPalette::set_fromString | ( | const std::string & | nameColor | ) |
Set the fromString object.
| nameColor |
Definition at line 112 of file vpColorBlindFriendlyPalette.cpp.
References to_string().
Referenced by vpColorBlindFriendlyPalette().
| std::vector< double > vpColorBlindFriendlyPalette::to_colorRatio | ( | ) | const |
Cast the object in a vector of doubles that belong to the range [0; 1]. The initial R, G, B values are divided by 255. For instance a pixel whose RGB values would be {0; 127.5; 255.} would be transformed in a vector {0.; 0.5; 1.0}.
Definition at line 102 of file vpColorBlindFriendlyPalette.cpp.
| std::vector< unsigned char > vpColorBlindFriendlyPalette::to_RGB | ( | ) | const |
Cast a vpColorBlindFriendlyPalette in a vector {R, G, B}. A vpColorBlindFriendlyPalette::Palette::COUNT object is set as white, i.e. {255, 255, 255}.
Definition at line 92 of file vpColorBlindFriendlyPalette.cpp.
| std::string vpColorBlindFriendlyPalette::to_string | ( | ) | const |
Get the name of the vpColorBlindFriendlyPalette object.
Definition at line 127 of file vpColorBlindFriendlyPalette.cpp.
References to_string().
Referenced by set_fromString(), and to_string().
| vpColor vpColorBlindFriendlyPalette::to_vpColor | ( | ) | const |
Cast a vpColorBlindFriendlyPalette in a vpColor object. A vpColorBlindFriendlyPalette::Palette::COUNT object is set as white (255, 255, 255).
Definition at line 87 of file vpColorBlindFriendlyPalette.cpp.
Referenced by ClassUsingDisplayPCL::runDemo().
|
static |
Vector that lists the names of the different available colors.
Definition at line 39 of file vpColorBlindFriendlyPalette.h.
Referenced by getAvailableColorsNames().