20 #ifndef UTILS_GREEDY_DECOMPOSITION_HPP
21 #define UTILS_GREEDY_DECOMPOSITION_HPP
73 template <
typename Segment>
80 typedef typename Segment::Curve
Curve;
107 std::vector<Segment> result;
108 const Curve * myCurveBak = myCurve;
111 myCurve = myCurveBak;
120 const Curve * myCurve;
124 template <
typename Segment>
127 std::vector<Segment> result;
130 typename Curve::const_iterator pixelItor = myCurve->begin();
131 while (pixelItor != myCurve->end()) {
132 if (!segment.addPoint(*pixelItor)) {
133 result.push_back(segment);
139 if (segment.isValid())
140 result.push_back(segment);
147 #endif // UTILS_GREEDY_DECOMPOSITION_HPP