DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

ObjectToMeasurement

Convert object label value to measurement value

SYNOPSIS

#include "dip_measurement.h"

dip_Error dip_ObjectToMeasurement ( object, intensity, out, connectivity, objectID, featureID, measurementDim )

DATA TYPES

objectIm: integer intensityIm: integer, float

FUNCTION

This function produces an output image which pixel intensities are equal to the measurement value that the featureID measurement function measured on the object who label is defined by the pixel intensity of the corresponding pixel in object. This function is therefore useful to select (i.e. threshold) objects on basis of a measurement perfomed on the object. intensity provides pixel intensity information for measurements that require pixel intensity information of the objects, whose shape is defined by object.

The list of object IDs on which the measurements have to be performed is specified by objectID. If it is zero, ObjectToMeasurement will call GetObjectLabels to obtain a list of all non-zero values in objectIm.

If the featureID measurement function produces an array of measurement values, measurementDim will be used to select the desired array element.

ARGUMENTS

Data typeNameDescription
dip_ImageobjectObject label image
dip_ImageintensityObject intensity image
dip_ImageoutOutput image
dip_intconnectivityConnectivity of object's contour pixels, see The connectivity parameter
dip_IntegerArrayobjectIDArray of Object IDs
dip_intfeatureIDMeasurement function ID
dip_intmeasurementDimMeasurement results array index

SEE ALSO

Measure, SmallObjectsRemove, MeasurementToImage, MeasurementToHistogram