Appendix A: MRC to AnalyzeThis appendix will describe the process of converting MRC files into Analyze files. Two methods of accomplishing this are presented: one for individual files, the second for batch conversions of multiple files. In this appendix, AnalyzeAVW refers to AnalyzeAVW version 2.5 (also known as AnalyzePC 2.5 on Windows NT systems). Analyze (without the AVW) refers to Analyze 7.5, the now outdated version of Analyze that saved files using the filename.hdr and filename.img extensions. Note the difference in nomenclature from the rest of this technical report. This page uses the sample dataset glurigor.mrc, available as hyperlinked. This help page also makes use of several Suprim programs for analyzing and converting the files. Suprim is available for AIX and IRIX systems from http://www.itg.uiuc.edu/resources/suprim/. Converting Individual MRC FilesIt is assumed that the MRC file has a 1024 byte header at the top of the file containing information about the dimensions and type of data contained.
Batch Conversion To Analyze FormatMRC files can be converted into Analyze 7.5 format (e.g. glurigor.hdr, glurigor.img) using a combination of scripts, Analyze "extras", and Suprim programs. See the Suprim homepage for information about how to obtain Suprim. The Analyze program make_hdr was distributed with the Analyze 7.5 distribution and is not available for download from the ITG website. Contact the Biomedical Imaging Resource directly for further information about purchasing a copy. The PERL script mrc2an may be downloaded from this website, but is already installed on all ITG systems. If downloading to another system, edit the mrc2an file changing the following lines:
Once installed, type mrc2an at the command line, adding the -b option if the dataset must be converted from floating point to bytes, followed by a list of MRC file names in order to begin the conversion process: sgi> mrc2an -b -d glurigor.mrc
Converting glurigor.mrc into /var/tmp/aaaa000xz byte format.
/usr/local/bin/ftob < glurigor.mrc | \
/usr/local/bin/tomrc > /var/tmp/aaaa000xz
Converting /var/tmp/aaaa000xz to glurigor.{hdr,img}
DIMS: 73 101 101
MIN: 0.000000
MAX: 255.000000
MODE: CHAR
/usr/local/bin/hcut < /var/tmp/aaaa000xz \
2> /dev/null > glurigor.img
/usr/local/bin/make_hdr glurigor.hdr 73 101 101 \
1 CHAR 255.000000 0.000000
mrc2an converted the file glurigor.mrc to glurigor.img and glurigor.hdr, suitable for reading into Analyze 7.5 or AnalyzeAVW. It pulled the dimensions, minimum and maximum values, and data type from the MRC file, and stored that information into the Analyze header. The -d option simply turned on debugging information. For more information on the mrc2an script, read the manpage either online here, or by installing the nroff source and typing man mrc2an at the command prompt. Batch Conversion to AnalyzeAVW FormatBatch conversion from the MRC format directly into the AVW format is still being worked on. In the meantime, use the conversion program mrc2an described in the previous section to convert the data to Analyze 7.5 format. AnalyzeAVW will read Analyze 7.5 data files. |
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||