ReadAnalyzeFile
Synopsis
Reads a Mayo Analyze file and outputs a uniform field representing the
data.
module ReadAnalyzeFile {
string filename_in<NEportLevels={2,0}>;
Mesh_Unif+Node_Data out<NEportLevels={1,2}>;
omethod+notify_inst+req update<src_file="rd_anlyz.c">(
filename_in+read+notify+req, out+write
) = "read_analyze_update";
};
Description
The ReadAnalyseFile module reads Mayo Analyze files and outputs a
uniform field for the data contained in the file. 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.
Input
&filename_in
The name of the header file that should be initially read from. This
parameter is of type string. If the file is not valid then module should
correctly detect this and report the error that has occured.
Outputs
out
The uniform field that represents the data read from the Analyze file.
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.
Utility Macros
The low-level ReadAnalyzeFile module is used in the User Macro readAnalyze.
This module can be used directly in applications. The readAnalyze macro also
uses 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_anlyze/rdanmods.v contains the ReadAnalyzeFile module
V definition.
Other Notes
The low-level ReadAnalyzeMods library containing the module
ReadAnalyzeFile does not specify a process. By default the express
process will be used.
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
Manchester Visualization Centre
Modifications
Andrew Dodd
Manchester Visualization Centre
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
|