Image Component Library (ICL)
Static Public Member Functions | List of all members
icl::core::ImgBorder Class Reference

Class to setup an images border pixels. More...

#include <ImgBorder.h>

Static Public Member Functions

template<class T >
static ICLCore_API void fixed (Img< T > *poImage, T *ptVal)
 sets up an images border with a fixed value More...
 
static void copy (ImgBase *poImage)
 sets up an images border by extruding the images ROI pixels towards the image border More...
 
static void fromOther (ImgBase *poImage, ImgBase *poOther)
 copies an images border from another image More...
 

Detailed Description

Class to setup an images border pixels.

Border pixels are all pixels, that are not within the images ROI. The ImgBorder class provides three different strategies to setup these pixels with defined values:

fixed

This strategy sets all pixels to a fixed value, that is given by a 2nd argument to the "fixed"-method. To optimize performace, this function does only allow to set up Img<T>-borders with T-values. Hence it is realized as a template function.

..................        vvvvvvvvvvvvvvvvvv
..+-------------+.        vv...............v
..|.............|.        vv...............v
..|.............|.   -->  vv...............v
..|.............|.        vv...............v
..+-------------+.        vv...............v
..................        vvvvvvvvvvvvvvvvvv

copy

The copy strategy is an analogue to the IPPs "ippCopyReplicateBorder_.." function. It will extrude the images ROI edges towards the images borders.

       ROI                     Img                  Result
..................      .......++++++++##.     .....++++++++#####
..+-------------+.      .....++++++++####.     .....++++++++#####
..|.............|.      ....+++++++######.     ....+++++++#######
..|.............|. -->  ....-------######. --> ....-------#######
..|.............|.      ....-------######.     ....-------#######
..+-------------+.      ....-------####...     ....-------####...
..................      ....-------##.....     ....-------####...

fromOther

The last strategy is to copy the border pixels from another given Img.

Member Function Documentation

◆ copy()

static void icl::core::ImgBorder::copy ( ImgBase poImage)
static

sets up an images border by extruding the images ROI pixels towards the image border

Parameters
poImagedestination image

◆ fixed()

template<class T >
static ICLCore_API void icl::core::ImgBorder::fixed ( Img< T > *  poImage,
T *  ptVal 
)
static

sets up an images border with a fixed value

Parameters
poImagedestination image (with channel count C)
ptValdestination value (for each of the C channels)

◆ fromOther()

static void icl::core::ImgBorder::fromOther ( ImgBase poImage,
ImgBase poOther 
)
static

copies an images border from another image

Parameters
poImagedestination image
poOthersource image for the border data. This image must have the same size and channel count as poImage. The function will print a warning and return immediately without any changings otherwise.

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