SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
slip::FillBorder Struct Reference

Generic fill border functor: fill border of 1d, 2d or 3d iterator ranges. More...

#include <border_treatment.hpp>

Public Member Functions

 FillBorder ()
 Initializes the paramaters of the FillBorder functor. The size of border size_ is egal to 1. More...
 
 FillBorder (const std::size_t size)
 Initializes the paramaters of the FillBorder functor. More...
 
template<typename _II >
void operator() (_II first, _II last, const typename std::iterator_traits< _II >::value_type &value=typename std::iterator_traits< _II >::value_type())
 Fills the border of the range [first,last) according to the parameters of the functor. More...
 

Public Attributes

std::size_t size_
 

Detailed Description

Generic fill border functor: fill border of 1d, 2d or 3d iterator ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Since
1.0.0
Example:
//read and image
I.read("lena.png");
std::size_t nb_row = I.rows();
std::size_t nb_col = I.cols();
std::size_t b_size = 1;
//Initialize AddBorder parameters
AddBorder b(slip::BORDER_TREATMENT_NEUMANN,b_size);
//Initialize FillBorder parameters
FillBorder fill(slip::BORDER_TREATMENT_NEUMANN,b_size);
//create an enhanced image
slip::GrayscaleImage<double> tmp(nb_row+(2*b_size),nb_col+(2*b_size));
//Adds border
b(I.upper_left(),I.bottom_right(),tmp.upper_left());
for(int n = 0; n < 10; ++n)
{
fill(tmp.upper_left(),tmp.bottom_right());
}

Definition at line 373 of file border_treatment.hpp.

Constructor & Destructor Documentation

slip::FillBorder::FillBorder ( )
inline

Initializes the paramaters of the FillBorder functor. The size of border size_ is egal to 1.

Definition at line 379 of file border_treatment.hpp.

slip::FillBorder::FillBorder ( const std::size_t  size)
inline

Initializes the paramaters of the FillBorder functor.

Parameters
sizeSize of the border.

Definition at line 385 of file border_treatment.hpp.

Member Function Documentation

template<typename _II >
void slip::FillBorder::operator() ( _II  first,
_II  last,
const typename std::iterator_traits< _II >::value_type &  value = typename std::iterator_traits<_II>::value_type() 
)
inline

Fills the border of the range [first,last) according to the parameters of the functor.

Parameters
firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
lastRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
valueThe value to fill the range.
Precondition
first, last must be of the same iterator_category.

Definition at line 397 of file border_treatment.hpp.

Member Data Documentation

std::size_t slip::FillBorder::size_

Definition at line 405 of file border_treatment.hpp.


The documentation for this struct was generated from the following file: