ImageDev

BorderKill

Removes the objects connected to the borders of a segmented image.

Access to parameter description

This command is deprecated, it will be removed in ImageDev 2024.2.
You can use KillBorder instead.

For an introduction: This algorithm removes all the objects touching the borders of the image.
Objects connected to the image borders are identified using a numerical reconstruction from markers made of pixels of the image frame.

<b> Figure 1. </b> Illustration of the BorderKill algorithm
Figure 1. Illustration of the BorderKill algorithm

See also
See related examples

Function Syntax

This function returns outputObjectImage.
// Function prototype
std::shared_ptr< iolink::ImageView > borderKill( std::shared_ptr< iolink::ImageView > inputObjectImage, BorderKill::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputObjectImage = NULL );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputObjectImage
The input binary or label image. Image Binary or Label nullptr
input
neighborhood
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
CONNECTIVITY_6 The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18 The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26 The structuring element is a full cube.
Enumeration CONNECTIVITY_26
output
outputObjectImage
The output binary or label image. Its dimensions and type are forced to the same values as the input. Image nullptr

Object Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

BorderKill borderKillAlgo;
borderKillAlgo.setInputObjectImage( foam_sep );
borderKillAlgo.setNeighborhood( BorderKill::Neighborhood::CONNECTIVITY_26 );
borderKillAlgo.execute();

std::cout << "outputObjectImage:" << borderKillAlgo.outputObjectImage()->toString();

Function Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

auto result = borderKill( foam_sep, BorderKill::Neighborhood::CONNECTIVITY_26 );

std::cout << "outputObjectImage:" << result->toString();