DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

FillBoundaryArray

Fill the border of array according to the boundary condition

SYNOPSIS

dip_Error DIP_TPI_FUNC(dip_FillBoundaryArray)( in, out, size, border, boundary )

FUNCTION

Set the values of the border pixels of an array. The pixels of out outside the range of the array in are set to a value determined by the boundary condition and the pixel values of in.

ARGUMENTS

Data typeNameDescription
void *ininput array
void *outoutput array
dip_intsizesize of input array
dip_intbordersize of the extended borders
dip_BoundaryboundaryBoundary conditions

NOTE

The out array has to be allocated before this function is called, and should at least has the size of (size + 2 * border). Thus, border specifies the length of the border on both sides of the in array. Furthermore, the out pointer should point to that element in the out array that corresponds to the first element in the in array:

                       <-        size        ->
input:                 ************************
                       |
                       in

           <- border -><-        size        -><- border ->
output:    ------------************************------------
                       |
                       out

The enumerator dip_boundary contains the following constants:

NameDescription
DIP_BC_SYM_MIRRORSymmetric mirroring
DIP_BC_ASYM_MIRRORAsymmetric mirroring
DIP_BC_PERIODICPeriodic copying
DIP_BC_ASYM_PERIODICAsymmetric periodic copying
DIP_BC_ADD_ZEROSExtending the image with zeros
DIP_BC_ADD_MAX_VALUEExtending the image with +infinity
DIP_BC_ADD_MIN_VALUEExtending the image with -infinity

SEE ALSO

SeparableFrameWork