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

CropFilter: #includes et foirmattage

parent fab5f431
...@@ -2,11 +2,14 @@ ...@@ -2,11 +2,14 @@
#ifndef CLOUDLIB_CROPFILTER_HPP_ #ifndef CLOUDLIB_CROPFILTER_HPP_
#define 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 "ofxGui.h"
#include "ofxOsc.h" #include "ofxOsc.h"
#include "ofxTimeMeasurements.h"
#include "ofxCloudLib/ParsedParameterGroup.hpp"
namespace ofxCloudLib namespace ofxCloudLib
{ {
...@@ -305,7 +308,6 @@ class FilterManager ...@@ -305,7 +308,6 @@ class FilterManager
{ {
sender_ = sender; sender_ = sender;
parameters_.setName("FilterManager"); parameters_.setName("FilterManager");
parameters_.add(enabled_.set("enabled", true)); parameters_.add(enabled_.set("enabled", true));
...@@ -317,9 +319,9 @@ class FilterManager ...@@ -317,9 +319,9 @@ class FilterManager
parameters_.add(filters_.back()->parameters_); parameters_.add(filters_.back()->parameters_);
} }
zones_gui_.setup(parameters_); // uniquement pour presets!
zones_gui_.setPosition(220, 10); zones_gui_.setup();
zones_gui_.minimizeAll(); zones_gui_.add(parameters_);
} }
void save_preset_id(int num) void save_preset_id(int num)
...@@ -332,6 +334,11 @@ class FilterManager ...@@ -332,6 +334,11 @@ class FilterManager
{ {
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"); 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) 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