37 template<
typename I,
typename O,
typename P>
43 BOOST_CONCEPT_ASSERT(( boost::InputIterator<I> ));
44 BOOST_CONCEPT_ASSERT(( boost::OutputIterator<O,typename P::Point> ));
47 std::remove_copy_if(itb, ite, ito, nPred);
51 template<
typename I,
typename O,
typename F>
55 const F& aFunctor,
const typename F::Value& aThreshold)
58 BOOST_CONCEPT_ASSERT(( boost::InputIterator<I> ));
59 BOOST_CONCEPT_ASSERT(( boost::OutputIterator<O,typename F::Point> ));
64 std::remove_copy_if(itb, ite, ito, aPred);
68 template<
typename I,
typename O>
75 typename I::Domain d = aImg.domain();
80 template<
typename I,
typename O>
84 const typename I::Value& low,
85 const typename I::Value& up)
91 typename I::Domain d = aImg.domain();
101 std::remove_copy_if(d.begin(), d.end(), ito, aPred);
105 template<
typename It,
typename Im>
109 const typename Im::Value& aValue)
111 BOOST_CONCEPT_ASSERT(( boost::InputIterator<It> ));
114 typename Im::Domain d = aImg.domain();
115 for (It it = itb; it != ite; ++it)
117 if (d.isInside( *it ))
118 aImg.setValue( *it, aValue );
123 template<
typename R,
typename I>
127 const typename I::Value& aValue)
136 template<
typename I,
typename F>
144 typename I::Domain d = aImg.domain();
146 std::transform(d.begin(), d.end(), aImg.range().outputIterator(), aFun );
157 typename I::ConstRange r = aImg2.constRange();
158 std::copy( r.begin(), r.end(), aImg1.range().outputIterator() );
162 template<
typename I,
typename S,
typename D,
typename V>
166 const typename D::Point& aPoint,
175 if ( aSet.find( aPoint ) == aSet.end() )
178 aSet.insert( aPoint );
179 aImg.setValue( aPoint, aValue );
186 template<
typename D,
typename V>
188 ImageContainerBySTLMap<D,V>,
189 DigitalSetFromMap<ImageContainerBySTLMap<D,V> >,
193 (ImageContainerBySTLMap<D,V>& aImg,
194 DigitalSetFromMap<ImageContainerBySTLMap<D,V> >& ,
195 const typename D::Point& aPoint,
198 typedef typename D::Point P;
199 typedef typename ImageContainerBySTLMap<D,V>::iterator Iterator;
202 pair( aPoint, aValue );
203 std::pair<Iterator, bool> res
204 = aImg.insert( pair );
210 template<
typename I,
typename S>
214 const typename I::Point& aPoint,
215 const typename I::Value& aValue )
219 BOOST_STATIC_ASSERT(( boost::is_same< typename I::Point, typename S::Point >::value ));
221 typedef typename I::Domain D;
222 typedef typename I::Value V;
227 template<
typename I,
typename S,
typename D,
typename V>
231 const typename D::Point& aPoint,
241 if ( aSet.find( aPoint ) != aSet.end() )
244 aSet.insert( aPoint );
245 aImg.setValue( aPoint, aValue );
251 template<
typename D,
typename V>
253 ImageContainerBySTLMap<D,V>,
254 DigitalSetFromMap<ImageContainerBySTLMap<D,V> >,
258 (ImageContainerBySTLMap<D,V>& aImg,
259 DigitalSetFromMap<ImageContainerBySTLMap<D,V> >& ,
260 const typename D::Point& aPoint,
263 typedef typename D::Point P;
264 typedef typename ImageContainerBySTLMap<D,V>::iterator Iterator;
267 pair( aPoint, aValue );
268 std::pair<Iterator, bool> res
269 = aImg.insert( pair );
270 bool flag = res.second;
272 res.first->second = aValue;
278 template<
typename I,
typename S>
282 const typename I::Point& aPoint,
283 const typename I::Value& aValue )
288 BOOST_STATIC_ASSERT(( boost::is_same< typename I::Point, typename S::Point >::value ));
290 typedef typename I::Domain D;
291 typedef typename I::Value V;
297 template<
typename I,
typename S,
typename D,
typename V>
301 const typename D::Point& aPoint,
304 if ( aSet.find( aPoint ) != aSet.end() )
306 aValue = aImg( aPoint );
314 template<
typename D,
typename V>
316 ImageContainerBySTLMap<D,V>,
317 DigitalSetFromMap<ImageContainerBySTLMap<D,V> >,
321 (
const ImageContainerBySTLMap<D,V>& aImg,
322 const DigitalSetFromMap<ImageContainerBySTLMap<D,V> >& ,
323 const typename D::Point& aPoint,
326 typedef typename D::Point P;
327 typedef typename ImageContainerBySTLMap<D,V>::const_iterator ConstIterator;
329 ConstIterator it = aImg.find( aPoint );
330 if ( it != aImg.end() )
340 template<
typename I,
typename S>
344 const typename I::Point& aPoint,
345 typename I::Value& aValue )
350 BOOST_STATIC_ASSERT(( boost::is_same< typename I::Point, typename S::Point >::value ));
352 typedef typename I::Domain D;
353 typedef typename I::Value V;