1 #ifndef PCL_VISUALIZATION_SIMPLE_BUFF_H 2 #define PCL_VISUALIZATION_SIMPLE_BUFF_H 4 #include <pcl/visualization/histogram_visualizer.h> 11 namespace visualization
30 initValuesAndVisualization();
39 nb_values_ = nb_values;
43 PCL_WARN(
"Maximum number of values can only be 308 (%d given). Setting back to 308. \n");
49 PCL_WARN(
"Number of values must be at least 2 (%d given). Setting it to default (308). \n");
54 initValuesAndVisualization();
64 updateValuesToDisplay();
67 if(control_background_color_)
69 if(values_.back() < lowest_threshold_)
71 histo_->setBackgroundColor(255.0, 140.0, 0.0);
75 histo_->setBackgroundColor(255.0, 255.0, 255.0);
80 histo_->updateFeatureHistogram(cloud_, nb_values_);
85 histo_->setGlobalYRange(min_, max_);
102 values_.push_back(val);
118 histo_->spinOnce(time);
137 control_background_color_ = value;
141 histo_->setBackgroundColor(255.0, 255.0, 255.0);
143 lowest_threshold_ = threshold;
154 handle_y_scale_ = value;
162 initValuesAndVisualization ()
164 cloud_.points.resize(1);
166 PCL_WARN(
"Setting buffer size to %d entries.\n", nb_values_);
167 values_.resize(nb_values_);
170 histo_->addFeatureHistogram(cloud_, nb_values_);
178 updateValuesToDisplay ()
180 for(
int i = 0 ; i < nb_values_ ; ++i)
182 cloud_.points[0].histogram[i] = values_[i];
190 control_background_color_ =
false;
191 lowest_threshold_ = 0.0f;
193 handle_y_scale_ =
false;
206 std::deque<float> values_;
214 bool control_background_color_;
217 float lowest_threshold_;
220 bool handle_y_scale_;
228 #endif // PCL_VISUALIZATION_SIMPLE_BUFF_H PCLSimpleBufferVisualizer(const int nb_values)
PCL simple buffer visualizer visualizer constructor.
PCL histogram visualizer main class.
void spinOnce(const int time=1)
spinOnce method.
void addValue(const float val)
add a new value at the end of the buffer.
This file defines compatibility wrappers for low level I/O functions.
void setAutomaticBackgroundColorControl(const bool value=true, const float threshold=0.0f)
set background color handling mode.
PCL simple buffer visualizer main class.
void setManuallyManageYScale(const bool value=false)
set Y scale policy.
PCLSimpleBufferVisualizer()
PCL simple buffer visualizer visualizer default constructor.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void displayValues(const int time=1)
force display of values.