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

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

#include <vil_border.h>

Public Types

typedef imT::pixel_type pixel_type
 

Public Member Functions

 vil_border ()
 Default constructor, creates a constant border. More...
 
void set_kind (vil_border_mode brdr_kind)
 Set the border kind. More...
 
vil_border_mode kind () const
 Get the current border kind. More...
 
bool is_constant () const
 True if border values are constant. More...
 
const pixel_typeconstant_value () const
 If border kind is vil_border_constant, returns the border value. More...
 
void set_constant_value (const pixel_type &val)
 Set the border value if the border kind is vil_border_constant. More...
 
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. More...
 

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). More...
 
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). More...
 

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 37 of file vil_border.h.

Member Typedef Documentation

◆ pixel_type

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

Definition at line 40 of file vil_border.h.

Constructor & Destructor Documentation

◆ vil_border()

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

Default constructor, creates a constant border.

Definition at line 44 of file vil_border.h.

Member Function Documentation

◆ constant_value()

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 59 of file vil_border.h.

◆ in_border()

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

Definition at line 77 of file vil_border.h.

◆ is_constant()

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

True if border values are constant.

Definition at line 55 of file vil_border.h.

◆ kind()

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

Get the current border kind.

Definition at line 52 of file vil_border.h.

◆ operator()()

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 67 of file vil_border.h.

◆ set_constant_value()

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 62 of file vil_border.h.

◆ set_kind()

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

Set the border kind.

Definition at line 50 of file vil_border.h.

Friends And Related Function Documentation

◆ vil_binary_dilate()

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 22 of file vil_binary_dilate.cxx.

◆ vil_binary_erode()

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 22 of file vil_binary_erode.cxx.

Member Data Documentation

◆ border_kind_

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

Definition at line 111 of file vil_border.h.

◆ constant_value_

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

Definition at line 112 of file vil_border.h.


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