Commit 0ff3024d authored by artificiel's avatar artificiel
Browse files

CropFilter: #includes et foirmattage

parent fab5f431
......@@ -2,11 +2,14 @@
#ifndef CLOUDLIB_CROPFILTER_HPP_
#define CLOUDLIB_CROPFILTER_HPP_
#include "ofxTimeMeasurements.h"
#include <pcl/common/transforms.h>
#include <pcl/point_types.h>
#include "ofxCloudLib/ParsedParameterGroup.hpp"
#include "ofxGui.h"
#include "ofxOsc.h"
#include "ofxTimeMeasurements.h"
#include "ofxCloudLib/ParsedParameterGroup.hpp"
namespace ofxCloudLib
{
......@@ -74,7 +77,7 @@ class CropFilter
float get_fill()
{
auto fill = ofClamp(parameters_.count_.get() / parameters_.capacity_.get(), 0, 1);
auto fill = ofClamp(parameters_.count_.get() / parameters_.capacity_.get(), 0, 1);
if (fill > .02) return fill;
return 0;
}
......@@ -305,7 +308,6 @@ class FilterManager
{
sender_ = sender;
parameters_.setName("FilterManager");
parameters_.add(enabled_.set("enabled", true));
......@@ -317,9 +319,9 @@ class FilterManager
parameters_.add(filters_.back()->parameters_);
}
zones_gui_.setup(parameters_);
zones_gui_.setPosition(220, 10);
zones_gui_.minimizeAll();
// uniquement pour presets!
zones_gui_.setup();
zones_gui_.add(parameters_);
}
void save_preset_id(int num)
......@@ -330,8 +332,13 @@ class FilterManager
void load_preset_id(int num)
{
ofLogNotice("filter_manager") << "loading preset" << ofToString(num) << ".json";
ofLogNotice("filter_manager") << "loading preset" << ofToString(num) << ".json";
zones_gui_.loadFromFile("presets/zones/preset" + ofToString(num) + ".json");
for (const auto &filter : filters_) {
zones_gui_.getGroup(parameters_.getName()).getGroup(filter->parameters_.getName()).minimize();
}
}
void update(pcl::PointCloud<pcl::PointXYZ>::Ptr input_cloud)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment