一、简介
InterFile 3.3医学图像格式(MedCon), 该文件由两部分组成, the administrative data in ASCII and the binary image data. 可以将这两个文件放在一个文件中,但是我们更倾向于将数据分成两个文件。The administrative data in a file with extension ‘.h33’ and the binary data in a file with extension ‘.i33’。
二、文件格式
1、ADMINISTRATIVE DATA
a) 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).
b) 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:
patient name := Elvis Presley <cr><lf>
c) The maximum permitted number of characters for a key or a value or a comment is 255 characters.
d) 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.
e) 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.
f) A hole line or key-value pairs may have comments appended to them by preceding the comment with a semicolon <;>.
g) 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.
h) 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.
2、 IMAGE DATA
a) The order of the pixel data shall increment by column from left to right, and then by row, from top to bottom.
b) 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.
c) 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.
d) 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.
三、文件内容
1、!INTERFILE
!INTERFILE := <NULL>
;to indicate that this is an Interfile file
!imaging modality := <ASCII> nucmed
;only nucmed is defined for the purpose of this document
!originating system := <ASCII>
;eg.GAMMA-11, MDS, ADAC, etc.
!version of keys := <Numeric> 3.3
;future versions shall increment
date of keys := <DateFormat> 1996:09:26
;date of version 3.3 in date format
conversion program := <ASCII>
;name of program used
program author := <ASCII>
;your chance of fame and fortune
program version := <Numeric>
;to keep track of conversion programs
program date := <DateFormat>
;date of program
2、!GENERAL DATA
!GENERAL DATA := <NULL>
;required but can be treated as comment
original institution := <ASCII>
;name of hospital etc.
contact person := <ASCII>
;another chance of fame (and fortune?)
data description := <ASCII>
;whatever you want
!data starting block := <Numeric> 0
;the value is the offset in blocks of 2048 bytes in either the
;administrative or the data file depending on the key value for
;name of data file (see below)
| ;
OR
!data offset in bytes:= <Numeric> 0
;as above but the offset may be specified freely in bytes
!name of data file := <ASCII> <NULL>
;<NULL> if no image data exists
;key is a name of the file where the data are present, either when
;in a separate binary data file, or when in a combined
;administrative/binary data file
patient name := <ASCII>
;last name, first name (recommended)
!patient ID := <ASCII>
;as used in your hospital
patient dob := <DateFormat>
;date of birth
patient sex := <ASCIIlist> Unknown M|F|Unknown
;default is Unknown!
!study ID := <ASCII>
;as local conditions dictate
exam type := <ASCII>
;description of procedure as above
data compression := <ASCII> none
;name of algorithm if present- e.g. JPEG, etc.
data encode := <ASCII> none
;name of method of encoding if present- e.g. uuencode etc.
organ := <ASCII> none
;ENLF: for mapping with DICOM tag (0018,0015) BodyPartExamined
isotope := <ASCII> | <ASCII>/<ASCII> none
;ENLF: for mapping with DICOM radionuclide/radiopharmaceutical entries.
dose := <Numeric> 0
;ENLF: for mapping with DICOM tag (0018,1074) RadionuclideTotalDose [MBq]
3、!GENERAL IMAGE DATA
!GENERAL IMAGE DATA := <NULL>
;again required but treated as comment
!type of data := <ASCIIlist> Other
Static|Dynamic|Gated|Tomographic|Curve|ROI|GSPECT|Other
;important - this key is used for many conditionals
!total number of images := <Numeric>
;how many images are there altogether in total in the associated
;data file (for all windows etc.). This overrides any other way of
;calculating the total number of images.
study date := <DateFormat>
;date of the first image included in the data file
study time := <TimeFormat>
;time for the start of first image specified
imagedata byte order := <ASCIIlist> BIGENDIAN
BIGENDIAN|LITTLEENDIAN
;BIGENDIAN is the default if unspecified
process label := <ASCII> none
;ENLF: for mapping with DICOM tag (0008,103E) SeriesDescription
quantification units := +1.696265e-05
;ENLF: global scale factor for mediman dialect
NUD/rescale slope := +1.696265e-05
;ENLF: global scale factor for NUD systems
NUD/rescale intercept := +0.000000e+00
;ENLF: global scale intercept for NUD systems
number of energy windows := <Numeric> 1
;defaulted to one if unspecified
4、
for ( number of energy windows, energy window)
{
energy window[<energy window>] := <ASCII>
;ASCII text- for example "Tc99m