ImageDev

NeighborCount

This attribute defines the neighborhood of a particles with the NeighborCount measurement.

The NeighborCount measurement, available in the Geometry category, is customizable with the following methods.

Syntax

Method Description
void setCalibrated( bool calibrated ) Makes the maximum distance interpreted in world units (true) or in voxel units (false).
bool isCalibrated() Returns true if the maximum distance is expressed in world units, false it is in voxel units.
void setMaxDistance( float distance ) Sets the maximum distance from the object boundaries to consider potential neighbors.
float maxDistance() Returns the maximum distance from the object boundaries to consider potential neighbors.
void setMinOverlap( float overlap ) Sets the minimum particle volume percentage included in the spherical neighborhood to select a potential neighbor.
float minOverlap() Returns the minimum particle volume percentage included in the spherical neighborhood to select a potential neighbor.

NeighborCount::Ptr neighborCount = MeasurementAttributes::neighborCount();
neighborCount->setCalibrated( true );
bool isCalibrated = neighborCount->isCalibrated();
neighborCount->setMaxDistance( 200 );
float maxDistanceValue = neighborCount->maxDistance();
neighborCount->setMinOverlap( 5 );
float minDistanceValue = neighborCount->minOverlap();