DIPlib Documentation - ©1995-2015 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 type | Name | Description
`dip_Image` | `object` | Object label image
`dip_Image` | `intensity` | Object intensity image
`dip_Image` | `out` | Output image
`dip_int` | `connectivity` | Connectivity of object's contour pixels, see The connectivity parameter
`dip_IntegerArray` | `objectID` | Array of Object IDs
`dip_int` | `featureID` | Measurement function ID
`dip_int` | `measurementDim` | Measurement results array index

## SEE ALSO

`Measure`, `SmallObjectsRemove`, `MeasurementToImage`, `MeasurementToHistogram`