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

MsrMeasureFunction

Measurement measure function

WARNING: this documentation page is outdated!

SYNOPSIS

#include "dip_measurement.h"

dip_Error (*dip_MsrLineMsrFunction) ( measurement, featureID, label,intensity, size, objectID, dim, iterations )

dip_Error (*dip_MsrImageMsrFunction) ( measurement, featureID, label, intensity, objectID, iterations )

dip_Error (*dip_MsrChainCodeMsrFunction) ( measurement, featureID, objectID, chaincode, iterations )

dip_Error (*dip_MsrCompositeMsrFunction) ( measurement, featureID, objectID, composite, iterations )

FUNCTION

The union dip_MsrMeasureFunction contains the following elements:

   dip_MsrLineMsrFunction      line;
   dip_MsrImageMsrFunction     image;
   dip_MsrChainCodeMsrFunction chaincode;
   dip_MsrCompositeMsrFunction composite;

The measure function is the function that performs the actual measurement. It The four different measurement functions line, image, chaincode and composite differ in the way the object label, shape and intensity information is provided.

The line measure function obtains two arrays (label and intensity) with label and intensity information of the to be measured objects. The line measurement function is called for every (X-) line in the image. Since label can contain more than one different labels, line itself is responsible for storing the measurement results for the appropriate object (using, for example, MsrObjectData). The object ID array label can contain values that are not present in objectID. These labels should be ignored.

The image measurement function is meant for measurement operation that need neighborhood or global object shape information for its operation (e.g. the MsrSurfaceArea function needs to evaluate the 6 connected neighborhood of each boundary voxel). The object ID image label can contain values that are not present in objectID. These labels should be ignored.

The chaincode measure function is meant for 2-D measurement functions that only require information on the shape of the object's contour, e.g. MsrPerimeter. The chaincode function is called for each object seperately, with the contour of that object stored in chaincode.

The composite measure function is meant for measurement function that derive their measurement function from the results of other measurement functions. The measurement functions this function is based on is obtained by calling the MsrComposeFunction callback function. The composite measure function obtains the results of these measurements through its composite function parameter (type: dip_Measurement). The composite function is therefore able to obtain these measurement results (e.g. by using dip_MeasurementObjectValue).

ARGUMENTS

The argumenents of these functions are:

line:

Data typeNameDescription
dip_MeasurementmeasurementMeasurement data structure
dip_intfeatureIDMeasurement function ID
dip_sint32 *labelPointer to a list (image line) of object IDs
dip_float *intensityPointer to a list of corresponding intensity values
dip_intsizeSize of the label and intensity list
dip_IntegerArrayobjectIDArray of objectIDs to be measured
dip_intdimDimension of the line, see ScanFrameWork
dip_intiterationsNumber of iterations the measure function needs to scan the data

image:

Data typeNameDescription
dip_MeasurementmeasurementMeasurement data structure
dip_intfeatureIDMeasurement function ID
dip_ImagelabelImage with pixel intensities represending object IDs
dip_ImageintensityImage containing corresponding intensity values
dip_IntegerArrayobjectIDArray of objectIDs to be measured
dip_intiterationsNumber of iterations the measure function needs to scan the data

chaincode:

Data typeNameDescription
dip_MeasurementmeasurementMeasurement data structure
dip_intfeatureIDMeasurement function ID
dip_intobjectIDID of the object to be measured
dip_ChainCodechaincodeChaincode data structure encoding the object's contour
dip_intiterationsNumber of iterations the measure function needs to scan the data

composite:

Data typeNameDescription
dip_MeasurementmeasurementMeasurement data structure
dip_intfeatureIDMeasurement function ID
dip_intobjectIDID of the object to be measured
dip_MeasurementcompositeMeasurement structure containing the measurement data this function is based on
dip_intiterationsNumber of iterations the measure function needs to scan the data

SEE ALSO

dip_MsrRegistry structure MeasurementFeatureRegister, MsrCreateFunction, MsrValueFunction, MsrConvertFunction, MsrDescriptionFunction, MsrComposeFunction

DIPlib on-line documentation | Function reference | Global function index