Helper class for the dish_viz node. More...
#include <DishVisualizer.h>
Public Member Functions | |
DishVisualizer () | |
double | getMaxVolt (int index) |
double | getMinVolt (int index) |
int | init (int mode) |
Initializes the visualizer. | |
void | redraw () |
Redraws the visualizer screen. | |
void | setMaxVolt (int index, double volt) |
void | setMinVolt (int index, double volt) |
void | setVoltRanges (const boost::array< double, 60 > &b, const boost::array< double, 60 > &t, const boost::array< double, 60 > &min, const boost::array< double, 60 > &max) |
Sets the ranges for each channel (used for determining colors) | |
void | update (int channel, double newValue) |
Updates the visualizer with new voltage data for a channel. | |
void | updateCa (const burst_calc::ca &c) |
Updates the center of activity to be displayed. | |
virtual | ~DishVisualizer () |
Public Attributes | |
bool | isInit |
Private Member Functions | |
int | intMap (double input, double min_in, double max_in, int min_out, int max_out) |
Generates color values based on input data. | |
Private Attributes | |
double | baselines [60] |
burst_calc::ca | ca |
vector< vector< int > > | centers |
int | color_mode |
vector< double > | data |
boost::mutex | dataUpdate |
double | max_volts [60] |
double | min_volts [60] |
bool | plot_ca |
XPlotter * | plotter |
double | thresholds [60] |
Helper class for the dish_viz node.
Creates a visualizer on screen so the user can see the spiking activity which is causing ARM movement.
Definition at line 36 of file DishVisualizer.h.
Definition at line 19 of file DishVisualizer.cpp.
DishVisualizer::~DishVisualizer | ( | ) | [virtual] |
Definition at line 32 of file DishVisualizer.cpp.
double DishVisualizer::getMaxVolt | ( | int | index | ) | [inline] |
Definition at line 65 of file DishVisualizer.h.
double DishVisualizer::getMinVolt | ( | int | index | ) | [inline] |
Definition at line 64 of file DishVisualizer.h.
int DishVisualizer::init | ( | int | mode | ) |
Initializes the visualizer.
mode | the color mode to use |
Definition at line 41 of file DishVisualizer.cpp.
int DishVisualizer::intMap | ( | double | input, |
double | min_in, | ||
double | max_in, | ||
int | min_out, | ||
int | max_out | ||
) | [private] |
Generates color values based on input data.
input | the input voltage |
min_in | the minimum input voltage |
max_in | the maximum input voltage |
min_out | the minimum generated value |
max_out | the maximum generated value |
Definition at line 127 of file DishVisualizer.cpp.
void DishVisualizer::redraw | ( | ) |
Redraws the visualizer screen.
Definition at line 146 of file DishVisualizer.cpp.
void DishVisualizer::setMaxVolt | ( | int | index, |
double | volt | ||
) | [inline] |
Definition at line 67 of file DishVisualizer.h.
void DishVisualizer::setMinVolt | ( | int | index, |
double | volt | ||
) | [inline] |
Definition at line 66 of file DishVisualizer.h.
void DishVisualizer::setVoltRanges | ( | const boost::array< double, 60 > & | b, |
const boost::array< double, 60 > & | t, | ||
const boost::array< double, 60 > & | min, | ||
const boost::array< double, 60 > & | max | ||
) |
Sets the ranges for each channel (used for determining colors)
b | baselines for each channel |
t | thresholds for each channel |
min | minimum voltages for each channel |
max | maximum voltages for each channel |
Definition at line 280 of file DishVisualizer.cpp.
void DishVisualizer::update | ( | int | channel, |
double | newValue | ||
) |
Updates the visualizer with new voltage data for a channel.
channel | the channel being updated |
newValue | the new value for the channel |
Definition at line 247 of file DishVisualizer.cpp.
void DishVisualizer::updateCa | ( | const burst_calc::ca & | c | ) |
Updates the center of activity to be displayed.
c | the CA to be displayed |
Definition at line 261 of file DishVisualizer.cpp.
double DishVisualizer::baselines[60] [private] |
Definition at line 45 of file DishVisualizer.h.
burst_calc::ca DishVisualizer::ca [private] |
Definition at line 41 of file DishVisualizer.h.
vector< vector<int> > DishVisualizer::centers [private] |
Definition at line 39 of file DishVisualizer.h.
int DishVisualizer::color_mode [private] |
Definition at line 49 of file DishVisualizer.h.
vector<double> DishVisualizer::data [private] |
Definition at line 40 of file DishVisualizer.h.
boost::mutex DishVisualizer::dataUpdate [private] |
Definition at line 44 of file DishVisualizer.h.
Definition at line 55 of file DishVisualizer.h.
double DishVisualizer::max_volts[60] [private] |
Definition at line 48 of file DishVisualizer.h.
double DishVisualizer::min_volts[60] [private] |
Definition at line 47 of file DishVisualizer.h.
bool DishVisualizer::plot_ca [private] |
Definition at line 42 of file DishVisualizer.h.
XPlotter* DishVisualizer::plotter [private] |
Definition at line 38 of file DishVisualizer.h.
double DishVisualizer::thresholds[60] [private] |
Definition at line 46 of file DishVisualizer.h.