This algorithm computes the regional (or relative) maxima or minima of a grayscale image I and creates a
binary image O containing these extrema.
A regional maximum (resp. minimum) C is a set of connected pixels such that:
Pixels belonging to C have the same intensity IC.
Pixels connected to C, but not belonging to C (neighbors), have an intensity strictly lower
(resp. greater) than IC.
Figure 1. One-dimensional example of a regional maxima detection
Figure 2. One-dimensional example of a regional minima detection
This algorithm uses a recursive method combined with a geodesic propagation.
To avoid getting too many regions in the output image, the input should be smoothed first with a low-pass
filter or with the numerical reconstruction algorithm.
Reference: P. Soille, Morphological Image Analysis. Principles and Applications, Second Edition,
Springer-Verlag, Berlin, pp.201-203, 2003.
// Function prototype.publicstaticIOLink.ImageViewRegionalExtrema3d(IOLink.ImageView inputImage,RegionalExtrema3d.ExtremaType extremaType =ImageDev.RegionalExtrema3d.ExtremaType.MAXIMA,RegionalExtrema3d.Neighborhood neighborhood =ImageDev.RegionalExtrema3d.Neighborhood.CONNECTIVITY_26,IOLink.ImageView outputBinaryImage =null);
Class Syntax
// Command constructor.RegionalExtrema3d();/// Gets the inputImage parameter./// The input grayscale image.
std::shared_ptr< iolink::ImageView> inputImage()const;/// Sets the inputImage parameter./// The input grayscale image.void setInputImage( std::shared_ptr< iolink::ImageView> inputImage );/// Gets the extremaType parameter./// The type of extrema to detect.RegionalExtrema3d::ExtremaType extremaType()const;/// Sets the extremaType parameter./// The type of extrema to detect.void setExtremaType(constRegionalExtrema3d::ExtremaType& extremaType );/// Gets the neighborhood parameter./// The 3D neighborhood configuration.RegionalExtrema3d::Neighborhood neighborhood()const;/// Sets the neighborhood parameter./// The 3D neighborhood configuration.void setNeighborhood(constRegionalExtrema3d::Neighborhood& neighborhood );/// Gets the outputBinaryImage parameter./// The output binary image. Its dimensions are forced to the same values as the input.
std::shared_ptr< iolink::ImageView> outputBinaryImage()const;/// Sets the outputBinaryImage parameter./// The output binary image. Its dimensions are forced to the same values as the input.void setOutputBinaryImage( std::shared_ptr< iolink::ImageView> outputBinaryImage );// Method to launch the command.void execute();
# Property of the inputImage parameter.RegionalExtrema3d.input_image
# Property of the extremaType parameter.RegionalExtrema3d.extrema_type
# Property of the neighborhood parameter.RegionalExtrema3d.neighborhood
# Property of the outputBinaryImage parameter.RegionalExtrema3d.output_binary_image
// Method to launch the command.
execute()
// Command constructor.RegionalExtrema3d()// Property of the inputImage parameter.RegionalExtrema3d.inputImage
// Property of the extremaType parameter.RegionalExtrema3d.extremaType
// Property of the neighborhood parameter.RegionalExtrema3d.neighborhood
// Property of the outputBinaryImage parameter.RegionalExtrema3d.outputBinaryImage
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input grayscale image.
Image
Grayscale
nullptr
extremaType
The type of extrema to detect.
MAXIMA
The regional maxima are extracted from the input image.
MINIMA
The regional minima are extracted from the input image.
Enumeration
MAXIMA
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The neighborhood configuration is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The neighborhood configuration is composed of voxels with at least one common edge.
CONNECTIVITY_26
The neighborhood configuration is a full cube.
Enumeration
CONNECTIVITY_26
outputBinaryImage
The output binary image. Its dimensions are forced to the same values as the input.
Image
nullptr
Parameter Name
Description
Type
Supported Values
Default Value
input_image
The input grayscale image.
image
Grayscale
None
extrema_type
The type of extrema to detect.
MAXIMA
The regional maxima are extracted from the input image.
MINIMA
The regional minima are extracted from the input image.
enumeration
MAXIMA
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The neighborhood configuration is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The neighborhood configuration is composed of voxels with at least one common edge.
CONNECTIVITY_26
The neighborhood configuration is a full cube.
enumeration
CONNECTIVITY_26
output_binary_image
The output binary image. Its dimensions are forced to the same values as the input.
image
None
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input grayscale image.
Image
Grayscale
null
extremaType
The type of extrema to detect.
MAXIMA
The regional maxima are extracted from the input image.
MINIMA
The regional minima are extracted from the input image.
Enumeration
MAXIMA
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The neighborhood configuration is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The neighborhood configuration is composed of voxels with at least one common edge.
CONNECTIVITY_26
The neighborhood configuration is a full cube.
Enumeration
CONNECTIVITY_26
outputBinaryImage
The output binary image. Its dimensions are forced to the same values as the input.