readAnalyze
Synopsis
The readAnalyze user macro reads Mayo Analyze data files and outputs
a uniform field representing the volume of data.
Parameters
The following lists all of the parameters used by the readAnalyze user macro.
| Name |
Type |
Description |
UI Control |
|
| filename_in |
string |
name of Analyze file to read |
Filename text box |
|
Output Ports
| Name |
Type |
Description |
|
| out_fld |
uniform field |
read 3D volume |
| out_obj |
DataObject |
directly renderable output object |
|
Description
The readAnalyze macro reads a set of Mayo Analyze files and outputs a
uniform field representing the data. The Analyze file format consists of
at least two file. For the image named foo the files need by this
module are foo.hdr and foo.img. This module reads the
foo.hdr file and prints all the information from the header to
the standard output. It then uses this information to read in the file
foo.img and converts it into the appropriate uniform field.
The output field is stretched in the z axis to account for the
difference in the interslice resolution. The module performs byte
swapping as appropriate so that it works correctly on little and big
endian platforms. Volumes containing RGB or Complex data cannot be dealt
with.
Parameters
filename_in
The name of the file that should be read from. This parameter is of type
string and can be specified through either a text-box or a file browser.
If the file is not valid then module should correctly detect this and
report the error that has occured.
Output Ports
out_fld
The most primitive output field of the readAnalyze macro. This contains
the generated 3D volume in the form of a uniform field. The field has
node data of the type specified in the Analyze header file. The
resultant field data is automatically stretched in the z axis to account
for the difference in the interslice distance. This scaling should
normally be correct. However it can be changed by altering the
out_points array in the field object.
out_obj
The directly renderable output field of the readAnalyze macro. This
contains a DataObject object that can be rendered by the standard data
viewers. The DataObject is generated directly from the field data
created from the Analyze image file.
Utility Macros
The User Macro readAnalyze uses the low-level module ReadAnalyzeFile. It
also makes use of the ReadAnalyzeUI UI macro.
Example
An example application ReadAnalyzeEg is provided that reads a set of
Analyze files and renders three orthoslices through the volume. A sample
set of Analyze files, head.hdr and head.img, are provided with the
distribution of this module.
Files
iac_proj/rd_anlyz/rdanmacs.v contains the readAnalyze User Macro, the
ReadAnalyzeUI UI Macro, and the example application ReadAnalyzeEg V definitions.
Other Notes
The ReadAnalyzeMacs library inherits its process. As this library contains
no procedural code, the process is not important.
The ReadAnalyzeFile module was designed to work on a 32-bit system. In
particular it assumes that the short variable type is 16 bits long, the
int and float variable types are 32 bits long and the double variable
type is 64 bits long. If this is not the case then it is unlikely that
the data will be read correctly. Correcting this problem will require
alterations to the rd_anlyz.c source code file.
Information for this module was obtained from David Clunies Medical Image
File Format web site, it can currently be accessed from:
http://idt.net/~dclunie/medical-image-faq/html/index.html
Analyze is the file format of the software produced by the Biomedical
Imageing Resource Group at the Mayo Clinic/Foundation.
http://www.mayo.edu/bir/
Authors
Joanna Leng
Modifications
Andrew Dodd
Contact
International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL
See Also
readAnalyze, ReadAnalyzeUI and ReadAnalyzeEg
|