Go to the documentation of this file.00001 #ifndef FACE_CONTOUR_DETECTOR_FILTER_ROSSERVICES_H_
00002 #define FACE_CONTOUR_DETECTOR_FILTER_ROSSERVICES_H_
00003
00004 #include <ros/ros.h>
00005
00006 #include <face_contour_detector/GetFilters.h>
00007 #include <face_contour_detector/ApplyFilters.h>
00008
00009 #include <face_contour_detector/name_value_pair.h>
00010
00011 #include <map>
00012
00013 #include <face_contour_detector/filters/Filter.h>
00014
00015 namespace face_contour_detector {
00016 namespace filters {
00020 class RosServices {
00021 public:
00023 RosServices();
00025 ~RosServices();
00026
00031 void AddFilter(std::string name, Filter* filter);
00035 bool HandleApplyRequest(face_contour_detector::ApplyFilters::Request& request, face_contour_detector::ApplyFilters::Response& response);
00039 bool HandleGetRequest(face_contour_detector::GetFilters::Request& request, face_contour_detector::GetFilters::Response& response);
00040
00041 protected:
00044 void M_ExtractProperties(cv::Mat& image, std::vector<face_contour_detector::name_value_pair>& result);
00046 bool M_SetupFilter(face_contour_detector::filter_setup& filterSetup, Filter*& filter);
00047 std::map<std::string, Filter*> m_filters;
00048 };
00049 }
00050 }
00051
00052 #endif //FACE_CONTOUR_DETECTOR_FILTER_ROSSERVICES_H_