BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
|
Storage of the color data. More...
#include <color_data.h>
Public Types | |
enum | Coloring { EXPR , CLUSTER , BRUSHING } |
Types of coloring. More... | |
Public Member Functions | |
ColorData () | |
Calls reset() method to set initial values. More... | |
void | update (const TransData &td, const LandmarkModel &lm, FrameStats &frame_stats) |
Recomputes color of the 2D data points if user has changed any of the color settings. More... | |
void | color_landmarks (const std::vector< size_t > &idxs) |
Notifies Sweeper that the color settings has been modified and that the data has to be recomputed. More... | |
void | reset_landmark_color (int id) |
Reset colors and cluster ids of all landmarks in the cluster with input id. More... | |
void | remove_landmark (size_t ind) |
void | touch_config () |
void | reset () |
Resets color settings to their initial values. More... | |
![]() | |
Sweeper () | |
void | refresh (const Dirts &d) |
Force-refresh the whole range. More... | |
void | refresh (size_t n_dirts) |
std::tuple< size_t, size_t > | dirty_range (const Dirts &d) |
Find the range to refresh. More... | |
void | clean_range (const Dirts &d, size_t n) |
Clean a range of the cache. More... | |
![]() | |
Cleaner () | |
bool | dirty (const Dirt &d) |
Returns true if the cache needs to be refreshed. More... | |
void | clean (const Dirt &d) |
Call this when the cache is refreshed. More... | |
Public Attributes | |
const glm::vec3 | default_landmark_color = { 0.4, 0.4, 0.4 } |
Cleaner | lm_watch |
std::vector< glm::vec4 > | data |
Colors of the 2D data points. More... | |
std::vector< std::pair< const glm::vec3 *, int > > | landmarks |
Colors of the landmarks and id of the cluster. More... | |
int | coloring |
Type of the coloring method. More... | |
int | expr_col |
Index of the column used in expression coloring. More... | |
std::string | col_palette |
Name of the currently used color palette. More... | |
ClusterData | clustering |
float | alpha |
Alpha channel of RGBA color. More... | |
bool | reverse |
Flag indicating if the colors of the color palette should be reversed. More... | |
BatchSizeGen | batch_size_gen |
![]() | |
size_t | begin |
size_t | dirts |
![]() | |
int | cleaned |
Private Member Functions | |
void | color_landmark (size_t ind) |
Color the landmark according to the active cluster. More... | |
Storage of the color data.
Definition at line 39 of file color_data.h.
enum ColorData::Coloring |
|
inline |
Calls reset() method to set initial values.
Definition at line 84 of file color_data.h.
|
private |
Color the landmark according to the active cluster.
Definition at line 139 of file color_data.cpp.
void ColorData::color_landmarks | ( | const std::vector< size_t > & | idxs | ) |
Notifies Sweeper that the color settings has been modified and that the data has to be recomputed.
Color landmarks by active cluster.
idxs | Ids of landmarks that will be colored. |
Definition at line 96 of file color_data.cpp.
void ColorData::remove_landmark | ( | size_t | ind | ) |
Definition at line 114 of file color_data.cpp.
void ColorData::reset | ( | ) |
Resets color settings to their initial values.
Definition at line 121 of file color_data.cpp.
void ColorData::reset_landmark_color | ( | int | id | ) |
Reset colors and cluster ids of all landmarks in the cluster with input id.
id | Input |
Definition at line 104 of file color_data.cpp.
|
inline |
Definition at line 118 of file color_data.h.
void ColorData::update | ( | const TransData & | td, |
const LandmarkModel & | lm, | ||
FrameStats & | frame_stats | ||
) |
Recomputes color of the 2D data points if user has changed any of the color settings.
td | Transformed data received from the data flow pipeline. |
Definition at line 25 of file color_data.cpp.
float ColorData::alpha |
Alpha channel of RGBA color.
It is the same for all 2D data points.
Definition at line 73 of file color_data.h.
BatchSizeGen ColorData::batch_size_gen |
Definition at line 78 of file color_data.h.
ClusterData ColorData::clustering |
Definition at line 71 of file color_data.h.
std::string ColorData::col_palette |
Name of the currently used color palette.
Definition at line 69 of file color_data.h.
int ColorData::coloring |
Type of the coloring method.
Definition at line 65 of file color_data.h.
std::vector<glm::vec4> ColorData::data |
Colors of the 2D data points.
Array has the size of the number of 2D data points.
Definition at line 59 of file color_data.h.
const glm::vec3 ColorData::default_landmark_color = { 0.4, 0.4, 0.4 } |
Definition at line 52 of file color_data.h.
int ColorData::expr_col |
Index of the column used in expression coloring.
Definition at line 67 of file color_data.h.
std::vector<std::pair<const glm::vec3 *, int> > ColorData::landmarks |
Colors of the landmarks and id of the cluster.
Array has the size of the number of landmarks. <color, cluster id>
Definition at line 63 of file color_data.h.
Cleaner ColorData::lm_watch |
Definition at line 54 of file color_data.h.
bool ColorData::reverse |
Flag indicating if the colors of the color palette should be reversed.
Definition at line 76 of file color_data.h.