ExpandLabelsOnBackground
Performs an iterative dilation of a label image, until the entire background is filled by labels.
Access to parameter description
For an introduction:
It works with 2D and 3D images.
Figure 1. Example of label expansion on background: (a) input label image,
(b) image after label expansion
See also
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Introduction To Dilation
It works with 2D and 3D images.
![]() (a) |
![]() (b) |
See also
Function Syntax
This function returns outputLabelImage.
// Function prototype
std::shared_ptr< iolink::ImageView > expandLabelsOnBackground( std::shared_ptr< iolink::ImageView > inputLabelImage, ExpandLabelsOnBackground::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputLabelImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputLabelImage |
The input label image. | Image | Label | nullptr | ||||||
![]() |
neighborhood |
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
|
Enumeration | CONNECTIVITY_26 | |||||||
![]() |
outputLabelImage |
The output label image. Its dimensions are forced to the same values as the input image. | Image | nullptr |
Object Examples
auto foam_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep_label.vip" ); ExpandLabelsOnBackground expandLabelsOnBackgroundAlgo; expandLabelsOnBackgroundAlgo.setInputLabelImage( foam_sep_label ); expandLabelsOnBackgroundAlgo.setNeighborhood( ExpandLabelsOnBackground::Neighborhood::CONNECTIVITY_26 ); expandLabelsOnBackgroundAlgo.execute(); std::cout << "outputLabelImage:" << expandLabelsOnBackgroundAlgo.outputLabelImage()->toString();
Function Examples
auto foam_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep_label.vip" ); auto result = expandLabelsOnBackground( foam_sep_label, ExpandLabelsOnBackground::Neighborhood::CONNECTIVITY_26 ); std::cout << "outputLabelImage:" << result->toString();