[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
vigra/iteratortraits.hxx | ![]() |
00001 /************************************************************************/ 00002 /* */ 00003 /* Copyright 1998-2002 by Ullrich Koethe */ 00004 /* */ 00005 /* This file is part of the VIGRA computer vision library. */ 00006 /* The VIGRA Website is */ 00007 /* http://hci.iwr.uni-heidelberg.de/vigra/ */ 00008 /* Please direct questions, bug reports, and contributions to */ 00009 /* ullrich.koethe@iwr.uni-heidelberg.de or */ 00010 /* vigra@informatik.uni-hamburg.de */ 00011 /* */ 00012 /* Permission is hereby granted, free of charge, to any person */ 00013 /* obtaining a copy of this software and associated documentation */ 00014 /* files (the "Software"), to deal in the Software without */ 00015 /* restriction, including without limitation the rights to use, */ 00016 /* copy, modify, merge, publish, distribute, sublicense, and/or */ 00017 /* sell copies of the Software, and to permit persons to whom the */ 00018 /* Software is furnished to do so, subject to the following */ 00019 /* conditions: */ 00020 /* */ 00021 /* The above copyright notice and this permission notice shall be */ 00022 /* included in all copies or substantial portions of the */ 00023 /* Software. */ 00024 /* */ 00025 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */ 00026 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */ 00027 /* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */ 00028 /* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */ 00029 /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */ 00030 /* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */ 00031 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */ 00032 /* OTHER DEALINGS IN THE SOFTWARE. */ 00033 /* */ 00034 /************************************************************************/ 00035 00036 00037 #ifndef VIGRA_ITERATORTRAITS_HXX 00038 #define VIGRA_ITERATORTRAITS_HXX 00039 00040 #include "accessor.hxx" 00041 #include "imageiteratoradapter.hxx" 00042 00043 namespace vigra { 00044 00045 /** \addtogroup ImageIterators 00046 */ 00047 //@{ 00048 /** \brief Export associated information for each image iterator. 00049 00050 The IteratorTraits class contains the following fields: 00051 00052 \code 00053 template <class T> 00054 struct IteratorTraits 00055 { 00056 typedef T Iterator; 00057 typedef Iterator iterator; 00058 typedef typename iterator::iterator_category iterator_category; 00059 typedef typename iterator::value_type value_type; 00060 typedef typename iterator::reference reference; 00061 typedef typename iterator::index_reference index_reference; 00062 typedef typename iterator::pointer pointer; 00063 typedef typename iterator::difference_type difference_type; 00064 typedef typename iterator::row_iterator row_iterator; 00065 typedef typename iterator::column_iterator column_iterator; 00066 typedef typename 00067 AccessorTraits<value_type>::default_accessor DefaultAccessor; 00068 typedef DefaultAccessor default_accessor; 00069 00070 typedef VigraTrueType/VigraFalseType hasConstantStrides; 00071 }; 00072 \endcode 00073 00074 By (partially) specializing this template for an iterator class 00075 the defaults given above can be changed as appropriate. For example, iterators 00076 for rgb images are associated with <TT>RGBAccessor<value_type></TT> 00077 instead of <TT>StandardAccessor<value_type></TT>. To get the accessor 00078 associated with a given iterator, use code like this: 00079 00080 \code 00081 template <class Iterator> 00082 void foo(Iterator i) 00083 { 00084 typedef typename IteratorTraits<Iterator>::DefaultAccessor Accessor; 00085 Accessor a; 00086 ... 00087 } 00088 \endcode 00089 00090 This technique is, for example, used by the 00091 \ref IteratorBasedArgumentObjectFactories. The possibility to retrieve the default accessor by means of a traits 00092 class is especially important since this information is not 00093 contained in the iterator directly. 00094 00095 The member <tt>hasConstantStrides</tt> is useful for certain 00096 optimizations: it helps to decide whether we can replace iterator 00097 operations such as <tt>iter++</tt> or <tt>iter += n</tt> with 00098 corresponding pointer operations (which may be faster), where 00099 the pointer is obtained as the address of iterator's pointee 00100 (the object the iterator currently refers to). 00101 This flag would be <tt>VigraFalseType</tt> for a 00102 <tt>std::list<int>::iterator</tt>, but is <tt>VigraTrueType</tt> 00103 for most VIGRA iterators. 00104 00105 <b>\#include</b> <vigra/iteratortraits.hxx> 00106 Namespace: vigra 00107 */ 00108 template <class T> 00109 struct IteratorTraits 00110 { 00111 typedef T Iterator; 00112 typedef Iterator iterator; 00113 typedef typename iterator::iterator_category iterator_category; 00114 typedef typename iterator::value_type value_type; 00115 typedef typename iterator::reference reference; 00116 typedef typename iterator::index_reference index_reference; 00117 typedef typename iterator::pointer pointer; 00118 typedef typename iterator::difference_type difference_type; 00119 typedef typename iterator::row_iterator row_iterator; 00120 typedef typename iterator::column_iterator column_iterator; 00121 typedef typename 00122 AccessorTraits<value_type>::default_accessor DefaultAccessor; 00123 typedef DefaultAccessor default_accessor; 00124 00125 // default: disable the constant strides optimization 00126 typedef VigraFalseType hasConstantStrides; 00127 }; 00128 00129 template <class T> 00130 struct IteratorTraitsBase 00131 { 00132 typedef T Iterator; 00133 typedef Iterator iterator; 00134 typedef typename iterator::iterator_category iterator_category; 00135 typedef typename iterator::value_type value_type; 00136 typedef typename iterator::reference reference; 00137 typedef typename iterator::index_reference index_reference; 00138 typedef typename iterator::pointer pointer; 00139 typedef typename iterator::difference_type difference_type; 00140 typedef typename iterator::row_iterator row_iterator; 00141 typedef typename iterator::column_iterator column_iterator; 00142 }; 00143 00144 00145 //@} 00146 00147 00148 /***********************************************************/ 00149 00150 /** \page ArgumentObjectFactories Argument Object Factories 00151 00152 Factory functions to create argument objects which simplify long argument lists. 00153 00154 <UL style="list-style-image:url(documents/bullet.gif)"> 00155 <LI> \ref ImageBasedArgumentObjectFactories 00156 <LI> \ref MultiArrayBasedArgumentObjectFactories 00157 <LI> \ref IteratorBasedArgumentObjectFactories 00158 </UL> 00159 00160 Long argument lists provide for greater flexibility of functions, 00161 but they are also tedious and error prone, when we don't need 00162 the flexibility. Thus, we define argument objects which 00163 automatically provide reasonable defaults for those arguments that we 00164 didn't specify explicitly. 00165 00166 The argument objects are created via a number of factory functions. 00167 Since these functions have descriptive names, they also serve 00168 to improve readability: the name of each factory tells te purpose of its 00169 argument object. 00170 00171 Consider the following example. Without argument objects we had to 00172 write something like this (cf. \ref copyImageIf()): 00173 00174 \code 00175 vigra::BImage img1, img2, img3; 00176 00177 // fill img1 and img2 ... 00178 00179 vigra::copyImageIf(img1.upperLeft(), img1.lowerRight(), img1.accessor(), 00180 img2.upperLeft(), img2.accessor(), 00181 img3.upperLeft(), img3.accessor()); 00182 \endcode 00183 00184 Using the argument object factories, this becomes much shorter and 00185 more readable: 00186 00187 \code 00188 vigra::copyImageIf(srcImageRange(img1), 00189 maskImage(img2), 00190 destImage(img3)); 00191 \endcode 00192 00193 The names of the factories clearly tell which image is source, mask, 00194 and destination. In addition, the suffix <TT>Range</TT> must be used 00195 for those argument objects that need to specify the lower right 00196 corner of the region of interest. Typically, this is only the first 00197 source argument, but sometimes the first destiniation argument must 00198 also contain a range. 00199 00200 The factory functions come in two flavours: Iterator based and 00201 image based factories. Above we have seen the image based variant. 00202 The iterator based variant would look like this: 00203 00204 \code 00205 vigra::copyImageIf(srcIterRange(img1.upperLeft(), img1.lowerRight()), 00206 maskIter(img2.upperLeft()), 00207 destIter(img3.upperLeft())); 00208 \endcode 00209 00210 These factory functions contain the word <TT>Iter</TT> instead of the word 00211 <TT>Image</TT>, They would normally be used if we couldn't access the 00212 images (for example, within a function which got passed iterators) 00213 or if we didn't want to operate on the entire image. The default 00214 accessor is obtained via \ref vigra::IteratorTraits. 00215 00216 All factory functions also allow to specify accessors explicitly. This 00217 is useful if we can't use the default accessor. This variant looks 00218 like this: 00219 00220 \code 00221 vigra::copyImageIf(srcImageRange(img1), 00222 maskImage(img2, MaskPredicateAccessor()), 00223 destImage(img3)); 00224 \endcode 00225 00226 or 00227 00228 \code 00229 vigra::copyImageIf(srcIterRange(img1.upperLeft(), img1.lowerRight()), 00230 maskIter(img2.upperLeft(), MaskPredicateAccessor()), 00231 destIter(img3.upperLeft())); 00232 \endcode 00233 00234 All versions can be mixed freely within one expression. 00235 Technically, the argument objects are simply defined as 00236 pairs and triples of iterators and accessor so that all algorithms 00237 should declare a call interface version based on pairs and triples 00238 (see for example \ref copyImageIf()). 00239 00240 \section ImageBasedArgumentObjectFactories Image Based Argument Object Factories 00241 00242 <b>Include:</b> automatically included with the image classes<br> 00243 Namespace: vigra 00244 00245 These factories can be used to create argument objects when we 00246 are given instances or subclasses of \ref vigra::BasicImage (see 00247 \ref StandardImageTypes for instances defined per default). 00248 These factory functions access <TT>img.upperLeft()</TT>, 00249 <TT>img.lowerRight()</TT>, and <TT>img.accessor()</TT> to obtain the iterators 00250 and accessor for the given image (unless the accessor is 00251 given explicitly). The following factory functions are provided: 00252 00253 <table> 00254 <tr><th bgcolor="#f0e0c0" colspan=2 align=left> 00255 <TT>\ref vigra::BasicImage "vigra::BasicImage<SomeType>" img;</TT> or <br> 00256 <TT>\ref vigra::BasicImageView "vigra::BasicImageView<SomeType>" img;</TT> 00257 </th> 00258 </tr> 00259 <tr><td> 00260 00261 <TT>srcImageRange(img)</TT> 00262 </td><td> 00263 create argument object containing upper left, lower right, and 00264 default accessor of source image 00265 00266 </td></tr> 00267 <tr><td> 00268 00269 <TT>srcImageRange(img, Rect2D(...))</TT> 00270 </td><td> 00271 create argument object containing the ROI specified by <tt>\ref vigra::Rect2D</tt> and 00272 default accessor of source image 00273 00274 </td></tr> 00275 <tr><td> 00276 00277 <TT>srcImageRange(img, SomeAccessor())</TT> 00278 </td><td> 00279 create argument object containing upper left, lower right 00280 of source image, and given accessor 00281 00282 </td></tr> 00283 <tr><td> 00284 00285 <TT>srcImageRange(img, Rect2D(...), SomeAccessor())</TT> 00286 </td><td> 00287 create argument object containing the ROI specified by <tt>\ref vigra::Rect2D</tt> and 00288 of source image, and given accessor 00289 00290 </td></tr> 00291 <tr><td> 00292 00293 <TT>srcImage(img)</TT> 00294 </td><td> 00295 create argument object containing upper left, and 00296 default accessor of source image 00297 00298 </td></tr> 00299 <tr><td> 00300 00301 <TT>srcImage(img, Point2D(...))</TT> 00302 </td><td> 00303 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt>, and 00304 default accessor of source image 00305 00306 </td></tr> 00307 <tr><td> 00308 00309 <TT>srcImage(img, SomeAccessor())</TT> 00310 </td><td> 00311 create argument object containing upper left 00312 of source image, and given accessor 00313 00314 </td></tr> 00315 <tr><td> 00316 00317 <TT>srcImage(img, Point2D(...), SomeAccessor())</TT> 00318 </td><td> 00319 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt> of source image, 00320 and given accessor 00321 00322 </td></tr> 00323 <tr><td> 00324 00325 <TT>maskImage(img)</TT> 00326 </td><td> 00327 create argument object containing upper left, and 00328 default accessor of mask image 00329 00330 </td></tr> 00331 <tr><td> 00332 00333 <TT>maskImage(img, Point2D(...))</TT> 00334 </td><td> 00335 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt>, and 00336 default accessor of mask image 00337 00338 </td></tr> 00339 <tr><td> 00340 00341 <TT>maskImage(img, SomeAccessor())</TT> 00342 </td><td> 00343 create argument object containing upper left 00344 of mask image, and given accessor 00345 00346 </td></tr> 00347 <tr><td> 00348 00349 <TT>maskImage(img, Point2D(...), SomeAccessor())</TT> 00350 </td><td> 00351 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt> of mask image, 00352 and given accessor 00353 00354 </td></tr> 00355 <tr><td> 00356 00357 <TT>destImageRange(img)</TT> 00358 </td><td> 00359 create argument object containing upper left, lower right, and 00360 default accessor of destination image 00361 00362 </td></tr> 00363 <tr><td> 00364 00365 <TT>destImageRange(img, Rect2D(...))</TT> 00366 </td><td> 00367 create argument object containing the ROI specified by <tt>\ref vigra::Rect2D</tt> and 00368 default accessor of destination image 00369 00370 </td></tr> 00371 <tr><td> 00372 00373 <TT>destImageRange(img, SomeAccessor())</TT> 00374 </td><td> 00375 create argument object containing upper left, lower right 00376 of destination image, and given accessor 00377 00378 </td></tr> 00379 <tr><td> 00380 00381 <TT>destImageRange(img, Rect2D(...), SomeAccessor())</TT> 00382 </td><td> 00383 create argument object containing the ROI specified by <tt>\ref vigra::Rect2D</tt> 00384 of destination image, and given accessor 00385 00386 </td></tr> 00387 <tr><td> 00388 00389 <TT>destImage(img)</TT> 00390 </td><td> 00391 create argument object containing upper left, and 00392 default accessor of destination image 00393 00394 </td></tr> 00395 <tr><td> 00396 00397 <TT>destImage(img, Point2D(...))</TT> 00398 </td><td> 00399 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt>, and 00400 default accessor of destination image 00401 00402 </td></tr> 00403 <tr><td> 00404 00405 <TT>destImage(img, SomeAccessor())</TT> 00406 </td><td> 00407 create argument object containing upper left 00408 of destination image, and given accessor 00409 00410 </td></tr> 00411 <tr><td> 00412 00413 <TT>destImage(img, Point2D(...), SomeAccessor())</TT> 00414 </td><td> 00415 create argument object with upper left at point given by <tt>\ref vigra::Point2D</tt> of destination image, 00416 and given accessor 00417 00418 </td></tr> 00419 </table> 00420 00421 00422 \section MultiArrayBasedArgumentObjectFactories MultiArrayView Based Argument Object Factories 00423 00424 <b>Include:</b> automatically included with 00425 <vigra/multi_array.hxx><br> 00426 Namespace: vigra 00427 00428 These factories can be used to create argument objects when we 00429 are given instances or subclasses of \ref vigra::MultiArrayView. 00430 These factory functions access <TT>array.traverser_begin()</TT>, 00431 <TT>array.traverser_end()</TT> to obtain the iterators. If no accessor is 00432 given, they use the <tt>AccessorTraits<T></tt> to determine the default 00433 accessor associated with the array's value type <tt>T</tt>. 00434 The following factory functions are provided: 00435 00436 <table> 00437 <tr><th bgcolor="#f0e0c0" colspan=2 align=left> 00438 <TT>\ref vigra::MultiArrayView "vigra::MultiArrayView<N, SomeType>" img;</TT> 00439 </th> 00440 </tr> 00441 <tr><td> 00442 00443 <TT>srcMultiArrayRange(img)</TT> 00444 </td><td> 00445 create argument object containing a \ref vigra::MultiIterator 00446 marking the begin of the array, a shape object giving the desired 00447 shape of the array (possibly a subarray) and the default const accessor for 00448 <tt>SomeType</tt> 00449 00450 </td></tr> 00451 <tr><td> 00452 00453 <TT>srcMultiArrayRange(img, SomeAccessor())</TT> 00454 </td><td> 00455 create argument object containing a \ref vigra::MultiIterator 00456 marking the begin of the array, a shape object giving the desired 00457 shape of the array (possibly a subarray) and the given accessor 00458 00459 </td></tr> 00460 <tr><td> 00461 00462 <TT>srcMultiArray(img)</TT> 00463 </td><td> 00464 create argument object containing a \ref vigra::MultiIterator 00465 marking the begin of the array, and the default const accessor for 00466 <tt>SomeType</tt> 00467 00468 </td></tr> 00469 <tr><td> 00470 00471 <TT>srcMultiArray(img, SomeAccessor())</TT> 00472 </td><td> 00473 create argument object containing a \ref vigra::MultiIterator 00474 marking the begin of the array and the given accessor 00475 00476 </td></tr> 00477 <tr><td> 00478 00479 <TT>destMultiArrayRange(img)</TT> 00480 </td><td> 00481 create argument object containing a \ref vigra::MultiIterator 00482 marking the begin of the array, a shape object giving the desired 00483 shape of the array (possibly a subarray) and the default accessor for 00484 <tt>SomeType</tt> 00485 00486 </td></tr> 00487 <tr><td> 00488 00489 <TT>destMultiArrayRange(img, SomeAccessor())</TT> 00490 </td><td> 00491 create argument object containing a \ref vigra::MultiIterator's 00492 marking the begin of the array, a shape object giving the desired 00493 shape of the array (possibly a subarray) and the given accessor 00494 00495 </td></tr> 00496 <tr><td> 00497 00498 <TT>destMultiArray(img)</TT> 00499 </td><td> 00500 create argument object containing a \ref vigra::MultiIterator 00501 marking the begin of the array and the default accessor for 00502 <tt>SomeType</tt> 00503 00504 </td></tr> 00505 <tr><td> 00506 00507 <TT>destMultiArray(img, SomeAccessor())</TT> 00508 </td><td> 00509 create argument object containing a \ref vigra::MultiIterator's 00510 marking the begin of the array and the given accessor 00511 00512 </td></tr> 00513 </table> 00514 00515 00516 \section IteratorBasedArgumentObjectFactories Iterator Based Argument Object Factories 00517 00518 <b>\#include</b> <vigra/iteratortraits.hxx> 00519 Namespace: vigra 00520 00521 These factories can be used to create argument objects when we 00522 are given \ref ImageIterators. 00523 These factory functions use \ref vigra::IteratorTraits to 00524 get the default accessor for the given iterator unless the 00525 accessor is given explicitly. The following factory functions 00526 are provided: 00527 00528 <table> 00529 <tr><th bgcolor="#f0e0c0" colspan=2 align=left> 00530 <TT>\ref vigra::BasicImage::Iterator "vigra::BasicImage<SomeType>::Iterator" i1, i2;</TT> 00531 </th> 00532 </tr> 00533 <tr><td> 00534 00535 <TT>srcIterRange(i1, i2)</TT> 00536 </td><td> 00537 create argument object containing the given iterators and 00538 corresponding default accessor (for source image) 00539 00540 </td></tr> 00541 <tr><td> 00542 00543 <TT>srcIterRange(i1, i2, SomeAccessor())</TT> 00544 </td><td> 00545 create argument object containing given iterators and 00546 accessor (for source image) 00547 00548 </td></tr> 00549 <tr><td> 00550 00551 <TT>srcIter(i1)</TT> 00552 </td><td> 00553 create argument object containing the given iterator and 00554 corresponding default accessor (for source image) 00555 00556 </td></tr> 00557 <tr><td> 00558 00559 <TT>srcIter(i1, SomeAccessor())</TT> 00560 </td><td> 00561 create argument object containing given iterator and 00562 accessor (for source image) 00563 00564 </td></tr> 00565 <tr><td> 00566 00567 <TT>maskIter(i1)</TT> 00568 </td><td> 00569 create argument object containing the given iterator and 00570 corresponding default accessor (for mask image) 00571 00572 </td></tr> 00573 <tr><td> 00574 00575 <TT>maskIter(i1, SomeAccessor())</TT> 00576 </td><td> 00577 create argument object containing given iterator and 00578 accessor (for mask image) 00579 00580 </td></tr> 00581 <tr><td> 00582 00583 <TT>destIterRange(i1, i2)</TT> 00584 </td><td> 00585 create argument object containing the given iterators and 00586 corresponding default accessor (for destination image) 00587 00588 </td></tr> 00589 <tr><td> 00590 00591 <TT>destIterRange(i1, i2, SomeAccessor())</TT> 00592 </td><td> 00593 create argument object containing given iterators and 00594 accessor (for destination image) 00595 00596 </td></tr> 00597 <tr><td> 00598 00599 <TT>destIter(i1)</TT> 00600 </td><td> 00601 create argument object containing the given iterator and 00602 corresponding default accessor (for destination image) 00603 00604 </td></tr> 00605 <tr><td> 00606 00607 <TT>destIter(i1, SomeAccessor())</TT> 00608 </td><td> 00609 create argument object containing given iterator and 00610 accessor (for destination image) 00611 00612 </td></tr> 00613 </table> 00614 */ 00615 00616 template <class Iterator, class Accessor> 00617 inline triple<Iterator, Iterator, Accessor> 00618 srcIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a) 00619 { 00620 return triple<Iterator, Iterator, Accessor>(upperleft, lowerright, a); 00621 } 00622 00623 template <class Iterator, class Accessor> 00624 inline pair<Iterator, Accessor> 00625 srcIter(Iterator const & upperleft, Accessor a) 00626 { 00627 return pair<Iterator, Accessor>(upperleft, a); 00628 } 00629 00630 template <class Iterator, class Accessor> 00631 inline pair<Iterator, Accessor> 00632 maskIter(Iterator const & upperleft, Accessor a) 00633 { 00634 return pair<Iterator, Accessor>(upperleft, a); 00635 } 00636 00637 template <class Iterator, class Accessor> 00638 inline pair<Iterator, Accessor> 00639 destIter(Iterator const & upperleft, Accessor a) 00640 { 00641 return pair<Iterator, Accessor>(upperleft, a); 00642 } 00643 00644 00645 template <class Iterator, class Accessor> 00646 inline triple<Iterator, Iterator, Accessor> 00647 destIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a) 00648 { 00649 return triple<Iterator, Iterator, Accessor>(upperleft, lowerright, a); 00650 } 00651 00652 template <class Iterator> 00653 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor> 00654 srcIter(Iterator const & upperleft) 00655 { 00656 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>( 00657 upperleft, 00658 typename IteratorTraits<Iterator>::DefaultAccessor()); 00659 } 00660 00661 template <class Iterator> 00662 inline triple<Iterator, Iterator, typename IteratorTraits<Iterator>::DefaultAccessor> 00663 srcIterRange(Iterator const & upperleft, Iterator const & lowerright) 00664 { 00665 return triple<Iterator, Iterator, 00666 typename IteratorTraits<Iterator>::DefaultAccessor>( 00667 upperleft, lowerright, 00668 typename IteratorTraits<Iterator>::DefaultAccessor()); 00669 } 00670 00671 template <class Iterator> 00672 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor> 00673 maskIter(Iterator const & upperleft) 00674 { 00675 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>( 00676 upperleft, 00677 typename IteratorTraits<Iterator>::DefaultAccessor()); 00678 } 00679 00680 template <class Iterator> 00681 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor> 00682 destIter(Iterator const & upperleft) 00683 { 00684 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>( 00685 upperleft, 00686 typename IteratorTraits<Iterator>::DefaultAccessor()); 00687 } 00688 00689 template <class Iterator> 00690 inline triple<Iterator, Iterator, typename IteratorTraits<Iterator>::DefaultAccessor> 00691 destIterRange(Iterator const & upperleft, Iterator const & lowerright) 00692 { 00693 return triple<Iterator, Iterator, 00694 typename IteratorTraits<Iterator>::DefaultAccessor>( 00695 upperleft, lowerright, 00696 typename IteratorTraits<Iterator>::DefaultAccessor()); 00697 } 00698 00699 } // namespace vigra 00700 00701 #endif // VIGRA_ITERATORTRAITS_HXX
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|