~ubuntu-branches/ubuntu/warty/xmedcon/warty

« back to all changes in this revision

Viewing changes to man/m-intf.4

  • Committer: Bazaar Package Importer
  • Author(s): Roland Marcus Rutschmann
  • Date: 2004-06-07 09:00:14 UTC
  • Revision ID: james.westby@ubuntu.com-20040607090014-t39n52qc9zjqqqkh
Tags: upstream-0.9.6
ImportĀ upstreamĀ versionĀ 0.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.TH M-INTF 4
 
3
.SH NAME
 
4
m-intf - InterFile 3.3 medical image format (MedCon)
 
5
.SH DESCRIPTION
 
6
.PP
 
7
.in 0.2i
 
8
The file consists of two parts, the administrative data in ASCII and the binary image data. It is possible to put both in one file, but we prefer to separate the data into two files. The administrative data in a file with extension `.h33' and the binary data in a file with extension `.i33'.
 
9
.PP
 
10
.in 0.2i
 
11
This is a wonderful feature! Because of the separate header in ASCII you could write your own header for any raw image data you may have. I regularly use InterFile for turning unsupported formats into a supported format. Try to extract the raw image data from the unknown format and add an appropriate header with all information you know about.
 
12
.PP
 
13
.in 0.2i
 
14
The basic defines for the format:
 
15
.PP
 
16
.in 0.2i
 
17
.nf
 
18
---------------------------------------------------------------------------
 
19
 
 
20
#define MDC_INTF_MAXKEYCHARS 256
 
21
 
 
22
char keystr[MDC_INTF_MAXKEYCHARS];
 
23
 
 
24
/* the  data type */
 
25
#define MDC_INTF_STATIC      1
 
26
#define MDC_INTF_DYNAMIC     2
 
27
#define MDC_INTF_GATED       3
 
28
#define MDC_INTF_TOMOGRAPH   4
 
29
#define MDC_INTF_CURVE       5
 
30
#define MDC_INTF_ROI         6
 
31
 
 
32
/* the process status */
 
33
#define MDC_INTF_ACQUIRED      1
 
34
#define MDC_INTF_RECONSTRUCTED 2
 
35
 
 
36
/* gated spect nesting outer level */
 
37
#define MDC_INTF_NESTING_SPECT 1
 
38
#define MDC_INTF_NESTING_GATED 2
 
39
 
 
40
typedef struct MdcInterFile_t {
 
41
 
 
42
  int data_type, process_status, pixel_type, gspect_nesting;
 
43
  Uint32 width, height, images_per_dimension, time_slots;
 
44
  Uint32 data_offset, data_blocks, imagesize, number_images;
 
45
  Uint32 energy_windows, frame_groups, time_windows, detector_heads;
 
46
  float pixel_xsize, pixel_ysize, slice_thickness, centre_centre_separation;
 
47
  float study_duration, image_duration, image_pause, group_pause, ext_rot;
 
48
  Int8 patient_rot, patient_orient, slice_orient;
 
49
  double version;
 
50
 
 
51
} MDC_INTERFILE;
 
52
 
 
53
---------------------------------------------------------------------------
 
54
.fi
 
55
.PP
 
56
.in 0.2i
 
57
What does the format support or not support:
 
58
.PP
 
59
.in 0.2i
 
60
.nf
 
61
===========================================================================
 
62
Item            Supported                             Not Supported
 
63
===========================================================================
 
64
Color Map     : grayscale                                  -
 
65
File Endian   : little or big                              -
 
66
Pixeltypes    : 1-bit, all intergers                       -
 
67
                float, double, ASCII
 
68
===========================================================================
 
69
Scaling factors  : quantify & calibrate factors/image  are NOT supported,
 
70
                   unless you define your own key-value pairs
 
71
---------------------------------------------------------------------------
 
72
Dimensions/Image : different dimensions for each image are supported
 
73
---------------------------------------------------------------------------
 
74
Pixeltypes/Image : different pixeltypes for each image are supported, but
 
75
                   decoders are not required to be able to read.
 
76
                   MedCon does support different pixeltypes per image.
 
77
===========================================================================
 
78
.fi
 
79
.PP
 
80
.in 0.2i
 
81
Underneath you will find a description of the format.
 
82
.PP
 
83
.in 0.2i
 
84
1. ADMINISTRATIVE DATA
 
85
.br
 
86
   ===================
 
87
.PP
 
88
.in 0.2i
 
89
.IP a) 5
 
90
The administrative data are only composed of key-value pairs and exist in the form of ASCII text. The administrative data should be terminated with a <Ctrl-Z).
 
91
.IP b) 5
 
92
All administrative data are to be supplied in the form of key-value pairs in ASCII with delimiters. A `key' is the name of a parameter taking a specific `value', an example being:
 
93
.PP
 
94
.in 0.2i
 
95
.ce 1
 
96
patient name := Elvis Presley <cr><lf>
 
97
.IP c) 5
 
98
The maximum permitted number of characters for a key or a value or a comment is 255 characters.
 
99
.IP d) 5
 
100
Neither keys nor values are to be treated as case sensitive. The characters <space> <tab> <underscore> <!> may all be treated as white space and ignored.
 
101
.IP e) 5
 
102
All relevant keys should be included in the intermediate file. A null value is permitted which will invoke the default where specified. The required keys are preceded by an exclamation mark.
 
103
.IP f) 5
 
104
A hole line or key-value pairs may have comments appended to them by preceding the comment with a semicolon <;>.
 
105
.IP g) 5
 
106
A required key ("name of data file") is included to point to the image data file, even if the binary data is in the same file of the administrative data.
 
107
.IP h) 5
 
108
The two alternate keys ("data starting block") or ("data offset in bytes") are used to indicate the offset of the binary data in the file as specified by the key ("name of data file"). The ("data starting block")  represents the offset in number of blocks or 2048 bytes. The use of the key ("data offset in bytes") permits the offset to the binary data to be freely specified.
 
109
.PP
 
110
.in 0.2i
 
111
2. IMAGE DATA
 
112
.br
 
113
   ==========
 
114
.PP
 
115
.in 0.2i
 
116
.IP a) 5
 
117
The order of the pixel data shall increment by column from left to right, and then by row, from top to bottom.
 
118
.IP b) 5
 
119
Image data shall be in either bit, signed or unsigned integer format, IEEE floating point format (float or double) or ASCII. When the data pixels are written in ASCII, the text line must not exceed 255 characters.
 
120
.IP c) 5
 
121
The default value for the key ("imagedata byte order") is BIGENDIAN, but LITTLEENDIAN is allowed. The byte order must be respected for integer and floating point numbers.
 
122
.IP d) 5
 
123
Bit data will stored in a single byte, representing 8 pixel values and ordered such that the most significant bit corresponds to the leftmost pixel.
 
124
.PP
 
125
.in 0.2i
 
126
3. LIST OF KEYS - VERSION 3.3    (Updated for Gated SPECT)
 
127
.br
 
128
   ==========================
 
129
.PP
 
130
.in 0.2i
 
131
.nf
 
132
!INTERFILE  := <NULL>
 
133
;to indicate that this is an Interfile file
 
134
 
 
135
!imaging modality := <ASCII> nucmed
 
136
;only nucmed is defined for the purpose of this document
 
137
 
 
138
!originating system := <ASCII>
 
139
;eg.GAMMA-11, MDS, ADAC, etc.
 
140
 
 
141
!version of keys := <Numeric> 3.3
 
142
;future versions shall increment
 
143
 
 
144
date of keys := <DateFormat> 1996:09:26
 
145
;date of version 3.3 in date format
 
146
 
 
147
conversion program := <ASCII>
 
148
;name of program used
 
149
 
 
150
program author := <ASCII>
 
151
;your chance of fame and fortune
 
152
 
 
153
program version := <Numeric>
 
154
;to keep track of conversion programs
 
155
 
 
156
program date := <DateFormat>
 
157
;date of program
 
158
 
 
159
!GENERAL DATA := <NULL>
 
160
;required but can be treated as comment
 
161
 
 
162
original institution := <ASCII>
 
163
;name of hospital etc.
 
164
 
 
165
contact person := <ASCII>
 
166
;another chance of fame (and fortune?)
 
167
 
 
168
data description := <ASCII>
 
169
;whatever you want
 
170
 
 
171
!data starting block := <Numeric> 0
 
172
;the value is the offset in blocks of 2048 bytes in either the
 
173
;administrative or the data file depending on the key value for
 
174
;name of data file (see below)
 
175
|      ;OR
 
176
!data offset in bytes:= <Numeric> 0
 
177
;as above but the offset may be specified freely in bytes
 
178
 
 
179
!name of data file := <ASCII> <NULL>
 
180
;<NULL> if no image data exists
 
181
;key is a name of the file where the data are present, either when
 
182
;in a separate binary data file, or when in a combined
 
183
;administrative/binary data file
 
184
 
 
185
patient name := <ASCII>
 
186
;last name, first name (recommended)
 
187
 
 
188
!patient ID := <ASCII>
 
189
;as used in your hospital
 
190
 
 
191
patient dob := <DateFormat>
 
192
;date of birth
 
193
 
 
194
patient sex := <ASCIIlist> Unknown M|F|Unknown
 
195
;default is Unknown!
 
196
 
 
197
!study ID := <ASCII>
 
198
;as local conditions dictate
 
199
 
 
200
exam type := <ASCII>
 
201
;description of procedure as above
 
202
 
 
203
data compression := <ASCII> none
 
204
;name of algorithm if present- e.g. JPEG, etc.
 
205
 
 
206
data encode := <ASCII> none
 
207
;name of method of encoding if present- e.g. uuencode etc.
 
208
 
 
209
organ := <ASCII> none
 
210
;ENLF: for mapping with DICOM tag (0018,0015) BodyPartExamined
 
211
 
 
212
isotope := <ASCII> | <ASCII>/<ASCII> none
 
213
;ENLF: for mapping with DICOM radionuclide/radiopharmaceutical entries.
 
214
 
 
215
dose := <Numeric> 0
 
216
;ENLF: for mapping with DICOM tag (0018,1074) RadionuclideTotalDose [MBq]
 
217
 
 
218
!GENERAL IMAGE DATA := <NULL>
 
219
;again required but treated as comment
 
220
 
 
221
!type of data := <ASCIIlist>  Other
 
222
   Static|Dynamic|Gated|Tomographic|Curve|ROI|GSPECT|Other
 
223
;important - this key is used for many conditionals
 
224
 
 
225
!total number of images := <Numeric>
 
226
;how many images are there altogether in total in the associated 
 
227
;data file (for all windows etc.). This overrides any other way of
 
228
;calculating the total number of images.
 
229
 
 
230
study date := <DateFormat>
 
231
;date of the first image included in the data file
 
232
 
 
233
study time := <TimeFormat>
 
234
;time for the start of first image specified
 
235
 
 
236
imagedata byte order := <ASCIIlist> BIGENDIAN
 
237
        BIGENDIAN|LITTLEENDIAN
 
238
;BIGENDIAN is the default if unspecified
 
239
 
 
240
process label := <ASCII> none
 
241
;ENLF: for mapping with DICOM tag (0008,103E) SeriesDescription
 
242
 
 
243
quantification units := +1.696265e-05
 
244
;ENLF: global scale factor for mediman dialect
 
245
 
 
246
NUD/rescale slope := +1.696265e-05
 
247
;ENLF: global scale factor for NUD systems
 
248
 
 
249
NUD/rescale intercept := +0.000000e+00
 
250
;ENLF: global scale intercept for NUD systems
 
251
 
 
252
number of energy windows := <Numeric> 1
 
253
;defaulted to one if unspecified
 
254
 
 
255
for ( number of energy windows, energy window)
 
256
{
 
257
      energy window[<energy window>] := <ASCII>
 
258
      ;ASCII text- for example "Tc99m"
 
259
      ;this starts as "energy window [1]" and then increments to
 
260
      ;energy window[2]:= <ASCII>
 
261
      ;and then on to
 
262
      ;energy window[3]:= <ASCII>
 
263
      ;etc. etc.
 
264
 
 
265
      energy window lower level [<energy window>] := <Numeric>
 
266
      ;value of lower energy level in keV for the corresponding window
 
267
      ;starts off as "energy window lower level [1]"
 
268
      ;and continues [2],[3] .. as above
 
269
 
 
270
      energy window upper level [<energy window>] := <Numeric>
 
271
      ;value of upper energy level in keV for the corresponding window
 
272
      ;starts off as "energy window upper level [1]"
 
273
      ;and continues [2],[3] .. as above
 
274
 
 
275
 
 
276
      flood corrected := <ASCIIlist> Y Y|N
 
277
      ;corrected if unspecified
 
278
 
 
279
      decay corrected := <ASCIIlist> N Y|N
 
280
      ;not corrected if unspecified
 
281
 
 
282
      if( type of data = "Static"|"ROI")
 
283
      {
 
284
      !STATIC STUDY (General) := <NULL>
 
285
      ;label to indicate that this is the static definition
 
286
 
 
287
      number of images/energy window := <Numeric> 1
 
288
      ;number of images in THIS energy window
 
289
 
 
290
      for ( number of images/energy window )
 
291
      {
 
292
            !Static Study (each frame) := <NULL>
 
293
            ;included at the beginning of the definition of
 
294
            ;each new static frame
 
295
 
 
296
            !image number := <Numeric>
 
297
            ;starting from 1 [see above]
 
298
            ;- must be specified!!
 
299
            ;starts from 1 and increments though all
 
300
            ;windows to its maximum value which equals the
 
301
            ;total number of images in the file!!
 
302
 
 
303
            !matrix size [1] :=< Numeric>
 
304
            ;matrix size across (number of columns)- previously x
 
305
            ;32, 64, 128 etc. but not necessarily powers of 2
 
306
 
 
307
            !matrix size [2] := <Numeric>
 
308
            ;matrix size down (number of rows)- previously y
 
309
            ;32, 64, 128 etc. but not necessarily powers of 2
 
310
 
 
311
            !number format := <ASCIIlist> unsigned integer
 
312
                signed integer|unsigned integer
 
313
                |long float|short float|bit|ASCII
 
314
            ;as specified
 
315
 
 
316
            !number of bytes per pixel := <Numeric>
 
317
            ;e.g. 1|2|4.. [this key ignored for bit data]
 
318
 
 
319
            scaling factor (mm/pixel) [1]:= <Numeric>
 
320
            ;size of pixel across- previously x
 
321
 
 
322
            scaling factor (mm/pixel) [2] := <Numeric>
 
323
            ;size of pixel down- previously y
 
324
 
 
325
            image duration (sec) := <Numeric>
 
326
            ;eg. 120.0  i.e. normally a float, for each image
 
327
 
 
328
            image start time := <TimeFormat>
 
329
            ;time for each image
 
330
 
 
331
            label := <ASCII>
 
332
            ;eg Anterior
 
333
 
 
334
            maximum pixel count := <Numeric>
 
335
            ;for scaling purposes, for each image
 
336
 
 
337
            total counts := <Numeric>
 
338
            ;either an integer or a float, for each image
 
339
 
 
340
            }
 
341
            ;End of frame loop -Repeat for each subsequent frame
 
342
        }
 
343
        ;End of static definitions
 
344
 
 
345
 
 
346
        if( type of data = "Dynamic")
 
347
        {
 
348
            !DYNAMIC STUDY (general) := <NULL>
 
349
            ;label to indicate that this is a dynamic study
 
350
 
 
351
            !number of frame groups := <Numeric> 1
 
352
            ;defaults to 1
 
353
 
 
354
            for( number of frame groups, frame group number)
 
355
            {
 
356
                  !Dynamic Study (each frame group) := <NULL>
 
357
                  ;Repeated for each group of frames as
 
358
 
 
359
                  ;indication of  the start of the
 
360
                  ;definition of the new group
 
361
 
 
362
                  !frame group number := <Numeric>
 
363
                  ;numbering starts from 1 (must be specified)
 
364
 
 
365
 
 
366
                  !matrix size [1] := <Numeric>
 
367
                  ;matrix size across (number of columns)
 
368
                  ;-previously matrix size x
 
369
                  ;32, 64, 128 etc. but not necessarily powers of 2
 
370
 
 
371
                  !matrix size [2] := <Numeric>
 
372
                  ;matrix size down (number of rows)- previously y
 
373
                  ;32, 64, 128 etc. but not necessarily powers of 2
 
374
 
 
375
                  !number format := <ASCIIlist> unsigned integer
 
376
                     signed integer|unsigned integer|
 
377
                     long float|short float|bit|ASCII
 
378
                  ;as specified
 
379
 
 
380
                  !number of bytes per pixel := <Numeric>
 
381
                  ;e.g. 1|2|4.. [this key ignored for bit data]
 
382
 
 
383
                  scaling factor (mm/pixel) [1]:= <Numeric>
 
384
                  ;size of pixel across- previously x
 
385
 
 
386
                  scaling factor (mm/pixel) [2] := <Numeric>
 
387
                  ;size of pixel down- previously y
 
388
 
 
389
                  !number of images this frame group := <Numeric>
 
390
                  ;for each frame group
 
391
                  ;(for each energy window)
 
392
 
 
393
                  !image duration (sec) := <Numeric>
 
394
                  ;eg 0.2, for each frame group
 
395
                  ;(for each energy window)
 
396
 
 
397
                  pause between images (sec) := <Numeric> 0.0
 
398
                  ;eg 0.0, default is 0.0
 
399
 
 
400
                  pause between frame groups (sec) := <Numeric> 0.0
 
401
                  ;eg 5.0 default 0.0, time between last
 
402
                  ;frame group (or start of study) and this frame group
 
403
 
 
404
                  !maximum pixel count in group := <Numeric>
 
405
                  ;eg 1234 (for scaling purposes)
 
406
                  ;maximum pixel for all frames in this
 
407
                  ;group and this window!!
 
408
 
 
409
            }
 
410
            ;Repeat for each subsequent frame group
 
411
        }
 
412
 
 
413
        ; End of dynamic definitions
 
414
 
 
415
 
 
416
        if( type of data = "Gated")
 
417
        {
 
418
        !GATED STUDY (general) := <NULL>
 
419
        ;again a flag to indicate a gated study
 
420
 
 
421
        !matrix size [1] := <Numeric>
 
422
        ;matrix size across (number of columns)- previously x
 
423
        ;32, 64, 128 etc. but not necessarily powers of 2
 
424
 
 
425
        !matrix size [2] := <Numeric>
 
426
        ;matrix size down (number of rows)- previously y
 
427
        ;32, 64, 128 etc. but not necessarily powers of 2
 
428
 
 
429
        !number format := <ASCIIlist> unsigned integer
 
430
           signed integer|unsigned integer|
 
431
           long float|short float|bit|ASCII
 
432
        ;as specified
 
433
 
 
434
        !number of bytes per pixel := <Numeric>
 
435
        ;e.g. 1|2|4|..> [this key ignored for bit data]
 
436
 
 
437
        scaling factor (mm/pixel) [1]:= <Numeric>
 
438
        ;size of pixel across- previously x
 
439
 
 
440
        scaling factor (mm/pixel) [2] := <Numeric>
 
441
        ;size of pixel down- previously y
 
442
 
 
443
        study duration (elapsed) sec := <Numeric>
 
444
        ;eg 300, total elapsed time for whole study
 
445
 
 
446
        number of cardiac cycles (observed) := <Numeric>
 
447
        ;total number of cycles if known, for this
 
448
        ;energy window
 
449
 
 
450
        number of time windows := <Numeric> 1
 
451
        ;defaults to 1 if unspecified- number of different
 
452
        ;sets of time intervals
 
453
 
 
454
        for ( number of time windows, time window number)
 
455
        {
 
456
            !Gated Study (each time window) := <NULL>
 
457
 
 
458
            !time window number := <Numeric>
 
459
            ;starting from 1
 
460
 
 
461
            !number of images in time window := <Numeric>
 
462
            ;eg 24
 
463
 
 
464
            !image duration (sec) := <Numeric>
 
465
            ;eg 0.04  for each frame in THIS time window
 
466
 
 
467
            framing method := <ASCIIlist> Forward
 
468
                    Forward|Backward|Mixed|Other
 
469
            ;default is forward
 
470
 
 
471
            time window lower limit (sec) := <Numeric>
 
472
            ;float normally expected, for THIS time window
 
473
 
 
474
            time window upper limit (sec) := <Numeric>
 
475
            ;float normally expected
 
476
 
 
477
            % R-R cycles acquired this window := <Numeric>
 
478
            ;if known
 
479
 
 
480
            number of cardiac cycles (acquired) := <Numeric>
 
481
            ;eg 356 , if known
 
482
 
 
483
            study duration (acquired) sec := <Numeric>
 
484
            ;total  acquisition time duration for
 
485
            ;this window only (if it can be computed!!) as
 
486
            ;opposed to total acquisition time (when different)
 
487
 
 
488
            !maximum pixel count := <Numeric>
 
489
            ;for scaling purposes for all images in this
 
490
            ;time window (and energy window) only
 
491
 
 
492
            R-R histogram := <ASCIIlist> N Y|N
 
493
            ;flag to indicate that one exists!!
 
494
 
 
495
            }
 
496
            ;Repeat for each subsequent time window.
 
497
 
 
498
        }
 
499
        ;end of gated definitions
 
500
 
 
501
 
 
502
        if( type of data = "Tomographic")
 
503
        {
 
504
 
 
505
        !SPECT STUDY (general) := <NULL>
 
506
        ;flag to indicate tomographic data with no effect as such
 
507
 
 
508
        number of detector heads := <Numeric> 1
 
509
        ;default=1 if unspecified
 
510
 
 
511
        for ( number of detector heads )
 
512
        {
 
513
 
 
514
            !number of images/energy window := <Numeric>
 
515
            ;total number of images (for all heads) for
 
516
            ;THIS energy window!!
 
517
 
 
518
            !process status := Reconstructed Acquired|Reconstructed
 
519
            ;used below in conditional- MUST be defined
 
520
 
 
521
            !matrix size [1] := <Numeric>
 
522
            ;matrix size across (number of columns)- previously x
 
523
            ;32, 64, 128 etc. but not necessarily powers of 2
 
524
 
 
525
            !matrix size [2] := <Numeric>
 
526
            ;matrix size down (number of rows)- previously y
 
527
            ;32, 64, 128 etc. but not necessarily powers of 2
 
528
 
 
529
            !number format := <ASCIIlist> unsigned integer
 
530
               signed integer|unsigned integer|
 
531
               long float|short float|bit|ASCII
 
532
            ;as specified
 
533
 
 
534
            !number of bytes per pixel := <Numeric>
 
535
            ;e.g. 1|2|4|.. [this key ignored for bit data]
 
536
 
 
537
            scaling factor (mm/pixel) [1]:= <Numeric>
 
538
            ;size of pixel across- previously x
 
539
 
 
540
            scaling factor (mm/pixel) [2] := <Numeric>
 
541
            ;size of pixel down- previously y
 
542
 
 
543
            !number of projections := <Numeric>
 
544
            ;for example- 64
 
545
            ;note this is the actual number of images per
 
546
            ;head per energy window if
 
547
            ;the data are acquired, but NOT if the data are
 
548
            ;reconstructed where the number of images is
 
549
            ;specified separately as number of slices
 
550
 
 
551
            !extent of rotation := <Numeric>
 
552
            ;e.g 180, 360
 
553
 
 
554
            !time per projection (sec) := <Numeric>
 
555
            ;important for Acquired data
 
556
 
 
557
            study duration (sec) := <Numeric>
 
558
            ;eg 1280.0, for acquired data should be equal
 
559
            ;to the product of number of projections and
 
560
            ;time per projection, but could be different!!
 
561
 
 
562
            !maximum pixel count := <Numeric>
 
563
            ;for scaling- in THIS image series( this head
 
564
            ;and this energy window)
 
565
 
 
566
            patient orientation := <ASCIIlist> head_in
 
567
                 head_in|feet_in|other
 
568
 
 
569
            patient rotation :=  <ASCIIlist> supine
 
570
                 prone|supine|other
 
571
 
 
572
            if( process status = "acquired")
 
573
            {
 
574
               !SPECT STUDY (acquired data):= <NULL>
 
575
 
 
576
               !direction of rotation := <ASCIIlist> CW CW|CCW
 
577
               ;CW = clockwise, CCW = counter clockwise
 
578
 
 
579
               start angle := <Numeric>
 
580
               ;0 is top-dead-centre, in degrees
 
581
               ;in orientation as specified above
 
582
 
 
583
               first projection angle in data set := <Numeric>
 
584
               ;in degrees expressed with respect to
 
585
               ;anterior-  angles in direction as
 
586
               ;specified CW or CCW
 
587
 
 
588
               acquisition mode := <ASCIIlist> stepped
 
589
               stepped|continuous
 
590
 
 
591
               Centre_of_rotation :=  <ASCIIlist> Corrected
 
592
               Corrected|Single_value|For_every_angle
 
593
               ;default is "Corrected"
 
594
               ;"Corrected" corresponds to a null centre of rotation
 
595
               ;correction, as previous required by Interfile, that
 
596
               ;is, no centre of rotation information is to be
 
597
               ;passed. The key "Single value" indicates the
 
598
               ;conventional definition of the centre of rotation
 
599
               ;offset to be a single value specified for all angles,
 
600
               ;specified for each head given a multiple head
 
601
               ;acquisition.
 
602
               ;The key "For_every_angle" indicates that the centre
 
603
               ;of rotation offset will be  specified for each head
 
604
               ;and every angle. This is not currently implemented in
 
605
               ;this Interfile definition, but will be introduced in
 
606
               ;V4.
 
607
               ;The mathematical centre of rotation is assumed to be
 
608
               ;in the exact middle of the projection for example at
 
609
               ;x= 32.5 y=32.5 for a 64x64 image where the count
 
610
               ;starts from 1. Note that the choice of coordinates
 
611
               ;does not matter, the only constraint being the
 
612
               ;assumption that all projections have a length which
 
613
               ;is an even number of pixels. The centre of rotation
 
614
               ;is specified as the offset from that position to the
 
615
               ;perpendicular dropped from a point on the axis of
 
616
               ;rotation onto the head.
 
617
 
 
618
           if( Centre_of_rotation = "Single_value" )
 
619
           {
 
620
 
 
621
               !X_offset := <Numeric>
 
622
               ;x offset for all angles in mm.
 
623
               ;x_offset is the x offset between the perpendicular
 
624
               ;dropped from the centre of rotation and the dead
 
625
               ;centre of the matrix,
 
626
               ;The positive direction for the offset is considered
 
627
               ;to be that of the increasing projection index, e.g.
 
628
               ;for a projection with pixels of size 6mm, which
 
629
               ;should be centred at 32.5, an offset of +6mm
 
630
               ;indicates that the centre of rotation is at 33.5
 
631
               ;Note that since offset is specified in mm, the pixel
 
632
               ;size must be known.
 
633
 
 
634
 
 
635
               Y_offset := <Numeric>
 
636
               ;y offset for all angles in mm
 
637
               ;y_offset is the y offset between that perpendicular
 
638
               ;dropped from the centre of rotation from that point
 
639
               ;on the axis of rotation where the y_offset is
 
640
               ;considered to be zero, and the centre of the camera's
 
641
               ;field of view. Thus y_offset is the RELATIVE shift of
 
642
               ;the y-axis with respect to some arbitrary position,
 
643
               ;normally that from the centre of the filed of view of
 
644
               ;the first at the top dead centre position. Thus for
 
645
               ;a single head, this value would normally be expected
 
646
               ;to be equal to zero.
 
647
 
 
648
               Radius := <Numeric>
 
649
               ;radial distance to centre of rotation in mm,
 
650
               ;for this head.
 
651
 
 
652
 
 
653
               }
 
654
               ;end of centre of rotation specification
 
655
 
 
656
               orbit := <ASCIIlist> Circular Circular|non-circular
 
657
 
 
658
               preprocessed := <ASCII>
 
659
               ;preprocessing method
 
660
 
 
661
            }
 
662
            ; end of process status acquired
 
663
 
 
664
            if( process status = "reconstructed")
 
665
            {
 
666
               !SPECT STUDY (reconstructed data) := <NULL>
 
667
 
 
668
               method of reconstruction := <ASCII>
 
669
 
 
670
               !number of slices := <Numeric>
 
671
               ;i.e. number of images in this set for this
 
672
               ;head and this energy window
 
673
 
 
674
               number of reference frame := <Numeric> 0
 
675
               ;if unspecified the frame number
 
676
               ;originally used for defining slice positions
 
677
               ;0=default [Note- not a very useful key]
 
678
 
 
679
               slice orientation := <ASCIIlist> Transverse
 
680
                   Transverse|Coronal|Sagittal|Other
 
681
               ;default is transverse if unspecified
 
682
 
 
683
               slice thickness (pixels) := <Numeric> 1
 
684
               ;if unspecified 1=default
 
685
 
 
686
               centre-centre slice separation (pixels):=<Numeric> 1
 
687
               ;e.g.1,2,3,4...  as distinct from slice thickness
 
688
               ;the word centre can also be spelt as center
 
689
 
 
690
               filter name :=  <ASCII>
 
691
               ;e.g. Hann, Hamming, Butterworth
 
692
 
 
693
               filter parameters := <ASCII>
 
694
               ;Nyquist freq etc.
 
695
 
 
696
               z-axis filter := <ASCII>
 
697
               ;method [1,2,1] etc.
 
698
 
 
699
               attenuation correction coefficient/cm := <Numeric> 0.0
 
700
               ;default 0 means not done if unspecified
 
701
 
 
702
               method of attenuation correction :=  <ASCII>  none
 
703
 
 
704
               scatter corrected := <ASCIIlist> N Y|N
 
705
 
 
706
               method of scatter correction := <ASCII> none
 
707
 
 
708
               oblique reconstruction := <ASCIIlist> N Y|N
 
709
 
 
710
               oblique orientation := <ASCII>
 
711
               ;free text [Note ACR-NEMA convention preferred]
 
712
            }
 
713
            ;end of reconstructed tomo
 
714
       }
 
715
      ;End of tomo
 
716
 
 
717
 
 
718
*      if( type of data = "GSPECT")
 
719
       {
 
720
*      !GATED SPECT STUDY (general) := <NULL>
 
721
       ;again a flag to indicate a gated SPECT study
 
722
       ;MIXTURE OF GATED & TOMO
 
723
 
 
724
       !matrix size [1] := <Numeric>
 
725
       ;matrix size across (number of columns)- previously x
 
726
       ;32, 64, 128 etc. but not necessarily powers of 2
 
727
 
 
728
       !matrix size [2] := <Numeric>
 
729
       ;matrix size down (number of rows)- previously y
 
730
       ;32, 64, 128 etc. but not necessarily powers of 2
 
731
 
 
732
       !number format := <ASCIIlist> unsigned integer
 
733
        signed integer|unsigned integer|
 
734
        long float|short float|bit|ASCII
 
735
       ;as specified
 
736
 
 
737
       !number of bytes per pixel := <Numeric>
 
738
       ;e.g. 1|2|4|..> [this key ignored for bit data]
 
739
 
 
740
       !Gated SPECT nesting outer level := SPECT|Gated  Gated
 
741
       ; key to indictae order of images, if SPECT is outer level
 
742
       ; order is, for every angle give each gated image, if
 
743
       ; gated is outer level, then order is, for every gated
 
744
       ; time value, vie set of tomographic images
 
745
 
 
746
       scaling factor (mm/pixel) [1]:= <Numeric>
 
747
       ;size of pixel across- previously x
 
748
 
 
749
       scaling factor (mm/pixel) [2] := <Numeric>
 
750
       ;size of pixel down- previously y
 
751
 
 
752
       study duration (elapsed) sec := <Numeric>
 
753
       ;eg 300, total elapsed time for whole study
 
754
 
 
755
       number of cardiac cycles (observed) := <Numeric>
 
756
       ;total number of cycles if known, for this
 
757
       ;energy window
 
758
 
 
759
       number of time windows := <Numeric> 1
 
760
       ;defaults to 1 if unspecified- number of different
 
761
       ;sets of time intervals
 
762
 
 
763
       for ( number of time windows, time window number)
 
764
       {
 
765
            !Gated Study (each time window) := <NULL>
 
766
 
 
767
            !time window number := <Numeric>
 
768
            ;starting from 1
 
769
 
 
770
*           !number of images in time window := <Numeric>
 
771
            ;eg 24 NOTE that here in gated SPECT is means images/angle
 
772
 
 
773
            !image duration (sec) := <Numeric>
 
774
            ;eg 0.04  for each frame in THIS time window
 
775
 
 
776
            framing method := <ASCIIlist> Forward
 
777
                    Forward|Backward|Mixed|Other
 
778
            ;default is forward
 
779
 
 
780
            time window lower limit (sec) := <Numeric>
 
781
            ;float normally expected, for THIS time window
 
782
 
 
783
            time window upper limit (sec) := <Numeric>
 
784
            ;float normally expected
 
785
 
 
786
            % R-R cycles acquired this window := <Numeric>
 
787
            ;if known
 
788
 
 
789
            number of cardiac cycles (acquired) := <Numeric>
 
790
            ;eg 356 , if known
 
791
 
 
792
            study duration (acquired) sec := <Numeric>
 
793
            ;total  acquisition time duration for
 
794
            ;this window only (if it can be computed!!) as
 
795
            ;opposed to total acquisition time (when different)
 
796
 
 
797
            !maximum pixel count := <Numeric>
 
798
            ;for scaling purposes for all images in this
 
799
            ;time window (and energy window) only
 
800
 
 
801
            R-R histogram := <ASCIIlist> N Y|N
 
802
            ;flag to indicate that one exists!!
 
803
 
 
804
        }
 
805
        ;Repeat for each subsequent time window.
 
806
 
 
807
 
 
808
        ;start of tomographic keys
 
809
 
 
810
        number of detector heads := <Numeric> 1
 
811
        ;default=1 if unspecified
 
812
 
 
813
        for ( number of detector heads )
 
814
        {
 
815
 
 
816
            !number of images/energy window := <Numeric>
 
817
            ;total number of images (for all heads) for
 
818
            ;THIS energy window!!
 
819
 
 
820
            !process status := Reconstructed Acquired|Reconstructed
 
821
            ;used below in conditional- MUST be defined
 
822
 
 
823
            !number of projections := <Numeric>
 
824
            ;for example- 64
 
825
            ;note this is the actual number of images per
 
826
            ;head per energy window if
 
827
            ;the data are acquired, but NOT if the data are
 
828
            ;reconstructed where the number of images is
 
829
            ;specified separately as number of slices
 
830
 
 
831
            !extent of rotation := <Numeric>
 
832
            ;e.g 180, 360
 
833
 
 
834
            !time per projection (sec) := <Numeric>
 
835
            ;important for Acquired data
 
836
            patient orientation := <ASCIIlist> head_in
 
837
                   head_in|feet_in|other
 
838
 
 
839
            patient rotation :=  <ASCIIlist> supine
 
840
                   prone|supine|other
 
841
 
 
842
            if( process status = "acquired")
 
843
            {
 
844
               !SPECT STUDY (acquired data):= <NULL>
 
845
 
 
846
               !direction of rotation := <ASCIIlist> CW CW|CCW
 
847
               ;CW = clockwise, CCW = counter clockwise
 
848
 
 
849
               start angle := <Numeric>
 
850
               ;0 is top-dead-centre, in degrees
 
851
               ;in orientation as specified above
 
852
 
 
853
               first projection angle in data set := <Numeric>
 
854
               ;in degrees expressed with respect to
 
855
               ;anterior-  angles in direction as
 
856
               ;specified CW or CCW
 
857
 
 
858
               acquisition mode := <ASCIIlist> stepped
 
859
                    stepped|continuous
 
860
 
 
861
              Centre_of_rotation :=  <ASCIIlist> Corrected
 
862
                   Corrected|Single_value|For_every_angle
 
863
              ;default is "Corrected"
 
864
              ;"Corrected" corresponds to a null centre of rotation
 
865
              ;correction, as previous required by Interfile, that
 
866
              ;is, no centre of rotation information is to be
 
867
              ;passed. The key "Single value" indicates the
 
868
              ;conventional definition of the centre of rotation
 
869
              ;offset to be a single value specified for all angles,
 
870
              ;specified for each head given a multiple head
 
871
              ;acquisition.
 
872
              ;The key "For_every_angle" indicates that the centre
 
873
              ;of rotation offset will be  specified for each head
 
874
              ;and every angle. This is not currently implemented in
 
875
              ;this Interfile definition, but will be introduced in
 
876
              ;V4.
 
877
              ;The mathematical centre of rotation is assumed to be
 
878
              ;in the exact middle of the projection for example at
 
879
              ;x= 32.5 y=32.5 for a 64x64 image where the count
 
880
              ;starts from 1. Note that the choice of coordinates
 
881
              ;does not matter, the only constraint being the
 
882
              ;assumption that all projections have a length which
 
883
              ;is an even number of pixels. The centre of rotation
 
884
              ;is specified as the offset from that position to the
 
885
              ;perpendicular dropped from a point on the axis of
 
886
              ;rotation onto the head.
 
887
 
 
888
              if( Centre_of_rotation = "Single_value" )
 
889
              {
 
890
 
 
891
               !X_offset := <Numeric>
 
892
               ;x offset for all angles in mm.
 
893
              ;x_offset is the x offset between the perpendicular
 
894
              ;dropped from the centre of rotation and the dead
 
895
              ;centre of the matrix,
 
896
              ;The positive direction for the offset is considered
 
897
              ;to be that of the increasing projection index, e.g.
 
898
              ;for a projection with pixels of size 6mm, which
 
899
              ;should be centred at 32.5, an offset of +6mm
 
900
              ;indicates that the centre of rotation is at 33.5
 
901
              ;Note that since offset is specified in mm, the pixel
 
902
              ;size must be known.
 
903
 
 
904
 
 
905
               Y_offset := <Numeric>
 
906
               ;y offset for all angles in mm
 
907
              ;y_offset is the y offset between that perpendicular
 
908
              ;dropped from the centre of rotation from that point
 
909
              ;on the axis of rotation where the y_offset is
 
910
              ;considered to be zero, and the centre of the camera's
 
911
              ;field of view. Thus y_offset is the RELATIVE shift of
 
912
              ;the y-axis with respect to some arbitrary position,
 
913
              ;normally that from the centre of the filed of view of
 
914
              ;the first at the top dead centre position. Thus for
 
915
              ;a single head, this value would normally be expected
 
916
              ;to be equal to zero.
 
917
 
 
918
               Radius := <Numeric>
 
919
               ;radial distance to centre of rotation in mm,
 
920
              ;for this head.
 
921
 
 
922
 
 
923
               }
 
924
              ;end of centre of rotation specification
 
925
 
 
926
               orbit := <ASCIIlist> Circular Circular|non-circular
 
927
 
 
928
               preprocessed := <ASCII>
 
929
               ;preprocessing method
 
930
            }
 
931
            ; end of process status acquired
 
932
 
 
933
            if( process status = "reconstructed")
 
934
            {
 
935
               !SPECT STUDY (reconstructed data) := <NULL>
 
936
 
 
937
               method of reconstruction := <ASCII>
 
938
 
 
939
               !number of slices := <Numeric>
 
940
               ;i.e. number of images in this set for this
 
941
               ;head and this energy window
 
942
 
 
943
               number of reference frame := <Numeric> 0
 
944
               ;if unspecified the frame number
 
945
               ;originally used for defining slice positions
 
946
               ;0=default [Note- not a very useful key]
 
947
 
 
948
               slice orientation := <ASCIIlist> Transverse
 
949
                   Transverse|Coronal|Sagittal|Other
 
950
               ;default is transverse if unspecified
 
951
 
 
952
               slice thickness (pixels) := <Numeric> 1
 
953
               ;if unspecified 1=default
 
954
 
 
955
               centre-centre slice separation (pixels):=<Numeric> 1
 
956
               ;e.g.1,2,3,4...  as distinct from slice thickness
 
957
               ;the word centre can also be spelt as center
 
958
 
 
959
               filter name :=  <ASCII>
 
960
               ;e.g. Hann, Hamming, Butterworth
 
961
 
 
962
               filter parameters := <ASCII>
 
963
               ;Nyquist freq etc.
 
964
 
 
965
               z-axis filter := <ASCII>
 
966
               ;method [1,2,1] etc.
 
967
 
 
968
               attenuation correction coefficient/cm := <Numeric> 0.0
 
969
               ;default 0 means not done if unspecified
 
970
 
 
971
               method of attenuation correction :=  <ASCII>  none
 
972
 
 
973
               scatter corrected := <ASCIIlist> N Y|N
 
974
 
 
975
               method of scatter correction := <ASCII> none
 
976
 
 
977
               oblique reconstruction := <ASCIIlist> N Y|N
 
978
 
 
979
               oblique orientation := <ASCII>
 
980
               ;free text [Note ACR-NEMA convention preferred]
 
981
            }
 
982
            ;end of reconstructed tomo
 
983
       }
 
984
      ;End of GATED SPECT
 
985
 
 
986
}
 
987
;end of loop for energy windows
 
988
 
 
989
if( type of data = "Curve")
 
990
      {
 
991
       !CURVE DATA := <NULL>
 
992
       ;label to indicate that this is the curve definition
 
993
       ;curves should always be kept in separate data files
 
994
       ;and not together with the administrative data
 
995
 
 
996
       Curve_dimensions := <Numeric> 2
 
997
       ;how many dimensions- ONLY 2 is permitted in V3.3.
 
998
       ;Even if a single vector of values is required
 
999
       ;both matrix size[1] and [2] must be defined
 
1000
       ;although one of them should take the value 1.
 
1001
       ;A set of x,y values is 2 dimensional with normally
 
1002
       ;matrix size[1] or matrix size[2] equal to 2.
 
1003
       ;and the other matrix size specifying
 
1004
       ;the number of PAIRS of values present (see Fig 1).
 
1005
       ;Matrix sizes greater than 2 for BOTH dimensions are not
 
1006
       ;recommended.
 
1007
 
 
1008
       !matrix size[1] := <Numeric>
 
1009
       ;matrix size across (number of columns)
 
1010
 
 
1011
       !matrix size[2] := <Numeric>
 
1012
       ;matrix size down (number of rows)
 
1013
 
 
1014
       !number format := <ASCIIlist> unsigned integer
 
1015
           signed integer|unsigned integer|
 
1016
           long float|short float|bit|ASCII
 
1017
 
 
1018
       !number of bytes per pixel := <Numeric>
 
1019
       ;e.g. 1|2|4|.. [this key ignored for bit data]
 
1020
 
 
1021
       Type_of_curve :=  <ASCII>
 
1022
       ;what kind of curve is it, for example time activity curve
 
1023
       ;ROI indicates that this is a list
 
1024
       ;of vectors corresponding to an ROI.
 
1025
 
 
1026
       for( Curve_dimensions, dimension)
 
1027
       {
 
1028
 
 
1029
          ;When matrix size[1] or matrix size[2] equals 2 (the normal
 
1030
          ;case) such that the data comprise pairs of values,
 
1031
          ;then Label[1],  Units[1] etc. refers to the set of first
 
1032
          ;values for each pair, and Label[2] etc. refers the set of
 
1033
          ;second values for each pair.
 
1034
 
 
1035
          Label[<dimension>] :=  <ASCII>
 
1036
          ;a text label for the corresponding axis  e.g. "counts"
 
1037
 
 
1038
          Units[<dimension>] := <ASCII>
 
1039
          ;units of measurement for the corresponding axis
 
1040
          ;e.g. "units[1]:=counts/sec"
 
1041
 
 
1042
          Min[<dimension>] := <Numeric>
 
1043
          ;Minimum of set of values as indicated in units as defined,
 
1044
          ;optional
 
1045
 
 
1046
          Max[<dimension>] := <Numeric>
 
1047
          ;Maximum value as above, optional
 
1048
 
 
1049
      }
 
1050
     ;End of loop for curve dimensions
 
1051
 
 
1052
}
 
1053
!END OF INTERFILE := <NULL>
 
1054
.fi
 
1055
.PP
 
1056
.in 0.2i
 
1057
.SH FILES
 
1058
.PP
 
1059
.in 0.2i
 
1060
.nf
 
1061
/usr/local/xmedcon/source/m-intf.h      The header file.
 
1062
/usr/local/xmedcon/source/m-intf.c      The source file.
 
1063
.PP
 
1064
.in 0.2i
 
1065
.SH SEE ALSO
 
1066
.PP
 
1067
.in 0.2i
 
1068
medcon(1), xmedcon(1), xmedcon-config(1)
 
1069
.PP
 
1070
.in 0.2i
 
1071
m-acr(4), m-anlz(4), m-gif(5), m-inw(4), m-ecat(4)
 
1072
.PP
 
1073
.in 0.2i
 
1074
medcon(3)
 
1075
.PP
 
1076
.in 0.2i
 
1077
.SH AUTHOR
 
1078
.PP
 
1079
.in 0.2i
 
1080
.I (X)MedCon
 
1081
project was written by Erik Nolf (eNlf) for the PET-Centre at Ghent University (Belgium).
 
1082
.PP
 
1083
.in 0.2i
 
1084
.TS
 
1085
tab(=);
 
1086
lB l lB l.
 
1087
e-mail:=enlf@users.sourceforge.net=www:=http://xmedcon.sourceforge.net
 
1088
.TE
 
1089