Functions
core/vil/vil_fill.h File Reference

Various functions for manipulating image views. More...

#include <vcl_cassert.h>
#include <vil/vil_image_view.h>
#include <vcl_algorithm.h>

Go to the source code of this file.

Functions

template<class T >
void vil_fill (vil_image_view< T > &view, T value)
 Fill view with given value.
template<class T >
void vil_fill_line (T *data, unsigned n, vcl_ptrdiff_t step, T value)
 Fill data[i*step] (i=0..n-1) with given value.
template<class T >
void vil_fill_line (vil_image_view< T > &im, int ai, int aj, int bi, int bj, T value)
 Fill line from (ai,aj) to (bi,bj) using Bresenham's algorithm.
template<class T >
void vil_fill_row (vil_image_view< T > &view, unsigned j, T value)
 Fill row j in view with given value.
template<class T >
void vil_fill_col (vil_image_view< T > &view, unsigned i, T value)
 Fill column i in view with given value.
template<class srcT >
void vil_fill_mask (vil_image_view< srcT > &image, const vil_image_view< bool > &mask, srcT value, bool b=true)
 Writes given value into each pixel of image under the elements of the mask set to b.
template<class T >
void vil_fill_disk (vil_image_view< T > &image, double ci, double cj, double r, T value)
 Fills pixels in disk with centre (ci,cj), radius r, with given value.

Detailed Description

Various functions for manipulating image views.

Author:
Tim Cootes - Manchester

Definition in file vil_fill.h.


Function Documentation

template<class T >
void vil_fill ( vil_image_view< T > &  view,
value 
)

Fill view with given value.

O(size).

Definition at line 17 of file vil_fill.h.

template<class T >
void vil_fill_col ( vil_image_view< T > &  view,
unsigned  i,
value 
)

Fill column i in view with given value.

O(nj).

Definition at line 145 of file vil_fill.h.

template<class T >
void vil_fill_disk ( vil_image_view< T > &  image,
double  ci,
double  cj,
double  r,
value 
) [inline]

Fills pixels in disk with centre (ci,cj), radius r, with given value.

Fills all planes of image with the value.

Definition at line 198 of file vil_fill.h.

template<class T >
void vil_fill_line ( T *  data,
unsigned  n,
vcl_ptrdiff_t  step,
value 
)

Fill data[i*step] (i=0..n-1) with given value.

See also:
vil_fill_line(vil_image_view<T>)

Definition at line 44 of file vil_fill.h.

template<class T >
void vil_fill_line ( vil_image_view< T > &  im,
int  ai,
int  aj,
int  bi,
int  bj,
value 
)

Fill line from (ai,aj) to (bi,bj) using Bresenham's algorithm.

Only modifies first plane.

Definition at line 55 of file vil_fill.h.

template<class srcT >
void vil_fill_mask ( vil_image_view< srcT > &  image,
const vil_image_view< bool > &  mask,
srcT  value,
bool  b = true 
) [inline]

Writes given value into each pixel of image under the elements of the mask set to b.

If mask.nplanes()==1 then the same mask is applied to every image plane, otherwise there must be the same number of mask planes as image planes.

Definition at line 162 of file vil_fill.h.

template<class T >
void vil_fill_row ( vil_image_view< T > &  view,
unsigned  j,
value 
)

Fill row j in view with given value.

O(ni).

Definition at line 130 of file vil_fill.h.