This algorithm can be used, for instance, to compute the number of markers contained in each cell of a life
science image, or the number of inclusions in each phase of a material science image.
If the region image is a binary image, it is considered as a single region and the algorithm amounts to
computing the number of objects masked by this image.
If the region image is a label image, the number of objects is given for each label of the region image.
// Function prototype.publicstaticLabelCountByRegionMsrLabelCountByRegion(IOLink.ImageView inputObjectImage,IOLink.ImageView inputLabelImage,LabelCountByRegionMsr outputMeasurement =null);
Class Syntax
// Command constructor.LabelCountByRegion();/// Gets the inputObjectImage parameter./// The input binary or label image representing the regions to be analyzed.
std::shared_ptr< iolink::ImageView> inputObjectImage()const;/// Sets the inputObjectImage parameter./// The input binary or label image representing the regions to be analyzed.void setInputObjectImage( std::shared_ptr< iolink::ImageView> inputObjectImage );/// Gets the inputLabelImage parameter./// The input label image containing the particles to be counted. This image must have same dimensions as the region input image.
std::shared_ptr< iolink::ImageView> inputLabelImage()const;/// Sets the inputLabelImage parameter./// The input label image containing the particles to be counted. This image must have same dimensions as the region input image.void setInputLabelImage( std::shared_ptr< iolink::ImageView> inputLabelImage );/// Gets the outputMeasurement parameter./// The output measurement result providing one count per region.LabelCountByRegionMsr::Ptr outputMeasurement()const;// Method to launch the command.void execute();
# Property of the inputObjectImage parameter.LabelCountByRegion.input_object_image
# Property of the inputLabelImage parameter.LabelCountByRegion.input_label_image
# Property of the outputMeasurement parameter.LabelCountByRegion.output_measurement
// Method to launch the command.
execute()
// Command constructor.LabelCountByRegion()// Property of the inputObjectImage parameter.LabelCountByRegion.inputObjectImage
// Property of the inputLabelImage parameter.LabelCountByRegion.inputLabelImage
// Property of the outputMeasurement parameter.LabelCountByRegion.outputMeasurement
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputObjectImage
The input binary or label image representing the regions to be analyzed.
Image
Binary or Label
nullptr
inputLabelImage
The input label image containing the particles to be counted. This image must have same dimensions as the region input image.
Image
Label
nullptr
outputMeasurement
The output measurement result providing one count per region.