|
27 | 27 | DATA_OFFSET = 284
|
28 | 28 | # Note that mgh data is strictly big endian ( hence the > sign )
|
29 | 29 | header_dtd = [
|
30 |
| - ('version', '>i4'), |
31 |
| - ('dims', '>i4', (4,)), |
32 |
| - ('type', '>i4'), |
33 |
| - ('dof', '>i4'), |
34 |
| - ('ras_good', '>i2'), |
35 |
| - ('voxelsize', '>f4', (3,)), |
36 |
| - ('x_ras', '>f4', (3, 1)), |
37 |
| - ('y_ras', '>f4', (3, 1)), |
38 |
| - ('z_ras', '>f4', (3, 1)), |
39 |
| - ('c_ras', '>f4', (3, 1)) |
| 30 | + ('version', '>i4'), # 0; must be 1 |
| 31 | + ('dims', '>i4', (4,)), # 4; width, height, depth, nframes |
| 32 | + ('type', '>i4'), # 20; data type |
| 33 | + ('dof', '>i4'), # 24; degrees of freedom |
| 34 | + ('ras_good', '>i2'), # 28; *_ras fields valid |
| 35 | + ('voxelsize', '>f4', (3,)), # 30; zooms (X, Y, Z) |
| 36 | + ('x_ras', '>f4', (3, 1)), # 42; X direction cosine column |
| 37 | + ('y_ras', '>f4', (3, 1)), # 54; Y direction cosine column |
| 38 | + ('z_ras', '>f4', (3, 1)), # 66; Z direction cosine column |
| 39 | + ('c_ras', '>f4', (3, 1)), # 78; mm from (0, 0, 0) RAS to vol center |
40 | 40 | ]
|
41 | 41 | # Optional footer. Also has more stuff after this, optionally
|
42 | 42 | footer_dtd = [
|
|
0 commit comments