4
m-intf - InterFile 3.3 medical image format (MedCon)
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'.
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.
14
The basic defines for the format:
18
---------------------------------------------------------------------------
20
#define MDC_INTF_MAXKEYCHARS 256
22
char keystr[MDC_INTF_MAXKEYCHARS];
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
32
/* the process status */
33
#define MDC_INTF_ACQUIRED 1
34
#define MDC_INTF_RECONSTRUCTED 2
36
/* gated spect nesting outer level */
37
#define MDC_INTF_NESTING_SPECT 1
38
#define MDC_INTF_NESTING_GATED 2
40
typedef struct MdcInterFile_t {
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;
53
---------------------------------------------------------------------------
57
What does the format support or not support:
61
===========================================================================
62
Item Supported Not Supported
63
===========================================================================
64
Color Map : grayscale -
65
File Endian : little or big -
66
Pixeltypes : 1-bit, all intergers -
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
===========================================================================
81
Underneath you will find a description of the format.
84
1. ADMINISTRATIVE DATA
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).
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:
96
patient name := Elvis Presley <cr><lf>
98
The maximum permitted number of characters for a key or a value or a comment is 255 characters.
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.
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.
104
A hole line or key-value pairs may have comments appended to them by preceding the comment with a semicolon <;>.
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.
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.
117
The order of the pixel data shall increment by column from left to right, and then by row, from top to bottom.
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.
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.
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.
126
3. LIST OF KEYS - VERSION 3.3 (Updated for Gated SPECT)
128
==========================
133
;to indicate that this is an Interfile file
135
!imaging modality := <ASCII> nucmed
136
;only nucmed is defined for the purpose of this document
138
!originating system := <ASCII>
139
;eg.GAMMA-11, MDS, ADAC, etc.
141
!version of keys := <Numeric> 3.3
142
;future versions shall increment
144
date of keys := <DateFormat> 1996:09:26
145
;date of version 3.3 in date format
147
conversion program := <ASCII>
148
;name of program used
150
program author := <ASCII>
151
;your chance of fame and fortune
153
program version := <Numeric>
154
;to keep track of conversion programs
156
program date := <DateFormat>
159
!GENERAL DATA := <NULL>
160
;required but can be treated as comment
162
original institution := <ASCII>
163
;name of hospital etc.
165
contact person := <ASCII>
166
;another chance of fame (and fortune?)
168
data description := <ASCII>
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)
176
!data offset in bytes:= <Numeric> 0
177
;as above but the offset may be specified freely in bytes
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
185
patient name := <ASCII>
186
;last name, first name (recommended)
188
!patient ID := <ASCII>
189
;as used in your hospital
191
patient dob := <DateFormat>
194
patient sex := <ASCIIlist> Unknown M|F|Unknown
198
;as local conditions dictate
201
;description of procedure as above
203
data compression := <ASCII> none
204
;name of algorithm if present- e.g. JPEG, etc.
206
data encode := <ASCII> none
207
;name of method of encoding if present- e.g. uuencode etc.
209
organ := <ASCII> none
210
;ENLF: for mapping with DICOM tag (0018,0015) BodyPartExamined
212
isotope := <ASCII> | <ASCII>/<ASCII> none
213
;ENLF: for mapping with DICOM radionuclide/radiopharmaceutical entries.
216
;ENLF: for mapping with DICOM tag (0018,1074) RadionuclideTotalDose [MBq]
218
!GENERAL IMAGE DATA := <NULL>
219
;again required but treated as comment
221
!type of data := <ASCIIlist> Other
222
Static|Dynamic|Gated|Tomographic|Curve|ROI|GSPECT|Other
223
;important - this key is used for many conditionals
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.
230
study date := <DateFormat>
231
;date of the first image included in the data file
233
study time := <TimeFormat>
234
;time for the start of first image specified
236
imagedata byte order := <ASCIIlist> BIGENDIAN
237
BIGENDIAN|LITTLEENDIAN
238
;BIGENDIAN is the default if unspecified
240
process label := <ASCII> none
241
;ENLF: for mapping with DICOM tag (0008,103E) SeriesDescription
243
quantification units := +1.696265e-05
244
;ENLF: global scale factor for mediman dialect
246
NUD/rescale slope := +1.696265e-05
247
;ENLF: global scale factor for NUD systems
249
NUD/rescale intercept := +0.000000e+00
250
;ENLF: global scale intercept for NUD systems
252
number of energy windows := <Numeric> 1
253
;defaulted to one if unspecified
255
for ( number of energy windows, energy window)
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>
262
;energy window[3]:= <ASCII>
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
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
276
flood corrected := <ASCIIlist> Y Y|N
277
;corrected if unspecified
279
decay corrected := <ASCIIlist> N Y|N
280
;not corrected if unspecified
282
if( type of data = "Static"|"ROI")
284
!STATIC STUDY (General) := <NULL>
285
;label to indicate that this is the static definition
287
number of images/energy window := <Numeric> 1
288
;number of images in THIS energy window
290
for ( number of images/energy window )
292
!Static Study (each frame) := <NULL>
293
;included at the beginning of the definition of
294
;each new static frame
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!!
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
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
311
!number format := <ASCIIlist> unsigned integer
312
signed integer|unsigned integer
313
|long float|short float|bit|ASCII
316
!number of bytes per pixel := <Numeric>
317
;e.g. 1|2|4.. [this key ignored for bit data]
319
scaling factor (mm/pixel) [1]:= <Numeric>
320
;size of pixel across- previously x
322
scaling factor (mm/pixel) [2] := <Numeric>
323
;size of pixel down- previously y
325
image duration (sec) := <Numeric>
326
;eg. 120.0 i.e. normally a float, for each image
328
image start time := <TimeFormat>
334
maximum pixel count := <Numeric>
335
;for scaling purposes, for each image
337
total counts := <Numeric>
338
;either an integer or a float, for each image
341
;End of frame loop -Repeat for each subsequent frame
343
;End of static definitions
346
if( type of data = "Dynamic")
348
!DYNAMIC STUDY (general) := <NULL>
349
;label to indicate that this is a dynamic study
351
!number of frame groups := <Numeric> 1
354
for( number of frame groups, frame group number)
356
!Dynamic Study (each frame group) := <NULL>
357
;Repeated for each group of frames as
359
;indication of the start of the
360
;definition of the new group
362
!frame group number := <Numeric>
363
;numbering starts from 1 (must be specified)
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
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
375
!number format := <ASCIIlist> unsigned integer
376
signed integer|unsigned integer|
377
long float|short float|bit|ASCII
380
!number of bytes per pixel := <Numeric>
381
;e.g. 1|2|4.. [this key ignored for bit data]
383
scaling factor (mm/pixel) [1]:= <Numeric>
384
;size of pixel across- previously x
386
scaling factor (mm/pixel) [2] := <Numeric>
387
;size of pixel down- previously y
389
!number of images this frame group := <Numeric>
390
;for each frame group
391
;(for each energy window)
393
!image duration (sec) := <Numeric>
394
;eg 0.2, for each frame group
395
;(for each energy window)
397
pause between images (sec) := <Numeric> 0.0
398
;eg 0.0, default is 0.0
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
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!!
410
;Repeat for each subsequent frame group
413
; End of dynamic definitions
416
if( type of data = "Gated")
418
!GATED STUDY (general) := <NULL>
419
;again a flag to indicate a gated study
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
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
429
!number format := <ASCIIlist> unsigned integer
430
signed integer|unsigned integer|
431
long float|short float|bit|ASCII
434
!number of bytes per pixel := <Numeric>
435
;e.g. 1|2|4|..> [this key ignored for bit data]
437
scaling factor (mm/pixel) [1]:= <Numeric>
438
;size of pixel across- previously x
440
scaling factor (mm/pixel) [2] := <Numeric>
441
;size of pixel down- previously y
443
study duration (elapsed) sec := <Numeric>
444
;eg 300, total elapsed time for whole study
446
number of cardiac cycles (observed) := <Numeric>
447
;total number of cycles if known, for this
450
number of time windows := <Numeric> 1
451
;defaults to 1 if unspecified- number of different
452
;sets of time intervals
454
for ( number of time windows, time window number)
456
!Gated Study (each time window) := <NULL>
458
!time window number := <Numeric>
461
!number of images in time window := <Numeric>
464
!image duration (sec) := <Numeric>
465
;eg 0.04 for each frame in THIS time window
467
framing method := <ASCIIlist> Forward
468
Forward|Backward|Mixed|Other
471
time window lower limit (sec) := <Numeric>
472
;float normally expected, for THIS time window
474
time window upper limit (sec) := <Numeric>
475
;float normally expected
477
% R-R cycles acquired this window := <Numeric>
480
number of cardiac cycles (acquired) := <Numeric>
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)
488
!maximum pixel count := <Numeric>
489
;for scaling purposes for all images in this
490
;time window (and energy window) only
492
R-R histogram := <ASCIIlist> N Y|N
493
;flag to indicate that one exists!!
496
;Repeat for each subsequent time window.
499
;end of gated definitions
502
if( type of data = "Tomographic")
505
!SPECT STUDY (general) := <NULL>
506
;flag to indicate tomographic data with no effect as such
508
number of detector heads := <Numeric> 1
509
;default=1 if unspecified
511
for ( number of detector heads )
514
!number of images/energy window := <Numeric>
515
;total number of images (for all heads) for
516
;THIS energy window!!
518
!process status := Reconstructed Acquired|Reconstructed
519
;used below in conditional- MUST be defined
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
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
529
!number format := <ASCIIlist> unsigned integer
530
signed integer|unsigned integer|
531
long float|short float|bit|ASCII
534
!number of bytes per pixel := <Numeric>
535
;e.g. 1|2|4|.. [this key ignored for bit data]
537
scaling factor (mm/pixel) [1]:= <Numeric>
538
;size of pixel across- previously x
540
scaling factor (mm/pixel) [2] := <Numeric>
541
;size of pixel down- previously y
543
!number of projections := <Numeric>
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
551
!extent of rotation := <Numeric>
554
!time per projection (sec) := <Numeric>
555
;important for Acquired data
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!!
562
!maximum pixel count := <Numeric>
563
;for scaling- in THIS image series( this head
564
;and this energy window)
566
patient orientation := <ASCIIlist> head_in
567
head_in|feet_in|other
569
patient rotation := <ASCIIlist> supine
572
if( process status = "acquired")
574
!SPECT STUDY (acquired data):= <NULL>
576
!direction of rotation := <ASCIIlist> CW CW|CCW
577
;CW = clockwise, CCW = counter clockwise
579
start angle := <Numeric>
580
;0 is top-dead-centre, in degrees
581
;in orientation as specified above
583
first projection angle in data set := <Numeric>
584
;in degrees expressed with respect to
585
;anterior- angles in direction as
588
acquisition mode := <ASCIIlist> stepped
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
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
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.
618
if( Centre_of_rotation = "Single_value" )
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
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.
649
;radial distance to centre of rotation in mm,
654
;end of centre of rotation specification
656
orbit := <ASCIIlist> Circular Circular|non-circular
658
preprocessed := <ASCII>
659
;preprocessing method
662
; end of process status acquired
664
if( process status = "reconstructed")
666
!SPECT STUDY (reconstructed data) := <NULL>
668
method of reconstruction := <ASCII>
670
!number of slices := <Numeric>
671
;i.e. number of images in this set for this
672
;head and this energy window
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]
679
slice orientation := <ASCIIlist> Transverse
680
Transverse|Coronal|Sagittal|Other
681
;default is transverse if unspecified
683
slice thickness (pixels) := <Numeric> 1
684
;if unspecified 1=default
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
690
filter name := <ASCII>
691
;e.g. Hann, Hamming, Butterworth
693
filter parameters := <ASCII>
696
z-axis filter := <ASCII>
699
attenuation correction coefficient/cm := <Numeric> 0.0
700
;default 0 means not done if unspecified
702
method of attenuation correction := <ASCII> none
704
scatter corrected := <ASCIIlist> N Y|N
706
method of scatter correction := <ASCII> none
708
oblique reconstruction := <ASCIIlist> N Y|N
710
oblique orientation := <ASCII>
711
;free text [Note ACR-NEMA convention preferred]
713
;end of reconstructed tomo
718
* if( type of data = "GSPECT")
720
* !GATED SPECT STUDY (general) := <NULL>
721
;again a flag to indicate a gated SPECT study
722
;MIXTURE OF GATED & TOMO
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
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
732
!number format := <ASCIIlist> unsigned integer
733
signed integer|unsigned integer|
734
long float|short float|bit|ASCII
737
!number of bytes per pixel := <Numeric>
738
;e.g. 1|2|4|..> [this key ignored for bit data]
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
746
scaling factor (mm/pixel) [1]:= <Numeric>
747
;size of pixel across- previously x
749
scaling factor (mm/pixel) [2] := <Numeric>
750
;size of pixel down- previously y
752
study duration (elapsed) sec := <Numeric>
753
;eg 300, total elapsed time for whole study
755
number of cardiac cycles (observed) := <Numeric>
756
;total number of cycles if known, for this
759
number of time windows := <Numeric> 1
760
;defaults to 1 if unspecified- number of different
761
;sets of time intervals
763
for ( number of time windows, time window number)
765
!Gated Study (each time window) := <NULL>
767
!time window number := <Numeric>
770
* !number of images in time window := <Numeric>
771
;eg 24 NOTE that here in gated SPECT is means images/angle
773
!image duration (sec) := <Numeric>
774
;eg 0.04 for each frame in THIS time window
776
framing method := <ASCIIlist> Forward
777
Forward|Backward|Mixed|Other
780
time window lower limit (sec) := <Numeric>
781
;float normally expected, for THIS time window
783
time window upper limit (sec) := <Numeric>
784
;float normally expected
786
% R-R cycles acquired this window := <Numeric>
789
number of cardiac cycles (acquired) := <Numeric>
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)
797
!maximum pixel count := <Numeric>
798
;for scaling purposes for all images in this
799
;time window (and energy window) only
801
R-R histogram := <ASCIIlist> N Y|N
802
;flag to indicate that one exists!!
805
;Repeat for each subsequent time window.
808
;start of tomographic keys
810
number of detector heads := <Numeric> 1
811
;default=1 if unspecified
813
for ( number of detector heads )
816
!number of images/energy window := <Numeric>
817
;total number of images (for all heads) for
818
;THIS energy window!!
820
!process status := Reconstructed Acquired|Reconstructed
821
;used below in conditional- MUST be defined
823
!number of projections := <Numeric>
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
831
!extent of rotation := <Numeric>
834
!time per projection (sec) := <Numeric>
835
;important for Acquired data
836
patient orientation := <ASCIIlist> head_in
837
head_in|feet_in|other
839
patient rotation := <ASCIIlist> supine
842
if( process status = "acquired")
844
!SPECT STUDY (acquired data):= <NULL>
846
!direction of rotation := <ASCIIlist> CW CW|CCW
847
;CW = clockwise, CCW = counter clockwise
849
start angle := <Numeric>
850
;0 is top-dead-centre, in degrees
851
;in orientation as specified above
853
first projection angle in data set := <Numeric>
854
;in degrees expressed with respect to
855
;anterior- angles in direction as
858
acquisition mode := <ASCIIlist> stepped
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
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
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.
888
if( Centre_of_rotation = "Single_value" )
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
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.
919
;radial distance to centre of rotation in mm,
924
;end of centre of rotation specification
926
orbit := <ASCIIlist> Circular Circular|non-circular
928
preprocessed := <ASCII>
929
;preprocessing method
931
; end of process status acquired
933
if( process status = "reconstructed")
935
!SPECT STUDY (reconstructed data) := <NULL>
937
method of reconstruction := <ASCII>
939
!number of slices := <Numeric>
940
;i.e. number of images in this set for this
941
;head and this energy window
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]
948
slice orientation := <ASCIIlist> Transverse
949
Transverse|Coronal|Sagittal|Other
950
;default is transverse if unspecified
952
slice thickness (pixels) := <Numeric> 1
953
;if unspecified 1=default
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
959
filter name := <ASCII>
960
;e.g. Hann, Hamming, Butterworth
962
filter parameters := <ASCII>
965
z-axis filter := <ASCII>
968
attenuation correction coefficient/cm := <Numeric> 0.0
969
;default 0 means not done if unspecified
971
method of attenuation correction := <ASCII> none
973
scatter corrected := <ASCIIlist> N Y|N
975
method of scatter correction := <ASCII> none
977
oblique reconstruction := <ASCIIlist> N Y|N
979
oblique orientation := <ASCII>
980
;free text [Note ACR-NEMA convention preferred]
982
;end of reconstructed tomo
987
;end of loop for energy windows
989
if( type of data = "Curve")
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
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
1008
!matrix size[1] := <Numeric>
1009
;matrix size across (number of columns)
1011
!matrix size[2] := <Numeric>
1012
;matrix size down (number of rows)
1014
!number format := <ASCIIlist> unsigned integer
1015
signed integer|unsigned integer|
1016
long float|short float|bit|ASCII
1018
!number of bytes per pixel := <Numeric>
1019
;e.g. 1|2|4|.. [this key ignored for bit data]
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.
1026
for( Curve_dimensions, dimension)
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.
1035
Label[<dimension>] := <ASCII>
1036
;a text label for the corresponding axis e.g. "counts"
1038
Units[<dimension>] := <ASCII>
1039
;units of measurement for the corresponding axis
1040
;e.g. "units[1]:=counts/sec"
1042
Min[<dimension>] := <Numeric>
1043
;Minimum of set of values as indicated in units as defined,
1046
Max[<dimension>] := <Numeric>
1047
;Maximum value as above, optional
1050
;End of loop for curve dimensions
1053
!END OF INTERFILE := <NULL>
1061
/usr/local/xmedcon/source/m-intf.h The header file.
1062
/usr/local/xmedcon/source/m-intf.c The source file.
1068
medcon(1), xmedcon(1), xmedcon-config(1)
1071
m-acr(4), m-anlz(4), m-gif(5), m-inw(4), m-ecat(4)
1081
project was written by Erik Nolf (eNlf) for the PET-Centre at Ghent University (Belgium).
1087
e-mail:=enlf@users.sourceforge.net=www:=http://xmedcon.sourceforge.net