ImagineFormat

Read .imagine files in Julia


License
MIT

Documentation

ImagineFormat

Build Status

Imagine is an acquisition program for light sheet microscopy written by Zhongsheng Guo in Tim Holy's lab. This package implements a loader for the file format for the Julia programming language. Each Imagine "file" consists of two parts (as two separate files): a *.imagine file which contains the (ASCII) header, and a *.cam file which contains the camera data. The *.cam file is a raw byte dump, and is compatible with the NRRD "raw" file.

Usage

Read Imagine files like this:

using Images
img = load("filename")

Converting to NRRD

You can write an NRRD header (*.nhdr) from an Imagine header as follows:

h = ImagineFormat.parse_header(filename)  # the .imagine file name
imagine2nrrd(nrrdname, h, [datafilename])

where the optional datafilename is the name of the *.cam file.

Writing Imagine headers

You can use the non-exported function ImagineFormat.save_header:

save_header(destname, srcname, img, [T])

destname is the output *.imagine file; srcname is the name of the "template" file. Certain header values (e.g., size information) are updated by reference to img. The optional argument T allows you to specify a different element type than possessed by img.