17#ifndef __connectome_lut_h__
18#define __connectome_lut_h__
26#include "connectome/connectome.h"
43 using RGB = Eigen::Array<uint8_t, 3, 1>;
50 LUT_node (
const std::string& n,
const std::string& sn) :
56 LUT_node (
const std::string& n,
const uint8_t r,
const uint8_t g,
const uint8_t b,
const uint8_t a = 255) :
61 LUT_node (
const std::string& n,
const std::string& sn,
const uint8_t r,
const uint8_t g,
const uint8_t b,
const uint8_t a = 255) :
67 LUT_node (
const std::string& n,
const RGB& rgb,
const uint8_t a = 255) :
73 void set_colour (
const uint8_t r,
const uint8_t g,
const uint8_t b) { colour = RGB {r,g,b}; }
74 void set_colour (
const RGB& rgb) { colour = rgb; }
75 void set_alpha (
const uint8_t a) { alpha = a; }
78 const std::string& get_name()
const {
return name; }
79 const std::string& get_short_name()
const {
return short_name.size() ? short_name : name; }
80 const RGB& get_colour()
const {
return colour; }
81 uint8_t get_alpha()
const {
return alpha; }
85 std::string name, short_name;
94class LUT :
public std::multimap<node_t, LUT_node>
96 enum file_format { LUT_NONE, LUT_BASIC, LUT_FREESURFER, LUT_AAL, LUT_ITKSNAP, LUT_MRTRIX };
98 using map_type = std::multimap<node_t, LUT_node>;
99 LUT () : exclusive (true) { }
101 void load (
const std::string&);
106 file_format guess_file_format (
const std::string&);
108 void parse_line_basic (
const std::string&);
109 void parse_line_freesurfer (
const std::string&);
110 void parse_line_aal (
const std::string&);
111 void parse_line_itksnap (
const std::string&);
112 void parse_line_mrtrix (
const std::string&);
void load(const std::string &)
std::multimap< node_t, LUT_node > map_type
bool is_exclusive() const
vector< node_t > get_lut_mapping(const LUT &, const LUT &)