ImageDev

PeakExtractor

Extracts the peaks (that is, the local intensity maxima) of an image using a neighborhood analysis.

Access to parameter description

This command is experimental, his signature may be modified between now and his final version.

For an introduction: section Image Correlation.

This algorithm aims to extract the local maxima of a correlation image.

A voxel of the input image is considered as a local maximum if: See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
PeakExtractorMsr::Ptr peakExtractor( std::shared_ptr< iolink::ImageView > inputImage, uint32_t numberOfPeaks, double threshold, const iolink::Vector3u32& radius, PeakExtractor::Method method, PeakExtractorMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
peak_extractor(input_image: idt.ImageType,
               number_of_peaks: int = 0,
               threshold: float = 0.5,
               radius: Iterable[int] = [10, 10, 10],
               method: PeakExtractor.Method = PeakExtractor.Method.FAST,
               output_measurement: Union[Any, None] = None) -> PeakExtractorMsr
This function returns outputMeasurement.
// Function prototype.
public static PeakExtractorMsr
PeakExtractor( IOLink.ImageView inputImage,
               UInt32 numberOfPeaks = 0,
               double threshold = 0.5,
               uint[] radius = null,
               PeakExtractor.Method method = ImageDev.PeakExtractor.Method.FAST,
               PeakExtractorMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image from which the peaks must be extracted. Image Binary, Label or Grayscale nullptr
input
numberOfPeaks
The maximum number of peaks to extract. If this value is set to 0, all peaks having an intensity greater than or equal to the threshold vaue are detected. UInt32 Any value 0
input
threshold
The threshold value that determines the minimal intensity of a selected peak. Float64 Any value 0.5
input
method
The method for extracting the peaks.
FAST Rough extraction of local maxima.
Enumeration FAST
input
radius
The minimum distance between two extracted peaks in pixels, along the X, Y, and Z directions Vector3u32 Any value {10, 10, 10}
output
outputMeasurement
The result object containing the maxima positions and their associated intensity. PeakExtractorMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image from which the peaks must be extracted. image Binary, Label or Grayscale None
input
number_of_peaks
The maximum number of peaks to extract. If this value is set to 0, all peaks having an intensity greater than or equal to the threshold vaue are detected. uint32 Any value 0
input
threshold
The threshold value that determines the minimal intensity of a selected peak. float64 Any value 0.5
input
method
The method for extracting the peaks.
FAST Rough extraction of local maxima.
enumeration FAST
input
radius
The minimum distance between two extracted peaks in pixels, along the X, Y, and Z directions vector3u32 Any value [10, 10, 10]
output
output_measurement
The result object containing the maxima positions and their associated intensity. PeakExtractorMsr None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image from which the peaks must be extracted. Image Binary, Label or Grayscale null
input
numberOfPeaks
The maximum number of peaks to extract. If this value is set to 0, all peaks having an intensity greater than or equal to the threshold vaue are detected. UInt32 Any value 0
input
threshold
The threshold value that determines the minimal intensity of a selected peak. Float64 Any value 0.5
input
method
The method for extracting the peaks.
FAST Rough extraction of local maxima.
Enumeration FAST
input
radius
The minimum distance between two extracted peaks in pixels, along the X, Y, and Z directions Vector3u32 Any value {10, 10, 10}
output
outputMeasurement
The result object containing the maxima positions and their associated intensity. PeakExtractorMsr null

Object Examples

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

PeakExtractor peakExtractorAlgo;
peakExtractorAlgo.setInputImage( fibers_score );
peakExtractorAlgo.setNumberOfPeaks( 0 );
peakExtractorAlgo.setThreshold( 4000 );
peakExtractorAlgo.setRadius( {15, 15, 15} );
peakExtractorAlgo.setMethod( PeakExtractor::Method::FAST );
peakExtractorAlgo.execute();

std::cout << "positionX: " << peakExtractorAlgo.outputMeasurement()->positionX( 0 ) ;
fibers_score = imagedev.read_vip_image(imagedev_data.get_image_path("fibers_score.vip"))

peak_extractor_algo = imagedev.PeakExtractor()
peak_extractor_algo.input_image = fibers_score
peak_extractor_algo.number_of_peaks = 0
peak_extractor_algo.threshold = 4000
peak_extractor_algo.radius = [15, 15, 15]
peak_extractor_algo.method = imagedev.PeakExtractor.FAST
peak_extractor_algo.execute()

print("positionX: ", str(peak_extractor_algo.output_measurement.position_x(0)))
ImageView fibers_score = Data.ReadVipImage( @"Data/images/fibers_score.vip" );

PeakExtractor peakExtractorAlgo = new PeakExtractor
{
    inputImage = fibers_score,
    numberOfPeaks = 0,
    threshold = 4000,
    radius = new uint[]{15, 15, 15},
    method = PeakExtractor.Method.FAST
};
peakExtractorAlgo.Execute();

Console.WriteLine( "positionX: " + peakExtractorAlgo.outputMeasurement.positionX( 0 ) );

Function Examples

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

auto result = peakExtractor( fibers_score, 0, 4000, {15, 15, 15}, PeakExtractor::Method::FAST );

std::cout << "positionX: " << result->positionX( 0 ) ;
fibers_score = imagedev.read_vip_image(imagedev_data.get_image_path("fibers_score.vip"))

result = imagedev.peak_extractor(fibers_score, 0, 4000, [15, 15, 15], imagedev.PeakExtractor.FAST)

print("positionX: ", str(result.position_x(0)))
ImageView fibers_score = Data.ReadVipImage( @"Data/images/fibers_score.vip" );

PeakExtractorMsr result = Processing.PeakExtractor( fibers_score, 0, 4000, new uint[]{15, 15, 15}, PeakExtractor.Method.FAST );

Console.WriteLine(  "positionX: " + result.positionX( 0 )  );





© 2025 Thermo Fisher Scientific Inc. All rights reserved.