leaf_segmentation_alg.cpp
Go to the documentation of this file.
00001 #include "leaf_segmentation_alg.h"
00002 
00003 LeafSegmentationAlgorithm::LeafSegmentationAlgorithm(void):sigma_(0.5)
00004 {
00005 
00006 }
00007 
00008 LeafSegmentationAlgorithm::~LeafSegmentationAlgorithm(void)
00009 {
00010 }
00011 
00012 void LeafSegmentationAlgorithm::config_update(Config& new_cfg, uint32_t level)
00013 {
00014   this->lock();
00015 
00016     ROS_INFO("Reconfigure request: %f, level %d", new_cfg.sigma, level);
00017     ROS_INFO("Reconfigure request: %f, level %d", new_cfg.k, level);
00018     ROS_INFO("Reconfigure request: %d, level %d", new_cfg.min_size, level);
00019  
00020     set_sigma(new_cfg.sigma);  
00021     set_k(new_cfg.k);
00022     set_min_size(new_cfg.min_size);
00023 
00024   // save the current configuration
00025   this->config_=new_cfg;
00026   
00027   this->unlock();
00028 }
00029 
00030 // LeafSegmentationAlgorithm Public API
00031 
00032 void LeafSegmentationAlgorithm::set_sigma(float new_sigma){
00033     sigma_ = new_sigma;
00034 }
00035 
00036 void LeafSegmentationAlgorithm::set_k(float new_k){
00037     k_ = new_k;
00038 }
00039 
00040 void LeafSegmentationAlgorithm::set_min_size(int new_min_size){
00041     min_size_ = new_min_size;
00042 }
00043 
00044 float LeafSegmentationAlgorithm::get_sigma(){
00045     return sigma_;
00046 }
00047 
00048 float LeafSegmentationAlgorithm::get_k(){
00049     return k_;
00050 }
00051 
00052 int LeafSegmentationAlgorithm::get_min_size(){
00053     return min_size_;
00054 }
00055 


iri_leaf_segmentation
Author(s): Sergi Foix
autogenerated on Fri Dec 6 2013 20:27:24