31 #ifndef DRAIN_PALETTE_ENTRY
32 #define DRAIN_PALETTE_ENTRY
34 #include <drain/UniTuple.h>
37 #include "ImageFile.h"
41 #include "drain/util/BeanLike.h"
42 #include "drain/util/Dictionary.h"
43 #include "drain/util/JSON.h"
135 PaletteEntry(
const std::initializer_list<Variable::init_pair_t > & args);
183 std::ostream &
toStream(std::ostream &ostr,
char separator=
'\t')
const;
190 std::stringstream sstr;
212 std::ostream & operator<<(std::ostream &ostr,
const PaletteEntry & entry){
Something which has a name, a description and possibly some parameters of varying type.
Definition: BeanLike.h:60
static std::ostream & toStream(std::ostream &ostr, const std::initializer_list< T > &x, const SprinterLayout &layout=defaultLayout)
New (experimental)
Definition: Sprinter.h:420
Container for color, transparency (alpha) and textual id and description. Does not contain intensity ...
Definition: PaletteEntry.h:62
UniTuple< value_t, 3 > color_t
Color vector type.
Definition: PaletteEntry.h:70
std::string label
Short description for legends.
Definition: PaletteEntry.h:156
void getHexColor(std::ostream &ostr) const
Returns the color without leading marker (like "0x").
Definition: PaletteEntry.cpp:129
std::string code
Technical identifier (optional).
Definition: PaletteEntry.h:153
bool hidden
Suggests hiding the entry in legends. Does not affect colouring of images.
Definition: PaletteEntry.h:174
color_t color
Index or threshold value. Must be signed, as image data may generally have negative values.
Definition: PaletteEntry.h:162
PaletteEntry()
Default constructor.
Definition: PaletteEntry.cpp:55
double value_t
Intensity type.
Definition: PaletteEntry.h:67
std::ostream & toStream(std::ostream &ostr, char separator='\t') const
Definition: PaletteEntry.cpp:142
value_t alpha
Transparency.
Definition: PaletteEntry.h:165
Definition: DataSelector.cpp:1277
Definition: Sprinter.h:137