BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
ColorData Struct Reference

Storage of the color data. More...

#include <color_data.h>

Inheritance diagram for ColorData:
Inheritance graph
[legend]
Collaboration diagram for ColorData:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from Sweeper
 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...
 
- Public Member Functions inherited from Cleaner
 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
 
- Public Attributes inherited from Sweeper
size_t begin
 
size_t dirts
 
- Public Attributes inherited from Cleaner
int cleaned
 

Private Member Functions

void color_landmark (size_t ind)
 Color the landmark according to the active cluster. More...
 

Detailed Description

Storage of the color data.

Definition at line 39 of file color_data.h.

Member Enumeration Documentation

◆ Coloring

Types of coloring.

Enumerator
EXPR 
CLUSTER 
BRUSHING 

Definition at line 45 of file color_data.h.

Constructor & Destructor Documentation

◆ ColorData()

ColorData::ColorData ( )
inline

Calls reset() method to set initial values.

Definition at line 84 of file color_data.h.

Here is the call graph for this function:

Member Function Documentation

◆ color_landmark()

void ColorData::color_landmark ( size_t  ind)
private

Color the landmark according to the active cluster.

Definition at line 139 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_landmarks()

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.

Parameters
idxsIds of landmarks that will be colored.

Definition at line 96 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_landmark()

void ColorData::remove_landmark ( size_t  ind)

Definition at line 114 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void ColorData::reset ( )

Resets color settings to their initial values.

Definition at line 121 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_landmark_color()

void ColorData::reset_landmark_color ( int  id)

Reset colors and cluster ids of all landmarks in the cluster with input id.

Parameters
idInput

Definition at line 104 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ touch_config()

void ColorData::touch_config ( )
inline

Definition at line 118 of file color_data.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

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.

Parameters
tdTransformed data received from the data flow pipeline.

Definition at line 25 of file color_data.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ alpha

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.

◆ batch_size_gen

BatchSizeGen ColorData::batch_size_gen

Definition at line 78 of file color_data.h.

◆ clustering

ClusterData ColorData::clustering

Definition at line 71 of file color_data.h.

◆ col_palette

std::string ColorData::col_palette

Name of the currently used color palette.

Definition at line 69 of file color_data.h.

◆ coloring

int ColorData::coloring

Type of the coloring method.

Definition at line 65 of file color_data.h.

◆ data

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.

◆ default_landmark_color

const glm::vec3 ColorData::default_landmark_color = { 0.4, 0.4, 0.4 }

Definition at line 52 of file color_data.h.

◆ expr_col

int ColorData::expr_col

Index of the column used in expression coloring.

Definition at line 67 of file color_data.h.

◆ landmarks

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.

◆ lm_watch

Cleaner ColorData::lm_watch

Definition at line 54 of file color_data.h.

◆ reverse

bool ColorData::reverse

Flag indicating if the colors of the color palette should be reversed.

Definition at line 76 of file color_data.h.


The documentation for this struct was generated from the following files: