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

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

#include <border_treatment.hpp>

Public Member Functions

 AddBorder (const slip::BORDER_TREATMENT border, const std::size_t size=1)
 Initializes the paramaters of the AddBorder functor. More...
 
template<typename _II , typename _OI >
void operator() (_II first, _II last, _OI out_first)
 Adds 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 add border functor: adds 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
Todo:
Compact code using update border
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);
//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());

Definition at line 1132 of file border_treatment.hpp.

Constructor & Destructor Documentation

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

Initializes the paramaters of the AddBorder functor.

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

Definition at line 1138 of file border_treatment.hpp.

Member Function Documentation

template<typename _II , typename _OI >
void slip::AddBorder::operator() ( _II  first,
_II  last,
_OI  out_first 
)
inline

Adds 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.
out_firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
Precondition
first, last and out_first must be of the same iterator_category.

Definition at line 1151 of file border_treatment.hpp.

Member Data Documentation

slip::BORDER_TREATMENT slip::AddBorder::border_

Definition at line 1157 of file border_treatment.hpp.

std::size_t slip::AddBorder::size_

Definition at line 1158 of file border_treatment.hpp.


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