DESCRIPTION

This is a local file format used at the RUG (Ghent, Belgium). The headers and image data are written in one file with extension `.im'.

The basic defines for the format:

---------------------------------------------------------------------------
typedef struct Head_start_t {

        Int32 mark;           /* should be HEADER_MARK                */
        Int16 version;        /* high*256 + low                       */
        Int16 size_header;    /* whole header (in bytes)              */
        Int16 size_start;     /* sizeof(Head_start_t)                 */
        Int16 size_gen;       /* sizeof(Head_gen_t)                   */
        Int16 size_spec;      /* sizeof(Head_spec_t)                  */
        char  reserved[10];

} MDC_INW_HEAD_START;         /* current size: 24                     */

#define MDC_INW_HEAD_START_SIZE 24

typedef struct Head_gen_t {

        Int16 no;             /* number of planes                     */
        Int16 sizeX;          /* number of columns                    */
        Int16 sizeY;          /* number of rows                       */
        Int16 pixel_type;     /* sizeof(pixel)                        */
                              /* for compatibility only 2 is allowed  */
        Int16 init_trans;     /* initial translation (mm)             */
        Int16 dummy1;         /* for alignment reasons only           */

        /* Note: We take the positive axis into the gantry !
                 This means, if the patient lies with his head into
                 the gantry, the head has higher translation offset
                 than his feet                                        */

        char  day[12];        /* day of first scan eg. 04-AUG-89      */
        Int32 time;           /* seconds after midnight               */
                              /* first scan or time activity measured */
        float decay_cst;      /* NOT half_life ! (discards log(2))    */
                              /* decay_cst = half_life / log(2)       */
        float pixel_size;     /* sampling distance (mm)               */
        float max;            /* scaled maximum of all images         */
        float min;
        Int16 scanner;        /* EcatII, EcatIV                       */
        char  reconstruction; /* reconFBP, reconMaxLik,...            */
        char  recon_version;  /* reconstruction version (0-99)        */
        char  reserved[24];

} MDC_INW_HEAD_GEN;           /* current size: 72                     */

#define MDC_INW_HEAD_GEN_SIZE 72

typedef struct Head_spec_t {

        Int32 time;           /* time relative to gen.time (secs)     */
        float cal_cst;        /* abs_activ(uCU/ml) = cal_cst*pix_val  */
                              /* cal_cst = calibr_cst * decay_comp    */
                              /* decay_comp = exp(time/decay_cst)     */
        Int32 max;            /* maximum in plane                     */
        Int32 min;            /* minimum in plane                     */
        Int16 trans;          /* translation relative to gen.trans mm */
        char  reserved[6];

} MDC_INW_HEAD_SPEC;          /* current size: 24                     */

#define MDC_INW_HEAD_SPEC_SIZE 24

---------------------------------------------------------------------------

What does the format support or not support:

===========================================================================
Item            Supported                             Not Supported
===========================================================================
Color Map     : grayscale                                   -
File Endian   : little                                     big
Pixeltypes    : Int16                                       -
===========================================================================
Scaling factors  : quantify or calibrate factors/image are supported
---------------------------------------------------------------------------
Dimensions/Image : different dimensions for each image are NOT supported
---------------------------------------------------------------------------
Pixeltypes/Image : different pixeltypes for each image are NOT supported
===========================================================================

NOTES

The first two structures in the file are HEAD_START and HEAD_GEN. After these data structures, a number of HEAD_SPEC structures follow, as much as there are images in the file. The float values in the headers are stored as VAX floats!

Following the headers are the binary image data. The images are stored from left to right and from top to bottom. The pixel values are Int16, little endian.

FILES

/usr/local/xmedcon/source/m-inw.h     The header file.
/usr/local/xmedcon/source/m-inw.c     The source file.

RELATED TO m-inw…

AUTHOR

(X)MedCon project was originally written by Erik Nolf (eNlf) for the former PET-Centre at Ghent University (Belgium).

e-mail: enlf-at-users.sourceforge.net www: http://xmedcon.sourceforge.net