📄 spm image file format.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0052)http://www.mrc-cbu.cam.ac.uk/Imaging/spm_format.html -->
<HTML><HEAD><TITLE>SPM image file format</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR><LINK rev=Made
href="mailto:matthew.brett@mrc-cbu.cam.ac.uk">
<META content="Matthew Brett, matthew.brett@mrc-cbu.cam.ac.uk" name=author>
<META
content="fMRI,MRI,PET,functional,SPM,CBU,imaging,Cambridge,Medical Research Coucil"
name=keywords>
<META content="SPM image file format" name=description></HEAD>
<BODY text=#000000 vLink=#800080 aLink=#ff0000 link=#0000ff bgColor=#ffffff
background="SPM image file format_files/lashley.jpg">
<H1>The SPM / Analyze data format</H1>This page has been copied from the help
system of SPM99 with the kind permission of John Ashburner.
<H2>Image Format</H2>SPM has been written to deal with two or three dimensional
data of any size (either image dimensions or voxel size). The data however
should be organized with a separate file for each scan.
<P>SPM uses the simple header and flat binary image file format of <A
href="http://www.mayo.edu/bir/PDF/ANALYZE75.pdf">ANALYZE-7 (Mayo Clinic,
Rochester, USA</A>), with slight customisations to the header.
<H2>The image file.</H2>*.img: An uninterrupted array of (unsigned integer,
signed short, signed integer, float or double) voxel values. Each *.img usually
has an associated header file that contains information about the image process
in question
<P>The original images which SPM uses can be in any orientation. However, after
spatial normalisation, the images must be in the following orientation:
<P>X increases from Left to Right
<P>Y increases from Posterior to Anterior
<P>Z increases from Inferior to Superior This is a right handed coordinate
system, and is consistent with the Talairach atlas.
<P>In order to sucessfully spatially normalise the images, SPM must be able to
determine the initial orientation of the images. The global variable "sptl_Ornt"
contains this orientation. This is initially set from the file "spm_defaults.m".
This can however be changed from within SPM (for the duration of the SPM
session) using the `Defaults' button. For instance, left-right (radiological v
neurological) orientations can easily be specified.
<H2>The header file.</H2>*.hdr: The format of the 348 byte header file is that
adopted by ANALYZE (<A
href="http://www.mayo.edu/bir/PDF/ANALYZE75.pdf">http://www.mayo.edu/bir/PDF/ANALYZE75.pdf</A>).
The fields that are necessary in the context of SPM include:
<P>
<TABLE>
<TBODY>
<TR>
<TD><B>Field</B></TD>
<TD><B>[SPM default global variable]</B></TD></TR>
<TR>
<TD>image size {in voxels for x, y and z}</TD>
<TD>[DIM]
<TR>
<TD>voxel size {in mm for x, y and z}</TD>
<TD>[VOX]</TD></TR>
<TR>
<TD>data type {see spm_type.m}</TD>
<TD>[TYPE]</TD></TR>
<TR>
<TD>a scaling coefficient {applied during memory mapping}</TD>
<TD>[SCALE]</TD></TR>
<TR>
<TD>offset of voxel values in *.img {in bytes}</TD>
<TD>[OFFSET]</TD></TR>
<TR>
<TD>the origin {(x,y,z) in voxels} {e.g. the anterior commissure}</TD>
<TD>[ORIGIN]</TD></TR>
<TR>
<TD>description {a short string}</TD>
<TD>[DESCRIP]</TD></TR></TBODY></TABLE>
<P>If *.hdr does not exist then the default values are assumed. Default values
can be changed by selecting 'defaults'. *.hdr can be created (and can be edited)
using the 'Display' facility.
<P>It is important that these header files are correct. The most common problems
with using SPM usually reduce to incomplete or incorrect header files.
<H2><A name=matfile>The `.mat' file</A>.</H2>This simply contains a 4x4 affine
transformation matrix in a variable `M'. These files are normally generated by
the `realignment' and `coregistration' modules. What these matrixes contain is a
mapping from the voxel coordinates (x0,y0,z0) (where the first voxel is at
coordinate (1,1,1)), to coordinates in millimeters (x1,y1,z1). By default, the
the new coordinate system is derived from the `origin' and `vox' fields of the
image header.
<P>x1 = M(1,1)*x0 + M(1,2)*y0 + M(1,3)*z0 + M(1,4)
<P>y1 = M(2,1)*x0 + M(2,2)*y0 + M(2,3)*z0 + M(2,4)
<P>z1 = M(3,1)*x0 + M(3,2)*y0 + M(3,3)*z0 + M(3,4)
<P>
<P>Assuming that image1 has a transformation matrix M1, and image2 has a
transformation matrix M2, the mapping from image1 to image2 is: M2\M1 (ie. from
the coordinate system of image1 into millimeters, followed by a mapping from
millimeters into the space of image2).
<P>These `.mat' files allow several realignment or coregistration steps to be
combined into a single operation (without the necessity of resampling the images
several times). The `.mat' files are also used by the spatial normalisation
module.
<HR>
Copied from (#)spm_format.man 2.1 John Ashburner 99/05/16
<HR>
<P>
<P>
<CENTER><IMG height=21 src="SPM image file format_files/timecourse.gif"
width="95%"></CENTER>
<P><B><A href="http://www.mrc-cbu.cam.ac.uk/Imaging/index.html" target=_top><IMG
height=37 alt=HOME src="SPM image file format_files/cbuihome.gif" width=37></A>
Cambridge Imagers Home Page.</B></P>
<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -