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

Measure

Measure object features

SYNOPSIS

#include "dip_measurement.h"

dip_Error dip_Measure ( measurement, featureID, featureParams, objectID, objectIm, intensityIm, connectivity, physDims )

DATA TYPES

objectIm: integer

intensityIm: integer, float

FUNCTION

The Measure function is the top-level function of DIPlib's measurement library. This function performs measurements of the objects in the specified objectIm image. The measurements to be performed are specified by the featureID array of measurement function IDs. If featureParams is non-zero, its size should equal that of featureID. Although the current implementation of Measure does not make use of this argument, future versions will pass the data pointers of the featureParams to the corresponding measurement functions. featureParams should be set to zero for now.

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

The state of measurement should be raw (see MeasurementNew), since Measure will forge the measurement data structure by calling MeasurementForge.

The intensityIm image defines the pixel intensity of the objects, whose shape is defined by objectIm. If none of the measurements specified in featureID require the grey-value image, it can be set to NULL.

The physDims parameter defines the physical dimensions of the pixel sizes and pixel intensity. See PhysicalDimensionsNew for more information.

ARGUMENTS

Data typeNameDescription
dip_MeasurementmeasurementMeasurement data structure
dip_IntegerArrayfeatureIDArray of measurement function IDs
dip_VoidPointerArrayfeatureParams (0)Set to zero
dip_IntegerArrayobjectID (0)Array of Object IDs
dip_ImageobjectImImage containing object IDs, i.e. object labels
dip_ImageintensityImIntensity image
dip_intconnectivityConnectivity of object's contour pixels, see The connectivity parameter
dip_PhysicalDimensionsphysDimsStructure specifying the physical dimensions of the image pixels

SEE ALSO

Label, ObjectToMeasurement, MeasurementToImage, MeasurementToHistogram, MeasurementWrite, MeasurementNew, MeasurementFree, MeasurementIsValid

FeatureAnisotropy2D, FeatureBendingEnergy, FeatureCenter, FeatureChainCodeBendingEnergy, FeatureConvexArea, FeatureConvexPerimeter, FeatureConvexity, FeatureDimension, FeatureExcessKurtosis, FeatureFeret, FeatureGinertia, FeatureGmu, FeatureGravity, FeatureInertia, FeatureLongestChaincodeRun, FeatureMass, FeatureMaxVal, FeatureMaximum, FeatureMean, FeatureMinVal, FeatureMinimum, FeatureMu, FeatureOrientation2D, FeatureP2A, FeaturePerimeter, FeatureRadius, FeatureShape, FeatureSize, FeatureSkewness, FeatureStdDev, FeatureSum, FeatureSurfaceArea