Bio-Rad(TM) .PIC Image File Information
(taken from: "Introductory Edited Version 1.0", issue 1/12/93.)
(Location of Image Calibration Parameters in Comos 6.03 and MPL .PIC files)

The general structure of Bio-Rad .PIC files is as follows:

    HEADER (76 bytes)
    Image data (#1)
    .
    .
    Image data (#npic)
    NOTE (#1)
    .                       ; NOTES are optional.
    .
    NOTE (#notes)
    RGB LUT (color Look Up Table)


Header Information:

The header of Bio-Rad .PIC files is fixed in size, and is 76 bytes.

------------------------------------------------------------------------------
'C' Definition              byte    size    Information
                                   (bytes)   
------------------------------------------------------------------------------
int nx, ny;                 0       2*2     image width and height in pixels
int npic;                   4       2       number of images in file
int ramp1_min, ramp1_max;   6       2*2     LUT1 ramp min. and max.
NOTE *notes;                10      4       no notes=0; has notes=non zero
BOOL byte_format;           14      2       bytes=TRUE(1); words=FALSE(0)
int n;                      16      2       image number within file
char name[32];              18      32      file name
int merged;                 50      2       merged format
unsigned color1;            52      2       LUT1 color status
unsigned file_id;           54      2       valid .PIC file=12345
int ramp2_min, ramp2_max;   56      2*2     LUT2 ramp min. and max.
unsigned color2;            60      2       LUT2 color status
BOOL edited;                62      2       image has been edited=TRUE(1)
int _lens;                  64      2       Integer part of lens magnification
float mag_factor;           66      4       4 byte real mag. factor (old ver.)
unsigned dummy[3];          70      6       NOT USED (old ver.=real lens mag.)
------------------------------------------------------------------------------

Additional information about the HEADER structure:

Bytes   Description     Details
------------------------------------------------------------------------------
0-9     nx, ny, npic, ramp1_min, ramp1_max; (all are 2-byte integers)

10-13   notes           NOTES are present in the file, otherwise there are
                        none.  NOTES follow immediately after image data at
                        the end of the file.  Each note os 96 bytes long.

14-15   byte_format     Read as a 2 byte integer.  If this is set to 1, then
                        each pixel is 8-bits; otherwise pixels are 16-bits.

16-17   n               Only used in COMOS/SOM when the file is loaded into
                        memory.

18-49   name            The name of the file (without path); zero terminated.

50-51   merged

52-53   colour1

54-55   file_id         Read as a 2 byte integer.  Aways set to 12345.
                        Just a check that the file is in Bio-Rad .PIC format.

56-59   ramp2_min/max   Read as 2 byte integers.

60-61   color2          Read as a 2 byte integer.

62-63   edited          Not used in disk files.

64-65   int_lens        Read as a 2 byte integer.
                        Integer part of the objective lens used.

66-69   mag_factor      Read as a 4-byte real.
                  
        mag. factor=(float)(dispbox.dy*2)/(float)(512.0*scandata.ly)
    
        where:  dispbox.dy = the width of the image.
                scandata.ly = the width of the scan region.

        the pixel size in microns can be calculated as follows:

        pixel size = scale_factor/lens/mag_factor
    
        where:  lens = the objective lens used as a floating pt. number
                scale_factor = the scaling number setup for the system
                               on which the image was collected.

70-75   dummy[3]    Last 6 bytes not used in current version of disk file
                    format. (older versions stored a 4 byte real lens mag
                    here.)
------------------------------------------------------------------------------

Information about NOTE structure and the RGB LUT are not included in this
file.  Please see the Bio-Rad manual for more information.
