Feret2d
This attribute manages two-dimensional measurements belonging to the Feret category of native measurements.
The two-dimensional measurements of the Feret category are customizable with the following methods.
The two-dimensional measurements of the Feret category are customizable with the following methods.
Syntax
Method | Description |
---|---|
void setOrientationCount( uint64_t number ) | Sets the number of Feret angles and updates the angle distribution. |
uint64_t orientationCount() const | Returns the number of Feret angles. |
void setOrientation( uint64_t index, float angle ) | Sets a new angle in degrees, between 0 and 360, at the index position of the Feret distribution. |
float orientation( uint64_t index ) | Returns the angle value in degrees at the index position in the distribution. |
void resample() | Recomputes the orientations from the current number of angles in order to have a uniform distribution around a half circle. |
Feret2d::Ptr feret2d = MeasurementAttributes::feret2d(); feret2d->setOrientationCount( 5 ); int orientationNumberValue = feret2d->orientationCount(); feret2d->setOrientation( 4, 30 ); float orientationValue = feret2d->orientation( 4 ); feret2d->resample(); orientationValue =feret2d->orientation( 4 );