Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Related Functions
vil_border< imT > Class Template Reference

Border class. Makes pixel access outside image range transparent and configurable. More...

#include <vil_border.h>

List of all members.

Public Types

typedef imT::pixel_type pixel_type

Public Member Functions

 vil_border ()
 Default constructor, creates a constant border.
void set_kind (vil_border_mode brdr_kind)
 Set the border kind.
vil_border_mode kind () const
 Get the current border kind.
bool is_constant () const
 True if border values are constant.
const pixel_typeconstant_value () const
 If border kind is vil_border_constant, returns the border value.
void set_constant_value (const pixel_type &val)
 Set the border value if the border kind is vil_border_constant.
const pixel_typeoperator() (const imT &im, int i, int j, int p=0) const
 Return read-only reference to pixel at (i,j,p) on the given image.

Protected Member Functions

const pixel_typein_border (const imT &im, int i, int j, int p=0) const

Private Attributes

vil_border_mode border_kind_
pixel_type constant_value_

Related Functions

(Note that these are not member functions.)

void vil_binary_dilate (const vil_image_view< bool > &src_image, vil_image_view< bool > &dest_image, const vil_structuring_element &element, const vil_border< vil_image_view< bool > > &border)
 Dilates src_image to produce dest_image (assumed single plane).
void vil_binary_erode (const vil_image_view< bool > &src_image, vil_image_view< bool > &dest_image, const vil_structuring_element &element, const vil_border< vil_image_view< bool > > &border)
 Erodes src_image to produce dest_image (assumed single plane).

Detailed Description

template<class imT>
class vil_border< imT >

Border class. Makes pixel access outside image range transparent and configurable.

Note that a border is not assigned to a specific image, but only holds border properties.

Definition at line 39 of file vil_border.h.


Member Typedef Documentation

template<class imT>
typedef imT::pixel_type vil_border< imT >::pixel_type

Definition at line 42 of file vil_border.h.


Constructor & Destructor Documentation

template<class imT>
vil_border< imT >::vil_border ( ) [inline]

Default constructor, creates a constant border.

Definition at line 46 of file vil_border.h.


Member Function Documentation

template<class imT>
const pixel_type& vil_border< imT >::constant_value ( ) const [inline]

If border kind is vil_border_constant, returns the border value.

Definition at line 61 of file vil_border.h.

template<class imT>
const pixel_type& vil_border< imT >::in_border ( const imT &  im,
int  i,
int  j,
int  p = 0 
) const [inline, protected]

Definition at line 79 of file vil_border.h.

template<class imT>
bool vil_border< imT >::is_constant ( ) const [inline]

True if border values are constant.

Definition at line 57 of file vil_border.h.

template<class imT>
vil_border_mode vil_border< imT >::kind ( ) const [inline]

Get the current border kind.

Definition at line 54 of file vil_border.h.

template<class imT>
const pixel_type& vil_border< imT >::operator() ( const imT &  im,
int  i,
int  j,
int  p = 0 
) const [inline]

Return read-only reference to pixel at (i,j,p) on the given image.

If the pixel falls out of the image range, the border value is returned.

Definition at line 69 of file vil_border.h.

template<class imT>
void vil_border< imT >::set_constant_value ( const pixel_type val) [inline]

Set the border value if the border kind is vil_border_constant.

Definition at line 64 of file vil_border.h.

template<class imT>
void vil_border< imT >::set_kind ( vil_border_mode  brdr_kind) [inline]

Set the border kind.

Definition at line 52 of file vil_border.h.


Friends And Related Function Documentation

template<class imT>
void vil_binary_dilate ( const vil_image_view< bool > &  src_image,
vil_image_view< bool > &  dest_image,
const vil_structuring_element element,
const vil_border< vil_image_view< bool > > &  border 
) [related]

Dilates src_image to produce dest_image (assumed single plane).

Definition at line 19 of file vil_binary_dilate.cxx.

template<class imT>
void vil_binary_erode ( const vil_image_view< bool > &  src_image,
vil_image_view< bool > &  dest_image,
const vil_structuring_element element,
const vil_border< vil_image_view< bool > > &  border 
) [related]

Erodes src_image to produce dest_image (assumed single plane).

Definition at line 19 of file vil_binary_erode.cxx.


Member Data Documentation

template<class imT>
vil_border_mode vil_border< imT >::border_kind_ [private]

Definition at line 113 of file vil_border.h.

template<class imT>
pixel_type vil_border< imT >::constant_value_ [private]

Definition at line 114 of file vil_border.h.


The documentation for this class was generated from the following files: