注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Wei Ding blog

 
 
 

日志

 
 

MRC file format as used in IMOD()  

2016-02-18 09:40:16|  分类: EM |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
http://120.52.72.41/bio3d.colorado.edu/c3pr90ntcsf0/imod/doc/mrc_format.txt
<pre>
The MRC file format used by IMOD.

The MRC header, length 1024 bytes.  Names are the names used in C code.

OFFSET  SIZE DATA    NAME	Description

  0 000  4   int     nx;	Number of Columns 
  4 004  4   int     ny;        Number of Rows
  8 010  4   int     nz;        Number of Sections.

 12 014  4   int     mode;      Types of pixel in image.  Values used by IMOD:
         	       	 0 = unsigned or signed bytes depending on flag in imodStamp
                             only unsigned bytes before IMOD 4.2.23
         	       	 1 = signed short integers (16 bits)
         	       	 2 = float
         	       	 3 = short * 2, (used for complex data)
         	       	 4 = float * 2, (used for complex data)
                         6 = unsigned 16-bit integers (non-standard)
         	       	16 = unsigned char * 3 (for rgb data, non-standard)

 16 020  4   int     nxstart;     Starting point of sub image (not used in IMOD)  
 20 024  4   int     nystart;
 24 030  4   int     nzstart;

 28 034  4   int     mx;         Grid size in X, Y, and Z       
 32 040  4   int     my;
 36 044  4   int     mz;

 40 050  4   float   xlen;       Cell size; pixel spacing = xlen/mx, ylen/my, zlen/mz
 44 054  4   float   ylen;
 48 060  4   float   zlen;

 52 064  4   float   alpha;      cell angles - ignored by IMOD
 56 070  4   float   beta;
 60 074  4   float   gamma;

         	       	 These need to be set to 1, 2, and 3 for pixel spacing
                                   to be interpreted correctly
 64 100  4   int     mapc;       map column  1=x,2=y,3=z.       
 68 104  4   int     mapr;       map row     1=x,2=y,3=z.       
 72 110  4   int     maps;       map section 1=x,2=y,3=z.       

                                 These need to be set for proper scaling of data
 76 114  4   float   amin;       Minimum pixel value.
 80 120  4   float   amax;       Maximum pixel value.
 84 124  4   float   amean;      Mean pixel value.

 88 130  4   int     ispg;       space group number (ignored by IMOD)
 92 134  4   int     next;       number of bytes in extended header (called nsymbt in
                                   MRC standard)
 96 140  2   short   creatid;    used to be an ID number, is 0 as of IMOD 4.2.23
 98 142  30  ---     extra data  (not used, first two bytes should be 0)

                                 These two values specify the structure of data in the
                                 extended header; their meaning depend on whether the
                                 extended header has the Agard format, a series of
                                 4-byte integers then real numbers, or has data 
                                 produced by SerialEM, a series of short integers.
                                 SerialEM stores a float as two shorts, s1 and s2, by:
                                   value = (sign of s1)*(|s1|*256 + (|s2| modulo 256))
                                      * 2**((sign of s2) * (|s2|/256))
128 200  2   short   nint;       Number of integers per section (Agard format) or
                                 number of bytes per section (SerialEM format)
130 202  2   short   nreal;      Number of reals per section (Agard format) or bit
                                 flags for which types of short data (SerialEM format):
                                 1 = tilt angle * 100  (2 bytes)
                                 2 = piece coordinates for montage  (6 bytes)
                                 4 = Stage position * 25    (4 bytes)
                                 8 = Magnification / 100 (2 bytes)
                                 16 = Intensity * 25000  (2 bytes)
                                 32 = Exposure dose in e-/A2, a float in 4 bytes
                                 128, 512: Reserved for 4-byte items
                                 64, 256, 1024: Reserved for 2-byte items
                                 If the number of bytes implied by these flags does
                                 not add up to the value in nint, then nint and nreal
                                 are interpreted as ints and reals per section

132 204  20  ---     extra data (not used)

152 230  4   int     imodStamp   1146047817 indicates that file was created by IMOD or 
                                 other software that uses bit flags in the following field
156 234  4   int     imodFlags   Bit flags:
                                 1 = bytes are stored as signed
                                 2 = pixel spacing was set from size in extended header 
                                 4 = origin is stored with sign inverted from definition
                                     below

                              Explanation of type of data.
160 240  2   short   idtype;  ( 0 = mono, 1 = tilt, 2 = tilts, 3 = lina, 4 = lins)
162 242  2   short   lens;
164 244  2   short   nd1;	for idtype = 1, nd1 = axis (1, 2, or 3)     
166 246  2   short   nd2;
168 250  2   short   vd1;                       vd1 = 100. * tilt increment
170 252  2   short   vd2;                       vd2 = 100. * starting angle

                		Current angles are used to rotate a model to match a
                                new rotated image.  The three values in each set are
                                rotations about X, Y, and Z axes, applied in the order
                                Z, Y, X.
172 254  24  float   tiltangles[6];  0,1,2 = original:  3,4,5 = current 

                               The image origin is the location of the origin of the
                               coordinate system relative to the first pixel in the
                               file.  It is in pixel spacing units rather than in
                               pixels.  If an original volume has an origin of 0, a
                               subvolume should have negative origin values.
        NEW-STYLE MRC image2000 HEADER - IMOD 2.6.20 and above:
196 304  4   float   xorg;      Origin of image
200 310  4   float   yorg;
204 314  4   float   zorg;
208 320  4   char    cmap;      Contains "MAP "
212 324  4   char    stamp;     First two bytes have 17 and 17 for big-endian or 
                                  68 and 65 for little-endian
216 330  4   float   rms;       RMS deviation of densities from mean density

        OLD-STYLE MRC HEADER - IMOD 2.6.19 and below:
196 304  2   short   nwave;     # of wavelengths and values
198 306  2   short   wave1;
200 310  2   short   wave2;
202 312  2   short   wave3;
204 314  2   short   wave4;
206 316  2   short   wave5;
208 320  4   float   zorg;      Origin of image.
212 324  4   float   xorg;
216 330  4   float   yorg;

        ALL HEADERS:
220 334  4   int     nlabl;  	Number of labels with useful data.
224 340  800 char[10][80]    	10 labels of 80 charactors, blank-padded to end
------------------------------------------------------------------------

Offsets are given as bytes in decimal and octal.
Total size of header is 1024 bytes plus the size of the extended header.
 
Image data follows with the origin in the lower left corner,
looking down on the volume.

The size of the image is nx * ny * nz * (mode data size).

Fourier transforms are stored as complex floats.  The 2D or 3D transform of a
nx * ny * nz image file has dimensions nx / 2 + 1 * ny * nz.  The origin (0
spatial frequency) is at (0, ny / 2) on each plane of a 2D transform, and at
(0, ny / 2, nz / 2) in a 3D transform, where coordinates are numbered from 0
and each division rounds downward to an integer.  The frequencies at the first
and last lines of the transform are -int(ny / 2) / ny and 
int((ny - 1) / 2) / ny, respectively, and similarly in Z for a 3D transform.

Deviations from the MRC standard are: mode 6 for unsigned short integers, mode
16 for RGB data, and the extended header defined by next, nint, and nreal.
In the MRC standard nsymbt (next) is allowed to be only 0 or 80, with the
80 bytes in a particular format.  Other non-standard items, in bytes 152-195,
are at the top of the extra data section and do not conflict with other known
uses.

It is suggested that other developers willing to follow the conventions in the
imodFlags field and wishing to indicate that files originated from their
software use the same imodStamp value and designate another bit in imodFlags,
to be listed here.
</pre>
  评论这张
 
阅读(161)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017