LabelFiltering
Removes objects from a label image based on measurement criteria.
Access to parameter description
For an introduction:
The input filter contains the criteria to preserve objects from the input label image. These criteria are defined by one or several analysis measurements ranges.
If the label input image has a coordinate system unit defined in its calibration property, the filter limit values are expressed in this coordinate system unit.
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Label Filtering
The input filter contains the criteria to preserve objects from the input label image. These criteria are defined by one or several analysis measurements ranges.
If the label input image has a coordinate system unit defined in its calibration property, the filter limit values are expressed in this coordinate system unit.
See also
Function Syntax
This function returns outputLabelImage.
// Function prototype
std::shared_ptr< iolink::ImageView > labelFiltering( std::shared_ptr< iolink::ImageView > inputLabelImage, std::shared_ptr< iolink::ImageView > inputIntensityImage, std::string inputFilter, std::shared_ptr< iolink::ImageView > outputLabelImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputLabelImage |
The label input image. | Image | Label | nullptr |
![]() |
inputIntensityImage |
The intensity input image. If it equals null, the label input image will be used as the intensity input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr |
![]() |
inputFilter |
The input filter formula.
The Label Filtering section details how to create a filter. |
Filter | "" | |
![]() |
outputLabelImage |
The output label image. Its dimensions and type are forced to the same values as the input. | Image | nullptr |
Object Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); LabelFiltering labelFilteringAlgo; labelFilteringAlgo.setInputLabelImage( polystyrene_sep_label ); labelFilteringAlgo.setInputIntensityImage( polystyrene ); labelFilteringAlgo.setInputFilter( "Area>=3000" ); labelFilteringAlgo.execute(); std::cout << "outputLabelImage:" << labelFilteringAlgo.outputLabelImage()->toString();
Function Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = labelFiltering( polystyrene_sep_label, polystyrene, "Area>=3000" ); std::cout << "outputLabelImage:" << result->toString();