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::UpdateBorder Struct Reference

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

#include <border_treatment.hpp>

Public Member Functions

 UpdateBorder (const slip::BORDER_TREATMENT border, const std::size_t size=1)
 Initializes the paramaters of the UpdateBorder functor. More...
 
template<typename _II >
void operator() (_II first, _II last)
 Updates the border of the range [first,last) according to the parameters of the functor. More...
 

Public Attributes

slip::BORDER_TREATMENT border_
 
std::size_t size_
 

Detailed Description

Generic update border functor: update 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 UpdateBorder parameters
UpdateBorder update(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)
{
update(tmp.upper_left(),tmp.bottom_right());
}

Definition at line 741 of file border_treatment.hpp.

Constructor & Destructor Documentation

slip::UpdateBorder::UpdateBorder ( const slip::BORDER_TREATMENT  border,
const std::size_t  size = 1 
)
inline

Initializes the paramaters of the UpdateBorder functor.

Parameters
borderborder condition.
sizeSize of the border (1 by default).

Definition at line 746 of file border_treatment.hpp.

Member Function Documentation

template<typename _II >
void slip::UpdateBorder::operator() ( _II  first,
_II  last 
)
inline

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

Since
1.0.0
Parameters
firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
lastRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
Precondition
first, last must be of the same iterator_category.

Definition at line 758 of file border_treatment.hpp.

Member Data Documentation

slip::BORDER_TREATMENT slip::UpdateBorder::border_

Definition at line 764 of file border_treatment.hpp.

std::size_t slip::UpdateBorder::size_

Definition at line 765 of file border_treatment.hpp.


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