Image formats descriptions

From MIPAV
Jump to: navigation, search

Adobe Photoshop (PSD) files

PSD is a bitmap file format created by Adobe. It can accommodate images with an unlimited amount of colors. PSD files are not multiple image files; the maximum image size is 30K x 30K pixels or voxels. PSD files are generally used to store images that were altered or manipulated by the Adobe Photoshop software. The header is embedded in the file and is 26 bytes in length. It contains information such as the height and width of the image and the color mode.

Analyze files

Analyze formatted files are generated by a UNIX-based, image-processing application developed at the Mayo Clinic. In support of some NIH intramural researchers who have used Analyze in the past and have generated a large number of legacy datasets, MIPAV reads and writes Analyze formatted images.


An image file in Analyze format contains uncompressed voxel data for the images in one of several possible voxel formats:

1 bit packed binary (slices begin on byte boundaries)

8 bit unsigned char (grayscale unless .lkup file is present)

16 bit signed short

32 bit signed integers or float

24 bit RGB, 8 bits per channel

The header file is a C structure that describes the dimensions and properties of the voxel data.

Analyze images are formed from the following files:

Header file - This file (extension .HDR) describes the image type, size, and other important image attributes. For example, brain.hdr is the header file that describes the image file.

File Containing the Actual Image Data - This file (extension .IMG) can be interpreted as a raw file since it does not have any header information within the file. For example, brain.img is the file that contains the image data.

A color lookup file is sometimes included in the file set - A LKUP extension indicates a lookup table file. Example: file.lkup.

All files from the file set have the same name and are distinguished by the extensions HDR for the header file, IMG for image file and LKUP for lookup table file. MIPAV stores files in Analyze format in the catalog you specified in the Save Image as dialog box.

Note: MIPAV could save images with *.img extension either in Analyze format or in NIFTI format. To save an image in Analyze format, call the File > Save Image as menu, and then type the file name with *.img extension. In the Choose Type of File to Write dialog box that appears, specify the file format (Analyze). Check the option Always save .img files in Analyze format, if you want MIPAV to save .img files only in that format.


For more information about Analyze file format, please refer to the ANALYZE 7.5. format document from the Mayo Clinic.

AFNI

The HEAD file for an AFNI dataset is in ASCII, so you can view it with a normal text editor (e.g., Notepad). The data within are organized into attributes, which are named arrays of floats, integers, or characters (strings). A sample float attribute is shown in Table 2. This array defines the voxel array dimensions. An example of a character array attribute is shown in Table 3.

Table 2. Voxel array dimensions

type = integer-attribute
name = DATASET_DIMENSIONS
count = 5
256 256 124 0 0

Table 3. A character array attribute

type = string-attribute
name = IDCODE_DATE
count = 25
'Mon Apr 15 13:08:36 1996~

Note that the data for a string attribute starts with a single apostrophe (') character, and that the number of bytes is given by the count parameter. The ASCII NUL character is replaced by the tilde ~ so that the HEAD file can be edited manually, if need be. On input, tildes will be replaced with NULs.

The dataset reading code requires a minimal set of attributes to be able to decipher a dataset; for example, the DATASET_DIMENSIONS attribute above is required. There are also some attributes that are not mandatory for a dataset to be successfully constructed from a HEAD file; for example, the IDCODE_DATE attribute above is not required. Attributes that AFNI doesn't know how to deal with are ignored. This makes it possible for a program to tuck extra information into the HEAD file and not cause a trouble.

A BRIK file contains nothing but voxel values. If a dataset has 1 sub-brick, which is 100x100x100 voxels, and the values stored are shorts (2 bytes each), then the BRIK file will have exactly 2,000,000 bytes. All the formatting information is stored in the HEAD file.

Audio Video Interleave (AVI) files

AVI is the Microsoft Video for Windows standard. AVI is a form of the Resource Interchange File Format (RIFF). In this file format, video and audio data are stored consecutively in an AVI file. The AVI file contains a 4-byte file header, followed by list information and then alternating video and audio streams.

BIORAD

Each Biorad confocal image file consists of three parts. They are 1) a 76 byte header which contains information such as the number of images in the file and how large each section is, 2) the images themselves and 3) notes after the images. Each set of BIORAD images from one set of raw data, is stored in a separate folder with the name provided. Within that folder is a subfolder named /Raw Data/ where the files are stored. A single image file is called raw.pic. In the multiple probe Z or T series, the files are named raw01.pic, raw02.pic, etc. There are may be also text files stored in the same folder, which contain information about the imaging parameters used.

Bruker data format

Bruker format stores a single scanning session in its own directory. The directory is named according to the subject name or number, as typed in by the scanner operator. The directory name usually specifies the subject name/number and which session this is for that subject. For more information, refer to <http://imaging.mrc-cbu.cam.ac.uk/imaging/FormatBruker>.

Cheschire (IMG or IMC)

TBD.

Digital Imaging and Communications in Medicine (DICOM) files

The DICOM format is a standard that defines a standard method of communication between two devices, such as computers, servers, or imaging devices. DICOM not only prescribes how to communicate with other imaging equipment and databases but also specifies how images are stored. Each image has accompanying header information describing the image format (i.e., height, width, etc.) as well as information that indirectly relates to the image (i.e., patient information, image equipment setup parameters).


See also: Working with DICOM Images.

FITS

FITS stands for "Flexible Image Transport System" and is the standard astronomical data format endorsed by both NASA and the IAU. FITS is primarily designed to store scientific data sets consisting of multi-dimensional arrays (1-D spectra, 2-D images or 3-D data cubes) and 2-dimensional tables containing rows and columns of data.

For more information about FITS refer to http://heasarc.gsfc.nasa.gov/docs/heasarc/fits.html.

FreeSurfer image and surface files

FreeSurfer uses two main kinds of data. The first one is a volume of voxels, as for example, from an MRI scanner. It provides a source of raw input. The other one is surface data which consist of lists of vertices as well as their positions in space and faces and also vertices associated with them.


For more information, refer to Surface file formats web.

GE - Genesis 5X and LX

The format of the headers is General Electric Genesis described in the [Medical Image Format FAQ]. The image header contains the table position and field of view. This is important information, because the spacing between the slices and the pixel size changes several times throughout the data set.

The slices are named as follows: c_vmxxxx.fre where xxxx is the location in mm's of the slice. There are 522 slices in the fresh CT data set, which requires ~ 274 megabytes of disk storage.

See also:

Graphics Interchange Format (GIF) files

The Graphics Interchange Format (GIF) is a bitmap file format that was created by CompuServe, Inc. GIF is primarily an exchange and storage file format; GIFs can be used to store one or several bitmap images in one file. GIFs support pixel or voxel depths of 1 to 8 bits. The maximum image size is 64K x 64K pixel or voxels. There are two major revisions of the GIF format specification: GIF87a and GIF89a. Both formats begin with a 6-byte header that identifies the file format as GIF.

ICS (Image Cytometry Standard)

The Image Cytometry Standard (ICS) is a digital multidimensional image file format used in life sciences microscopy. It stores the image data and the microscopic parameters describing the optics during the acquisition. The newest ICS2 file format uses a single ICS file with both the header and the data together.

The ICS format is capable to store: multidimensional and multichannel data images in 8, 16 or 32 bit integer, 32 or 64 bit floating point, floating point complex data, and all microscopic parameters directly relevant to the image formation free-form comments.

For more information, refer to http://en.wikipedia.org/wiki/Image_Cytometry_Standard.

Joint Photographic Experts Group (JPEG/JFIF) files

The JPEG File Interchange Format (JFIF) allows files containing JPEG-encoded data streams to be exchanged. Technically, JPEG refers to the compression type and the Joint Photographic Experts Group standards organization. However, the term JPEG is usually used to indicate the file format. JPEG file formats are bitmap files that are primarily used in image and graphics manipulation programs. Created by C-Cube Microsystems, the JPEG or JFIF file format does not accommodate multiple images per file and the maximum image size allowed is 64K by 64K pixel or voxels. JPEG files can accommodate 24-bit color images. Generally, JPEG header information appears between the Start of Image (SOI) and Application (APP0) markers.

Laser Scanning Microscope (Zeiss)

Laser Scanning Microscope (LSM) is a line of laser point scanning microscopes produced by Carl Zeiss LLC. The new LSM 700/710/780 series were released after 2008, thus making the 5th generation, including the LSM 510, LSM 5 Pascal, and LSM 5 Live obsolete.

LSM models use file format with the filename extension ".lsm". Particular format specification depends on the microscope model, but all are essentially extensions of the TIFF multiple image stack file format, containing instrument specific hardware settings metadata and thumbnail images.

For format details, refer to http://en.wikipedia.org/wiki/LSM_(Zeiss).

Legacy VTK

The legacy VTK file format is a surface format that consist of five basic parts:

  1. The file version and identifier, it contains the single line: # vtk DataFile Version x.x. This line must be exactly as shown with the exception of the version number x.x, which will vary with different releases of VTK.
  2. Note: the current version number is 3.0. Version 1.0 and 2.0 files are compatible with version 3.0 files.

  3. The header, it consists of a character string terminated by end-of-line character \n. The header is 256 characters maximum. The header can be used to describe the data and include any other pertinent information.
  4. The file format, which describes the type of file, either ASCII or binary. On this line the single word ASCII or BINARY must appear. 4 The dataset structure that can have the geometry section and actual data. The geometry section describes the geometry and topology of the dataset. This part begins with a line containing the keyword DATASET followed by a keyword describing the type of dataset. Then, depending upon the type of dataset, other keyword/data combinations define the actual data.
  5. The dataset attributes. It begins with the keywords POINT_DATA or CELL_DATA, followed by an integer number specifying the number of points or cells, respectively. Other keyword/data combinations then define the actual dataset attribute values (i.e., scalars, vectors, tensors, normals, texture coordinates, or field data).

For more information about VTK file formats, refer to VTK file formats.

LIFF

Layered Image File Format is a file format used in the Openlab suite for microscope image processing. It is a proprietary format, but has an open, extensible form analogous to TIFF. It was specifically designed to contain a large number of high resolution images, and also all of the meta data generated by analysis of such images.

For more information, refer to OpenLab web site.

Macintosh PICT

The Macintosh PICT (Macintosh Picture) format is format for the Macintosh. It also known as PICT, Macintosh Picture, or QuickDraw Picture Format. All Macintosh PICT files start with a 512-byte header, which contains information that the Macintosh uses to keep track of the file. This is followed by three fields describing the image size (picSize), the image frame (picFrame), and a version number. For more information, refer to the Macintosh PICT File Format Summary page at <http://www.fileformat.info/format/macpict/egff.htm>.

Medical Image NetCDF (MINC) files

MINC is a medical-imaging file format that is based on the Network Common Data Form (NetCDF) file format. NetCDF is a platform-independent software interface that provides a means for storing named, multidimensional variables. Each multidimensional variable is defined by a name, dimensions, and attributes. For example, cardio (name) [256, 256] (dimensions), and "long_name" where this attribute is a string that describes the content of the image. MINC provides a standard for dimension, variable, and attribute names suitable for medical imaging. MINC also provides convenience functions to complement the NetCDF interface and convenience functions for using MINC files.

For more information, refer to the MINC web page.

Medical Research Council (MRC)

The MRC file format is a file format for electron density. It is an industry standard for Cryo-electron microscopy where the result of the technique is a three-dimensional grid of voxels each with a value corresponding to density of electrons. The MRC format is supported by almost every molecular graphics suite that supports volumetric data.

For more information, refer to this doc.

MICRO-CAT

Siemens microCAT image format is designed for its microCAT+SPECT high resolution, high sensitivity, in vivo preclinical imaging system, which allows detect and quantify anatomical and functional changes in animals associated with disease.

For more information refer to: Siemens press release.

Microsoft Windows Bitmap (BMP) files

BMP is a native bitmap format for the Microsoft Windows and OS/2 platforms. Developed by the Microsoft Corporation, it can be read on Intel machines running Microsoft Windows, Windows XP, Windows NT, Windows 95, OS/2, and MS-DOS. It is an uncompressed file format with a maximum image size of 32K x 32K or 2G x 2G pixels or voxels (depending on the version of BMP).br />

Depending on the version of BMP, for OS/2 the maximum image size is larger, 64K x 64K or 4G x 4G pixels or voxels. There are several versions of BMP for Microsoft Windows and OS/2. MIPAV supports Microsoft Window BMP versions 2.x and above and all OS/2 versions of the BMP file format. BMP version 2.x is designed for use with the Microsoft Windows 2.x platform. It has a 14-byte header (as does the OS/2 1.x bitmap header). It can accommodate images with 1-, 4-, 8-, or 24-bit colors. Version 3.x is designed for use with the Microsoft Windows 3.x and Windows NT platforms. Like version 2.x, it contains a 14-byte header. It also contains an additional bitmap header that is 40 bytes in size. The Microsoft Windows 3.x platform version accommodates images with 1-, 4-, 8- or 24-bit colors. Windows NT and Windows XP accommodate 16- and 32-bit images. Version 4.x was designed for use with Microsoft Windows 95. It contains the 14-byte header, and an additional 108-byte bitmap header. It can accommodate images of 1, 4, 8, 16, and 32 bits.

MIPAV (LUT) files

LUT is a vector file format used to store MIPAV Lookup Table ( LUT) data.

MIPAV provides a logical color map, which allows you to remap the original intensities to other intensities. Although technically the term look-up table (LUT) can be used for the physical and logical color maps, in this guide look-up table refers to the logical color map only. You can apply predefined, pseudo color or inverse LUTs, or you can manually manipulate the transfer function used to map the image data to the LUT. The LUT then translates the remapped values so that they can be interpreted by the physical color map and displayed on your monitor.

For a sample LUT file refer to LUT file.

MIPAV (MTX) files

The matrix filedescribes the image's orientation, translations, offset scales, rotations, and shears. When any of this information changes in the image, the identity matrix changes.

For a sample .MTX file refer to Matrix file.

MIPAV (PLT) files

The MIPAV plot file (.PLT) is a vector file that is used to store graphics data. For a sample PLT file refer to Plot file.

MIPAV text file format

MIPAV defined ASCII text surface format. The text surface file records the triangle mesh vertices, normals and connectivity.

Vertices x, y, z // vertex position

Normal

x, y, z // normal coordinate

Connectivity

x, y, z // index connection

See also: MIPAV surface file in text format.

MIPAV (SUR) files

MIPAV supports its own surface format (*.sur). A MIPAV surface file contains the information about the surface area and geometry, plus the additional information that describes the surface color and more. This is defined by an XML scheme, which can be found on the MIPAV web site.

Surface format (Triangle mesh or ClodMesh - Continuous level of details mesh)
Inverse Dicom matrix flag

3D mesh direction x, y, z

Start location x, y, z

Bounding box x, y, z

Inverse Dicom matrix

Vertex quantity

Vertex position x, y, z

Vertex normal x, y, z

Index quantity

Index connectivity x, y, z

Surface material property

Clodmesh collapse record

See also MIPAV Surface files description.

MIPAV (VOI) files

VOI is a vector file format that is used to store volume of interest contouring information. For a sample file refer to [MIPAV_AppCSupportedFormats.html#1249118 "VOI file" on page 603].

MIPAV XML

Refer to MIPAV XML.

MIPAV image schema definition [1]

MIPAV XML surface format

See also MIPAV Image Schema.

MIPAV Image Schema can also be found here.

NIFTI

NifTy-1 is a new Analyze-style data format, proposed by the NIfTI DFWG. NIfTI-1 was adapted from ANALYZE 7.5 file format. See also NIFTI.

It uses the "empty space" in the ANALYZE 7.5 header to add several new features, which are listed below:
Affine coordinate definitions relating voxel index (i,j,k) to spatial location (x,y,z);
Codes to indicate spatio-temporal slice ordering for FMRI;
"Complete" set of 8-128 bit data types;
Standardized way to store vector-valued datasets over 1-4 dimensional domains;
Codes to indicate data "meaning";
A standardized way to add "extension" data to the header;
Dual file (hdr & img) or single file (nii) storage;

For more information, refer to the NIfTI web site at <http://nifti.nimh.nih.gov/>.

PC Paintbrush (PCX) files

PC Paintbrush is a bitmap file format that is used primarily in Microsoft Windows and other Windows-based products. PCX is mainly used as an exchange and storage format. Created by ZSoft and packaged with Microsoft Windows, PCX can accommodate 1-, 4-, 8-, and 24-bit color images. It is uncompressed; the maximum image size is 64K x 64K pixel/voxels. Header information is embedded in the file; the first 128 pixel/voxels in the file contain information such as the PCX ID number, the bits per pixel/voxel, and the palette type.

PICT files

See also Supported file formats - PICT.

Phillips PAR/REC

See also <http://www.dclunie.com/medical-image-faq/html/part8.html>

and MIPAV User Guide, Volume 2, Algorithms "DTI Create List File".

POLY

The common poly file is represented by a printable ASCII file. It contains a number of features combined in three sections: a vertex list, a polygon list, and a surface list.
Each of lists is represented by a sequence of non-empty lines, called a section. The first line of a section is called its title.
The title of a section contains its name optionally followed by the attribute list enclosed in parentheses. Several attributes in the list are separated by . Both the name and the attributes are built only of alphanumeric characters (letters, digits, underscore). By convention, data section names are written in upper case.

Below, is the description of POLY format originally written in 1993 by Pat Flynn and revised 1/96 PJF. For more information refer to:


Vertex list

Each vertex appears on its own line.

The format is `pnt %d: %f %f %f'.

Points are numbered starting at zero. There is no sentinel indicating the end of the points and the beginning of the polygons; your program logic can easily detect it.

Polygon list

Each polygon appears on its own line.

The format is `poly %d: [%d] %d %d %d .... ' The number on the left of the colon is the index of the polygon (numbered from zero). The number inside the [square brackets] is the number of vertices. The remaining numbers are the indices of the vertices. The vertices proceed clockwise around the polygon as you look at it from `outside' the object.

Surface list

The surface list allows to logically group polygons.

The format for a surface entry is:

`surf %d: [%d] %d'
The first number is the index of the surface (numbered from zero). The second number [inside square brackets] is the number of polygons belonging to that surface. The third number is the index of the first polygon in the group.
The polygons grouped into a surface must occupy a contiguous sub-list of the polygon list.

Polygon File Format

Also known as Stanford Triangle Format.
File Structure
Header
Vertex List
Face List
(lists of other elements)


File Format ( ASCII description )
format ascii 1.0 { ascii/binary, format version number }
comment made by Greg Turk { comments keyword specified, like all lines }
element vertex 8 { define "vertex" element, 8 of them in file }
property float x { vertex contains float "x" coordinate }
property float y { y coordinate is also a vertex property }
property float z { z coordinate, too }
element face 6 { there are 6 "face" elements in the file }
property list uchar int vertex_index { "vertex_indices" is a list of ints }
end_header { delimits the end of the header }
0 0 0 { start of vertex list }
0 0 1
0 1 1
0 1 0
1 0 0
1 0 1
1 1 1
1 1 0
3 1 2 3 { start of face list }
3 6 5 4
3 4 5 1
3 5 6 2
3 6 7 3
3 7 4 0

Portable Network Graphic Format (PNG) files

PNG is a bitmap file format that is generally used to transmit and store network image data. The PNG format can store images with up to 16-bits (grayscale) or 48-bits (truecolor) per pixel/voxel. The maximum image size is 2G x 2G pixel/voxels. PNG is a compressed format. Multiple images cannot be stored in PNG. An 8-byte identification signature is followed by a header chunk, which contains basic information about the image data. The header chunk data area is 13 bytes in length.

QuickTime-Apple

The QuickTime file is a container file that contains one or more tracks, where track stores a particular type of data e.g., audio, video, effects, or text. Each track either contains a digitally-encoded media stream (using a specific codec) or a data reference to the media stream located in another file. Tracks are maintained in a hierarchal data structure consisting of objects called atoms. An atom can be a parent to other atoms or it can contain media or edit data, but it cannot do both.

See also: QuickTime-Apple.

Raw data files

MIPAV supports reading and writing Raw image data of all the basic programming types (i.e., boolean, byte, short, etc.). Raw images have no header or a header of known length and unknown content at a fixed location at the beginning of the file. You must specify basic information about the Raw image before it is loaded in MIPAV. When loading a RAW data set, you must specify the image type, dimension and resolution, units, and header offset.

Siemens - Magnetom Vision

Refer to http://www.dclunie.com/medical-image-faq/html/part4.html#MagnetomVision and Siemens - Magnetom Vision.

STL (ASCII and Binary)

Sun Raster (RS) files

RS files is the native bitmap format for Sun Microsystems UNIX platforms that run the SunOS operating system. This format stores bitmap data (color, grayscale, black and white) of any pixel/voxel depth. RS files can be of any size; however, multiple images per file are not supported. The header is embedded in the file; it is 32 bytes in the length and contains typical header information such as the width and height of the image and the type of color map used.

Tag Image File Format (TIFF) files

TIFF is a bitmap file format that is generally used to provide a portable, image-storage mechanism that describes image data. Multiple images can be stored in one file. TIFF files can accommodate a maximum image size of 232 -1 pixel/voxels. It is widely used and is a standard file format used in many desktop publishing, imaging, and paint programs. MIPAV supports most TIFF 6.0 formatted files used commonly in the image research community including 2D and 3D monochrome 8-bit, signed and unsigned 16-bit, and signed 32-bit images. Future support of 24-bit color and compressed images is planned. The TIFF Image File Header (IFH) is 8 bytes in length and contains 3 fields of information. If multiple images are in a file, an IFH is present for each image in the file.

TARGA

Truevision Graphics Adapter (TGA) files

VRML

VTK XML surface

X BitMap (XBM) files

XBM is a monochrome bitmap file format that is used primarily for the storage of icon and cursor bitmaps in X Windows. It was developed by X Consortium. Because this format was developed for small amounts of data, the bitmap images are composed of collections of ASCII data rather than binary data. (XBM bitmap data is often found in C source header files.) Multiple images can be stored on a file; there is no limit to the image size. XBM has no header file, nor is a formal header embedded in the program; rather header information consists of four lines that begin with #define. The four lines of code indicate the height and width of the image and the coordinate of the hotspot (if any).

XML

MIPAV has it's own XML version - MIPAV XML, which is explained in Section [MIPAV_AppCSupportedFormats.html#1260832 "MIPAV XML" on page 571].

XML surface

MIPAV defined XML surface format based on the MIPAV "surface.xsd" and "surfaceref.xsd" file. The XML surface file defines specific variables for reading and writing surface.xml files.
Figure 2. Surfaceref.xsd: surfaceref schema file set the reference to MIPAV .sur file

SurfaceRefXSD.jpg


Surface.xsd: surface schema set the triangle mesh surface attributes in detail.
Figure 3. Surface.xsd: surface schema set the triangle mesh surface attributes in detail

SurfaceXSD.jpg


X PixMap (XPM) files

XPM is a bitmap file format developed by Groupe Bull. It is used primarily to store X Windows pixmap information. XPM can store black and white, grayscale or color image data of unlimited colors. Like XBM, there is no limit for the image size and there can be multiple images per file. In addition, like XBM, XPM is written in ASCII. It can contain a section, <Values>, that contains header information, such as the height and width of the pixmap and the number of characters per pixel or voxel.

See also: