Appendix C - MicroView's support for Raw image data
MicroView reads and writes a variety of 2D and 3D image formats,
summarized in Appendix A above. In particular, the
".nfo" image format is a simple format that can be easily used to import
and export raw images with MicroView. It is a two-file format that
consists of a raw image, contained in a file named something like
rawfile.img
, and a text-based header file with the same base name, but
with a ".nfo" extension (i.e. rawfile.nfo
). Header files are simple
ascii text files, that contain a set of name-value pairs, separated by a
colon, one pair per line of the file.
An example header file is listed below:
width: 336
height: 283
numFrames: 160
shear_angle(rad): 0.000000
xVoxelSize: 0.1
yVoxelSize: 0.1
zVoxelSize: 0.2
dataType: 4
This header file describes a 336x283x160 raw image with voxels that are
0.1mm x 0.1mm x 0.2mm in dimension. The shear_angle(rad)
entry should
be present in the header, but is ignored by MicroView -- it can safely
be set to zero. The dataType
entry defines the numeric type of the
data contained within the raw image file, rawimage.img
. The value
should be selected from the table below:
Image Datatype codes
Function | Description |
---|---|
2 | Signed 8-bit char |
3 | Unsigned 8-bit char |
4 | Signed 16-bit short integer |
5 | Unsigned 16-bit short integer |
8 | Signed long integer |
9 | Unsigned long integer |
10 | Floating-point data |
Given a raw image for import, first rename the file to have an extension of ".img". Determine the image dimensions, voxel size and image format. Using the text editor of your choice, create a corresponding header file with the same base name, but an ".nfo" extension. Copy and edit the entries listed Example 1 into this file, customize to match your image and save. Load MicroView and select the ".nfo" for reading.