[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

initimage.hxx
1/************************************************************************/
2/* */
3/* Copyright 1998-2002 by Ullrich Koethe */
4/* */
5/* This file is part of the VIGRA computer vision library. */
6/* The VIGRA Website is */
7/* http://hci.iwr.uni-heidelberg.de/vigra/ */
8/* Please direct questions, bug reports, and contributions to */
9/* ullrich.koethe@iwr.uni-heidelberg.de or */
10/* vigra@informatik.uni-hamburg.de */
11/* */
12/* Permission is hereby granted, free of charge, to any person */
13/* obtaining a copy of this software and associated documentation */
14/* files (the "Software"), to deal in the Software without */
15/* restriction, including without limitation the rights to use, */
16/* copy, modify, merge, publish, distribute, sublicense, and/or */
17/* sell copies of the Software, and to permit persons to whom the */
18/* Software is furnished to do so, subject to the following */
19/* conditions: */
20/* */
21/* The above copyright notice and this permission notice shall be */
22/* included in all copies or substantial portions of the */
23/* Software. */
24/* */
25/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */
26/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */
27/* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */
28/* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */
29/* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */
30/* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */
31/* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */
32/* OTHER DEALINGS IN THE SOFTWARE. */
33/* */
34/************************************************************************/
35
36
37#ifndef VIGRA_INITIMAGE_HXX
38#define VIGRA_INITIMAGE_HXX
39
40#include "utilities.hxx"
41#include "iteratortraits.hxx"
42#include "functortraits.hxx"
43#include "multi_shape.hxx"
44
45namespace vigra {
46
47/** \addtogroup InitAlgo Algorithms to Initialize Images
48
49 Init images or image borders
50*/
51//@{
52
53/********************************************************/
54/* */
55/* initLine */
56/* */
57/********************************************************/
58
59template <class DestIterator, class DestAccessor, class VALUETYPE>
60inline void
61initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest,
62 VALUETYPE const & v, VigraFalseType)
63{
64 for(; d != dend; ++d)
65 dest.set(v, d);
66}
67
68template <class DestIterator, class DestAccessor, class FUNCTOR>
69inline void
70initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest,
71 FUNCTOR const & f, VigraTrueType)
72{
73 for(; d != dend; ++d)
74 dest.set(f(), d);
75}
76
77template <class DestIterator, class DestAccessor, class VALUETYPE>
78inline void
79initLine(DestIterator d, DestIterator dend, DestAccessor dest,
80 VALUETYPE const & v)
81{
82 initLineImpl(d, dend, dest, v, typename FunctorTraits<VALUETYPE>::isInitializer());
83}
84
85template <class DestIterator, class DestAccessor, class FUNCTOR>
86inline void
87initLineFunctor(DestIterator d, DestIterator dend, DestAccessor dest,
88 FUNCTOR & f)
89{
90 for(; d != dend; ++d)
91 dest.set(f(), d);
92}
93
94template <class DestIterator, class DestAccessor,
95 class MaskIterator, class MaskAccessor,
96 class VALUETYPE>
97inline void
98initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest,
99 MaskIterator m, MaskAccessor mask,
100 VALUETYPE const & v, VigraFalseType)
101{
102 for(; d != dend; ++d, ++m)
103 if(mask(m))
104 dest.set(v, d);
105}
106
107template <class DestIterator, class DestAccessor,
108 class MaskIterator, class MaskAccessor,
109 class FUNCTOR>
110inline void
111initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest,
112 MaskIterator m, MaskAccessor mask,
113 FUNCTOR const & f, VigraTrueType)
114{
115 for(; d != dend; ++d, ++m)
116 if(mask(m))
117 dest.set(f(), d);
118}
119
120template <class DestIterator, class DestAccessor,
121 class MaskIterator, class MaskAccessor,
122 class VALUETYPE>
123inline void
124initLineIf(DestIterator d, DestIterator dend, DestAccessor dest,
125 MaskIterator m, MaskAccessor mask,
126 VALUETYPE const & v)
127{
128 initLineIfImpl(d, dend, dest, m, mask, v, typename FunctorTraits<VALUETYPE>::isInitializer());
129}
130
131template <class DestIterator, class DestAccessor,
132 class MaskIterator, class MaskAccessor,
133 class FUNCTOR>
134inline void
135initLineFunctorIf(DestIterator d, DestIterator dend, DestAccessor dest,
136 MaskIterator m, MaskAccessor mask,
137 FUNCTOR & f)
138{
139 for(; d != dend; ++d, ++m)
140 if(mask(m))
141 dest.set(f(), d);
142}
143
144/********************************************************/
145/* */
146/* initImage */
147/* */
148/********************************************************/
149
150/** \brief Write a value to every pixel in an image or rectangular ROI.
151
152 This function can be used to init the image.
153
154 The initial value can either be a constant of appropriate type (compatible with
155 the destination's value_type), or a functor with compatible result_type. These two
156 cases are automatically distinguished when <tt>FunctorTraits<FUNCTOR>::isInitializer</tt>
157 yields <tt>VigraTrueType</tt>. Since the functor is passed by <tt>const</tt> reference, its
158 <tt>operator()</tt> must be const, and its internal state may need to be <tt>mutable</tt>.
159
160 Function \ref initMultiArray() implements the same functionality for arbitrary dimensional
161 arrays. In many situations, the assignment functions of \ref vigra::MultiArrayView offer
162 a simpler and more readable alternative to the init functions.
163
164 <b> Declarations:</b>
165
166 pass 2D array views:
167 \code
168 namespace vigra {
169 template <class T, class S, class VALUETYPE>
170 void
171 initImage(MultiArrayView<2, T, S> img, VALUETYPE const & v);
172
173 template <class T, class S, class FUNCTOR>
174 void
175 initImage(MultiArrayView<2, T, S> img, FUNCTOR const & v);
176 }
177 \endcode
178
179 \deprecatedAPI{initImage}
180 pass \ref ImageIterators and \ref DataAccessors :
181 \code
182 namespace vigra {
183 template <class ImageIterator, class Accessor, class VALUETYPE>
184 void initImage(ImageIterator upperleft, ImageIterator lowerright,
185 Accessor a, VALUETYPE const & v);
186
187 template <class ImageIterator, class Accessor, class FUNCTOR>
188 void initImage(ImageIterator upperleft, ImageIterator lowerright,
189 Accessor a, FUNCTOR const & v);
190 }
191 \endcode
192 use argument objects in conjunction with \ref ArgumentObjectFactories :
193 \code
194 namespace vigra {
195 template <class ImageIterator, class Accessor, class VALUETYPE>
196 void initImage(triple<ImageIterator, ImageIterator, Accessor> img, VALUETYPE const & v);
197
198 template <class ImageIterator, class Accessor, class FUNCTOR>
199 void initImage(triple<ImageIterator, ImageIterator, Accessor> img, FUNCTOR const & v);
200 }
201 \endcode
202 \deprecatedEnd
203
204 <b> Usage:</b>
205
206 <b>\#include</b> <vigra/initimage.hxx><br>
207 Namespace: vigra
208
209 Initialize with a constant:
210 \code
211 MultiArray<2, unsigned char> img(100, 100);
212
213 // init the image with the value 128
214 initImage(img, 128);
215
216 // init the interior with the value 1
217 initImage(img.subarray(Shape2(10), Shape2(-10)), 1);
218
219 // equivalent to
220 img = 128;
221 img.init(128);
222 img.subarray(Shape2(10), Shape2(-10)) = 1;
223 \endcode
224
225 Initialize with a functor:
226 \code
227 struct Counter {
228 Counter() : count(0) {}
229
230 int operator()() const { return count++; }
231
232 mutable int count;
233 };
234
235 MultiArray<2, int> img(100, 100);
236
237 // write the current count in every pixel
238 initImage(img, Counter());
239
240 // equivalent to
241 #include <vigra/algorithm.hxx>
242
243 linearSequence(img.begin(), img.end());
244 \endcode
245
246 \deprecatedUsage{initImage}
247 \code
248 vigra::BImage img(100, 100);
249
250 // init the image with the value 128
251 vigra::initImage(destImageRange(img), 128);
252
253 // Initialize with a functor:
254 struct Counter {
255 Counter() : count(0) {}
256
257 int operator()() const { return count++; }
258
259 mutable int count;
260 };
261
262 // write the current count in every pixel
263 vigra::initImage(destImageRange(img), Counter());
264 \endcode
265 <b> Required Interface:</b>
266 \code
267 ImageIterator upperleft, lowerright;
268 ImageIterator::row_iterator ix = upperleft.rowIterator();
269
270 Accessor accessor;
271 VALUETYPE v;
272
273 accessor.set(v, ix);
274 \endcode
275 \deprecatedEnd
276*/
277doxygen_overloaded_function(template <...> void initImage)
278
279template <class ImageIterator, class Accessor, class VALUETYPE>
280void
281initImage(ImageIterator upperleft, ImageIterator lowerright,
282 Accessor a, VALUETYPE const & v)
283{
284 int w = lowerright.x - upperleft.x;
285
286 for(; upperleft.y < lowerright.y; ++upperleft.y)
287 {
288 initLineImpl(upperleft.rowIterator(), upperleft.rowIterator() + w, a,
289 v, typename FunctorTraits<VALUETYPE>::isInitializer());
290 }
291}
292
293template <class ImageIterator, class Accessor, class VALUETYPE>
294inline void
295initImage(triple<ImageIterator, ImageIterator, Accessor> img, VALUETYPE const & v)
296{
297 initImage(img.first, img.second, img.third, v);
298}
299
300template <class T, class S, class VALUETYPE>
301inline void
302initImage(MultiArrayView<2, T, S> img, VALUETYPE const & v)
303{
304 initImage(destImageRange(img), v);
305}
306
307/********************************************************/
308/* */
309/* initImageWithFunctor */
310/* */
311/********************************************************/
312
313/** \brief Write the result of a functor call to every pixel in an image or rectangular ROI.
314
315 This function can be used to init the image by calling the given
316 functor for each pixel. The functor is
317 passed by reference, so that its internal state can be updated in each call.
318
319 <b> Declarations:</b>
320
321 pass 2D array views:
322 \code
323 namespace vigra {
324 template <class T, class S, class FUNCTOR>
325 void
326 initImageWithFunctor(MultiArrayView<2, T, S> img, FUNCTOR & f);
327 }
328 \endcode
329
330 \deprecatedAPI{initImageWithFunctor}
331 pass \ref ImageIterators and \ref DataAccessors :
332 \code
333 namespace vigra {
334 template <class ImageIterator, class Accessor, class FUNCTOR>
335 void
336 initImageWithFunctor(ImageIterator upperleft, ImageIterator lowerright,
337 Accessor a, FUNCTOR & f);
338 }
339 \endcode
340 use argument objects in conjunction with \ref ArgumentObjectFactories :
341 \code
342 namespace vigra {
343 template <class ImageIterator, class Accessor, class FUNCTOR>
344 void
345 initImageWithFunctor(triple<ImageIterator, ImageIterator, Accessor> img, FUNCTOR & f);
346 }
347 \endcode
348 \deprecatedEnd
349
350 <b> Usage:</b>
351
352 <b>\#include</b> <vigra/initimage.hxx><br>
353 Namespace: vigra
354
355 \code
356 struct Counter {
357 Counter() : count(0) {}
358
359 int operator()() const { return count++; }
360
361 int count;
362 };
363
364 MultiArray<2, int> img(100, 100);
365
366 // write the current count in every pixel
367 Counter counter;
368 initImageWithFunctor(img, counter);
369
370 // equivalent to
371 #include <vigra/algorithm.hxx>
372
373 linearSequence(img.begin(), img.end());
374 \endcode
375
376 \deprecatedUsage{initImageWithFunctor}
377 \code
378 struct Counter {
379 Counter() : count(0) {}
380
381 int operator()() const { return count++; }
382
383 mutable int count;
384 };
385
386 vigra::IImage img(100, 100);
387
388 // write the current count in every pixel
389 Counter counter;
390 vigra::initImageWithFunctor(destImageRange(img), counter);
391 \endcode
392 <b> Required Interface:</b>
393 \code
394 ImageIterator upperleft, lowerright;
395 ImageIterator::row_iterator ix = upperleft.rowIterator();
396
397 Accessor accessor;
398 Functor f;
399
400 accessor.set(f(), ix);
401 \endcode
402 \deprecatedEnd
403*/
404doxygen_overloaded_function(template <...> void initImageWithFunctor)
405
406template <class ImageIterator, class Accessor, class FUNCTOR>
407void
409 Accessor a, FUNCTOR & f)
410{
411 int w = lowerright.x - upperleft.x;
412
413 for(; upperleft.y < lowerright.y; ++upperleft.y)
414 {
415 initLineFunctor(upperleft.rowIterator(), upperleft.rowIterator() + w, a, f);
416 }
417}
418
419template <class ImageIterator, class Accessor, class FUNCTOR>
420inline void
421initImageWithFunctor(triple<ImageIterator, ImageIterator, Accessor> img, FUNCTOR & f)
422{
423 initImageWithFunctor(img.first, img.second, img.third, f);
424}
425
426template <class T, class S, class FUNCTOR>
427inline void
428initImageWithFunctor(MultiArrayView<2, T, S> img, FUNCTOR & f)
429{
430 initImageWithFunctor(destImageRange(img), f);
431}
432
433/********************************************************/
434/* */
435/* initImageIf */
436/* */
437/********************************************************/
438
439/** \brief Write value to pixel in the image if mask is true.
440
441 This function can be used to init a region-of-interest of the image.
442
443 The initial value can either be a constant of appropriate type (compatible with
444 the destination's value_type), or a functor with compatible result_type. These two
445 cases are automatically distinguished when <tt>FunctorTraits<FUNCTOR>::isInitializer</tt>
446 yields <tt>VigraTrueType</tt>. Since the functor is passed by <tt>const</tt> reference, its
447 <tt>operator()</tt> must be const, and its internal state may need to be <tt>mutable</tt>.
448
449 <b> Declarations:</b>
450
451 pass 2D array views:
452 \code
453 namespace vigra {
454 template <class T, class S,
455 class TM, class SM,
456 class VALUETYPE>
457 void
458 initImageIf(MultiArrayView<2, T, S> img,
459 MultiArrayView<2, TM, SM> const & mask,
460 VALUETYPE const & v);
461
462 template <class T, class S,
463 class TM, class SM,
464 class FUNCTOR>
465 void
466 initImageIf(MultiArrayView<2, T, S> img,
467 MultiArrayView<2, TM, SM> const & mask,
468 FUNCTOR const & v);
469 }
470 \endcode
471 \deprecatedAPI{initImageIf}
472 pass \ref ImageIterators and \ref DataAccessors :
473 \code
474 namespace vigra {
475 template <class ImageIterator, class Accessor,
476 class MaskImageIterator, class MaskAccessor,
477 class VALUETYPE>
478 void initImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
479 MaskImageIterator mask_upperleft, MaskAccessor ma,
480 VALUETYPE const & v);
481
482 template <class ImageIterator, class Accessor,
483 class MaskImageIterator, class MaskAccessor,
484 class FUNCTOR>
485 void initImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
486 MaskImageIterator mask_upperleft, MaskAccessor ma,
487 FUNCTOR const & v);
488 }
489 \endcode
490 use argument objects in conjunction with \ref ArgumentObjectFactories :
491 \code
492 namespace vigra {
493 template <class ImageIterator, class Accessor,
494 class MaskImageIterator, class MaskAccessor,
495 class VALUETYPE>
496 void initImageIf(triple<ImageIterator, ImageIterator, Accessor> img,
497 pair<MaskImageIterator, MaskAccessor> mask,
498 VALUETYPE const & v);
499
500 template <class ImageIterator, class Accessor,
501 class MaskImageIterator, class MaskAccessor,
502 class FUNCTOR>
503 void initImageIf(triple<ImageIterator, ImageIterator, Accessor> img,
504 pair<MaskImageIterator, MaskAccessor> mask,
505 FUNCTOR const & v);
506 }
507 \endcode
508 \deprecatedEnd
509
510 <b> Usage:</b>
511
512 <b>\#include</b> <vigra/initimage.hxx><br>
513 Namespace: vigra
514
515 \code
516 MultiArray<2, RGBValue<unsigned char> > img(100, 100),
517 MultiArray<2, unsigned char> mask(100, 100);
518 ... // init the ROI mask
519
520 // set the ROI to one
521 initImageIf(img, mask,
522 NumericTraits<RGBValue<unsigned char> >::one());
523 \endcode
524
525 \deprecatedUsage{initImageIf}
526 \code
527 vigra::BImage img(100, 100);
528 vigra::BImage mask(100, 100);
529
530 // zero the ROI
531 vigra::initImageIf(destImageRange(img),
532 maskImage(mask),
533 vigra::NumericTraits<vigra::BImage::PixelType>::zero());
534 \endcode
535 <b> Required Interface:</b>
536 \code
537 ImageIterator upperleft, lowerright;
538 MaskImageIterator mask_upperleft;
539 ImageIterator::row_iterator ix = upperleft.rowIterator();
540 MaskImageIterator::row_iterator mx = mask_upperleft.rowIterator();
541
542 Accessor accessor;
543 MaskAccessor mask_accessor;
544 VALUETYPE v;
545
546 if(mask_accessor(mx)) accessor.set(v, ix);
547 \endcode
548 \deprecatedEnd
549*/
550doxygen_overloaded_function(template <...> void initImageIf)
551
552template <class ImageIterator, class Accessor,
553 class MaskImageIterator, class MaskAccessor,
554 class VALUETYPE>
555void
556initImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
557 MaskImageIterator mask_upperleft, MaskAccessor ma,
558 VALUETYPE const & v)
559{
560 int w = lowerright.x - upperleft.x;
561
562 for(; upperleft.y < lowerright.y; ++upperleft.y, ++mask_upperleft.y)
563 {
564 initLineIfImpl(upperleft.rowIterator(),
565 upperleft.rowIterator() + w, a,
566 mask_upperleft.rowIterator(), ma,
567 v, typename FunctorTraits<VALUETYPE>::isInitializer());
568 }
569}
570
571template <class ImageIterator, class Accessor,
572 class MaskImageIterator, class MaskAccessor,
573 class VALUETYPE>
574inline void
575initImageIf(triple<ImageIterator, ImageIterator, Accessor> img,
576 pair<MaskImageIterator, MaskAccessor> mask,
577 VALUETYPE const & v)
578{
579 initImageIf(img.first, img.second, img.third, mask.first, mask.second, v);
580}
581
582template <class T, class S,
583 class TM, class SM,
584 class VALUETYPE>
585inline void
586initImageIf(MultiArrayView<2, T, S> img,
587 MultiArrayView<2, TM, SM> const & mask,
588 VALUETYPE const & v)
589{
590 vigra_precondition(img.shape() == mask.shape(),
591 "initImageIf(): shape mismatch between input and mask.");
592 initImageIf(destImageRange(img), maskImage(mask), v);
593}
594
595/********************************************************/
596/* */
597/* initImageBorder */
598/* */
599/********************************************************/
600
601/** \brief Write value to the specified border pixels in the image.
602
603 A pixel is initialized if its distance to the border
604 is at most 'borderwidth'.
605
606 The initial value can either be a constant of appropriate type (compatible with
607 the destination's value_type), or a functor with compatible result_type. These two
608 cases are automatically distinguished when <tt>FunctorTraits<FUNCTOR>::isInitializer</tt>
609 yields <tt>VigraTrueType</tt>. Since the functor is passed by <tt>const</tt> reference, its
610 <tt>operator()</tt> must be const, and its internal state may need to be <tt>mutable</tt>.
611
612 <b> Declarations:</b>
613
614 pass 2D array views:
615 \code
616 namespace vigra {
617 template <class T, class S, class VALUETYPE>
618 void
619 initImageBorder(MultiArrayView<2, T, S> img,
620 int border_width, VALUETYPE const & v);
621
622 template <class T, class S, class FUNCTOR>
623 void
624 initImageBorder(MultiArrayView<2, T, S> img,
625 int border_width, FUNCTOR const & v);
626 }
627 \endcode
628
629 \deprecatedAPI{initImageBorder}
630 pass \ref ImageIterators and \ref DataAccessors :
631 \code
632 namespace vigra {
633 template <class ImageIterator, class Accessor, class VALUETYPE>
634 void initImageBorder(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
635 int border_width, VALUETYPE const & v);
636
637 template <class ImageIterator, class Accessor, class FUNCTOR>
638 void initImageBorder(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
639 int border_width, FUNCTOR const & v);
640 }
641 \endcode
642 use argument objects in conjunction with \ref ArgumentObjectFactories :
643 \code
644 namespace vigra {
645 template <class ImageIterator, class Accessor, class VALUETYPE>
646 void initImageBorder(triple<ImageIterator, ImageIterator, Accessor> img,
647 int border_width, VALUETYPE const & v);
648
649 template <class ImageIterator, class Accessor, class FUNCTOR>
650 void initImageBorder(triple<ImageIterator, ImageIterator, Accessor> img,
651 int border_width, FUNCTOR const & v);
652 }
653 \endcode
654 \deprecatedEnd
655
656 <b> Usage:</b>
657
658 <b>\#include</b> <vigra/initimage.hxx><br>
659 Namespace: vigra
660
661 \code
662 #include <vigra/random.hxx>
663
664 MultiArray<2, int> img(100, 100);
665
666 // fill a border of 5 pixels with random numbers
667 initImageBorder(img, 5, MersenneTwister());
668 \endcode
669
670 \deprecatedUsage{initImageBorder}
671 \code
672 vigra::BImage img(100, 100);
673
674 // zero a border of 5 pixel
675 vigra::initImageBorder(destImageRange(img),
676 5, vigra::NumericTraits<vigra::BImage::PixelType>::zero());
677 \endcode
678 <b> Required Interface:</b>
679 <br/>see \ref initImage()
680 \deprecatedEnd
681*/
682doxygen_overloaded_function(template <...> void initImageBorder)
683
684template <class ImageIterator, class Accessor, class VALUETYPE>
685inline
686void
687initImageBorder(ImageIterator upperleft, ImageIterator lowerright,
688 Accessor a, int border_width, VALUETYPE const & v)
689{
690 int w = lowerright.x - upperleft.x;
691 int h = lowerright.y - upperleft.y;
692
693 int hb = (border_width > h) ? h : border_width;
694 int wb = (border_width > w) ? w : border_width;
695
696 initImage(upperleft, upperleft+Diff2D(w,hb), a, v);
697 initImage(upperleft, upperleft+Diff2D(wb,h), a, v);
698 initImage(upperleft+Diff2D(0,h-hb), lowerright, a, v);
699 initImage(upperleft+Diff2D(w-wb,0), lowerright, a, v);
700}
701
702template <class ImageIterator, class Accessor, class VALUETYPE>
703inline void
704initImageBorder(triple<ImageIterator, ImageIterator, Accessor> img,
705 int border_width, VALUETYPE const & v)
706{
707 initImageBorder(img.first, img.second, img.third, border_width, v);
708}
709
710template <class T, class S, class VALUETYPE>
711inline void
712initImageBorder(MultiArrayView<2, T, S> img,
713 int border_width, VALUETYPE const & v)
714{
715 initImageBorder(destImageRange(img), border_width, v);
716}
717
718//@}
719
720
721} // namespace vigra
722
723#endif // VIGRA_INITIMAGE_HXX
Two dimensional difference vector.
Definition diff2d.hxx:186
MoveX x
Definition imageiterator.hxx:660
MoveY y
Definition imageiterator.hxx:673
Standard 2D random access iterator for images that store the data in a linear array.
Definition imageiterator.hxx:851
void initImageIf(...)
Write value to pixel in the image if mask is true.
void initImage(...)
Write a value to every pixel in an image or rectangular ROI.
void initImageWithFunctor(...)
Write the result of a functor call to every pixel in an image or rectangular ROI.
void initImageBorder(...)
Write value to the specified border pixels in the image.

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.12.2