imaqSelectParticles

NI Vision for LabWindows/CVI Function

imaqSelectParticles

Usage

ParticleReport* imaqSelectParticles(const Image* image, const ParticleReport* reports, int reportCount, int rejectBorder, const SelectParticleCriteria* criteria, int criteriaCount, int* selectedCount);

Purpose

Filters an array of particle reports based on criteria ranges. Call imaqGetParticleInfo() before calling imaqSelectParticle().

Note  This function is obsolete. Use imaqCountParticles(), imaqParticleFilter2(), and imaqMeasureParticle() to measure particles that fit a certain criteria.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

image const Image* The image from which imaqGetParticleInfo() generated the particle reports.
reports const ParticleReport* The array of reports that imaqGetParticleInfo() returned. The function makes a copy of the reports that match the criteria.
reportCount int The number of reports in the input reports array.
rejectBorder int Set this parameter to TRUE to filter out particles touching the border of the image. Set this parameter to FALSE to process all particles.
criteria const SelectParticleCriteria* The array of criteria for the filter. This parameter is required and cannot be NULL.
criteriaCount int The number of criteria in the criteria array.
selectedCount int* On return, the number of reports that matched the criteria. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

ParticleReport* On success, this function returns an array of the input reports that match the filtration criteria. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of it by calling imaqDispose().