parse description of ScanImage TIFF file, converting it to key-value list

parse_description(x, raw = FALSE)

Arguments

x

Path to a TIFF file, one or more slices returned by read.scanimage or a raw data block.

raw

Whether to return the raw description field as a single string or when FALSE (the default) to return it is as a list containing parsed R data types.

Value

a named list or, when raw=TRUE, a character vector of length 1.

Details

ScanImage TIFF flies contain a single description field, which is a CR delimited values of the form key=value.

See also

read.scanimage

Examples

desc=parse_description(system.file( 'extdata/Blank-IPA_1s_16r_032.tif',package='scanimage')) desc$state.configName
#> [1] "ajdm_piezo"
# [1] "ajdm_piezo" desc$state.acq.frameRate
#> [1] 8.138021
# [1] 8.138021 (Hz)