Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /trunk/src/compiler/image-info/dnorm-format.txt
ViewVC logotype

Annotation of /trunk/src/compiler/image-info/dnorm-format.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 107 - (view) (download)
Original Path: trunk/src/image-info/dnorm-format.txt

1 : glk 107 The ASCII lines in the header end with '\n'.
2 :    
3 :     First line should be the magic:
4 :     NRRD0004
5 :    
6 :     Rest of header will be a sequence of plain text lines, terminated by
7 :     an empty line ('\n' alone). Some header lines give per-array
8 :     information, some give per-axis information.
9 :    
10 :    
11 :     ============================================================
12 :     The basic fields that should be there are:
13 :    
14 :     ----------------
15 :     type: <string>
16 :    
17 :     Gives the type of the scalar values in the array. Current values are:
18 :     signed char
19 :     unsigned char
20 :     short
21 :     unsigned short
22 :     int
23 :     unsigned int
24 :     long long int
25 :     unsigned long long int
26 :     float
27 :     double
28 :    
29 :     ----------------
30 :     dimension: <int>
31 :    
32 :     Gives the dimension of the array. Must be greater than 0. Current
33 :     code has a #define that limits the value to <= 16. The per-axis fields
34 :     will have this many pieces of information.
35 :    
36 :     ----------------
37 :     encoding: <string>
38 :    
39 :     How scalar values are encoded on disk. Currently, should only see
40 :     "encoding: raw".
41 :    
42 :     ----------------
43 :     endian: <string>
44 :    
45 :     Endian-ness of raw values saved on disk. Possibilities are:
46 :     little
47 :     big
48 :    
49 :     ----------------
50 :     space dimension: <int>
51 :    
52 :     Gives the dimension of the world-space in which the array or oriented
53 :     (For now we're not allowing the named spaces that are given with the
54 :     "space: " field). The points and vectors given by "space origin"
55 :     and "space directions" will have this many coefficients, so this
56 :     field has to precede "space origin" and "space directions".
57 :    
58 :     ----------------
59 :     space origin: (<float1>,<float2>,...,<floatN>)
60 :    
61 :     Gives the location of the center of the first sample (with index
62 :     space coordinates (0,0,0,...,0). The number of coefficients
63 :     separated by commas and bounded by parens (with optional whitespace
64 :     throughout) is given by the "space dimension" field. Each coefficient
65 :     is a floating point value (of the sort produced by printf("%g", val))
66 :    
67 :     ============================================================
68 :     The per-axis fields that should be there are as follows. The ordering
69 :     of these fields is always *fast* to *slow*, and the number of pieces
70 :     of information is always equal to the image dimension.
71 :    
72 :     ----------------
73 :     sizes: <int1> <int2> ... <intD>
74 :    
75 :     The number of samples along each axis. Each integer value must be >= 0.
76 :    
77 :     ----------------
78 :     kinds: <string1> <string2> ... <stringD>
79 :    
80 :     The kind of information represented by the samples along each axis. The
81 :     possible values are:
82 :    
83 :     2-vector
84 :     3-vector
85 :     4-vector
86 :     2D-symmetric-matrix
87 :     2D-matrix
88 :     3D-symmetric-matrix
89 :     3D-matrix
90 :     space
91 :    
92 :     The "space" kind is for a typical axis of the image, with samples that
93 :     subtend some region of the spatial domain of the image. All the other
94 :     kinds are the sequence of scalar values that compose a non-scalar
95 :     image value (vectors and tensors). We are currently not allowing the
96 :     "measurement frame" field that identifies the coordinate system in
97 :     which these are measured relative to the image orientation, so nothing
98 :     should be assumed about the space in which these coefficients are
99 :     measured:
100 :    
101 :     2D-symmetric-matrix: Mxx Mxy Myy
102 :     2D-matrix: Mxx Mxy Myx Myy
103 :     3D-symmetric-matrix: Mxx Mxy Mxz Myy Myz Mzz
104 :     3D-matrix: Mxx Mxy Mxz Myx Myy Myz Mzx Mzy Mzz
105 :    
106 :     We currently allow there to be *at* *most* *one* axis with a
107 :     non-"space" kind. We can have non-scalar image values, but we don't
108 :     have cartesian products of non-scalar image values. The non-"space"
109 :     kind can be anywhere in the axis ordering.
110 :    
111 :     ----------------
112 :     space directions: (<x1>,<x2>,...,<xN>) (<x1>,<x2>,...,<xN>) ...
113 :     (and at most one of these vectors is actually "none")
114 :    
115 :     These give the "direction" in world-space between successive samples
116 :     along each axis: the columns of the index-to-world transform matrix.
117 :     There is one per image axis, even for the axis of coefficients of
118 :     non-scalar image values. Because such an axis really has no spatial
119 :     extent, for this and only this axis, the space direction vector is
120 :     instead the string "none".
121 :    
122 :     ============================================================
123 :     Field ordering:
124 :    
125 :     The fields should appear in this order:
126 :     type
127 :     dimension
128 :     space dimension
129 :     sizes
130 :     space directions
131 :     kinds
132 :     endian
133 :     encoding
134 :     space origin

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0