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

# MeasurementRead

Read measurement results from a file

## SYNOPSIS

`#include "dipio_measurement.h"`

dip_Error dipio_MeasurementRead ( measurement, filename, format, addExtensions, recognised )

## FUNCTION

This function reads measurement data from a file and puts it in `measurement`. `measurement` must be allocated before calling this function. If `format` is 0, all different `MeasurementRead` functions are called in sequence until the correct format has been found. If you know the format, get the correct format ID through the registry functions.

The boolean `addExtensions` specifies whether `MeasurementRead` should try to add file format extensions to `filename`, if the registered file format reader fails to recognise `filename` straight away. The extensions are provided by the registered file readers.

If `recognised` is not zero, `MeasurementRead` will set it to `DIP_TRUE` when it has been able to read `filename`, and it will set it to `DIP_FALSE` when it is not able to read the file. No error will be generated in this case.

## NOTE

There are currently no measurement reading functions, so this function will always fail.

## ARGUMENTS

Data type | Name | Description
`dip_Measurement` | `measurement` | Measurement data structure
`dip_String` | `filename` | File name to read from
`dip_int` | `format` | ID of file format
`dip_Boolean` | `addExtensions` | Add extensions when looking for the file
`dip_Boolean *` | `recognised` | Set to `DIP_TRUE` if the file was found

## SEE ALSO

`Measure`, `MeasurementWrite`

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