Analyze and Interfile
IDeALab at UC Davis presents: http://neuroscience.ucdavis.edu/idealab/software/utilities.php
We have a suite of fairly comprehensive tools for use with analyze, interfile and our own in-house file format. In each of these file formats, a brain image is represented by a small header file, to store relevant image parameters, and a large image file, storing the voxel intensities. The file formats of these three examples differ only in the formatting of the header files.
Header File Manipulation
Interfile headers are ascii files that can be directly edited. Analyze format headers, however, are binary files which need tools to access and change their fields. In addition, analyze header files suffer from problems of endian-ness, meaning that an analyze header file created on a SPARC workstation, for example, will be unreadable on a PC unless the bytes are swapped in a particular order depending on the field. Finally, we must be able to convert between header formats, reading the data stored in one format and writing out in another.We have a single utility chg_hdr to address these problems.
Usage: chg_hdr filename actionwhere "filename" is most commonly the complete name (including extension .h01 or .hdr) of the image header file (the accompanying image file must be present in the current directory).
input filename: name of input volume or header
reads header in one format and writes corresponding header in second format
action action to take
====== ==============
if2ana interfile to analyze
---------------------
create analyze ".hdr" file from ".h01" file
ana2if analyze to interfile
---------------------
create interfile ".h01" file from ".hdr" file
swapAna swap bytes in analyze header
---------------------
swap analyze ".hdr" file
editAna edit analyze header
---------------------
edit analyze ".hdr" file
createAna create analyze header
---------------------
create analyze ".hdr" file from command-line input
In the two image formats used (analyze and interfile), the storage is exactly the same: row major order in a slice, ordered by slices. So the image file is a single dimension array with entries equal to the number of voxels in the image. The header file is used to parse it by providing, among other things, the row, column and slice dimensions.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home