Extract Image from File

Extract Image from File

This option is designed to extract an image from a data file of arbitrary format. The only restrictions are that the image is uncompressed and stored as one byte per pixel. The original motivation for this routine was to extract images from a file created by a numerical simulation where a three-dimensional concentration field was stored as a function of time.

Facilities are provided to flip, transpose, rescale, examine and copy the images extracted to allow for easy conversion to images appropriate for other components of DigImage. If you are expecting to do a substantial amount of processing of such images, it is probably easier and more efficient to convert the images to a movie before undertaking the processing.

The following return variables are available:

           !!R0    it      The time index
           !!R1    ix      The view plane along the x axis
           !!R2    jy      The view plane along the y axis
           !!R3    kz      The view plane along the z axis
           !!R4    Failure Set to 0 if image loaded successfully, 1 if
                           failure (probably reading past end of file).

If a failure occurs during the load operation, the image and status variables may not be correct.

Extract image into which buffer ?

Specify the buffer to which the extracted image is to be copied. This buffer will be made the current output buffer to display the image.

Name of file containing image data ?

The name of the file from which the image is to be extracted should be given. There is no default extension for this file.

Size of the header information (in bytes) ?

Specify the number of bytes at the start of the file which contain header information. If you do not know this, it may be necessary to determine it by trial and error. If the file was created as "unformatted" rather than "binary", then there will be four or eight bytes of record length information for each WRITE statement used to produce the file.

Number of bytes acting as a header for each time step ?

In addition to the header at the start of the file, each time step may have a number of bytes of header information associated with it. Enter the appropriate value here. If there is no header for each time step, then enter zero. If the file was created as "unformatted" rather than "binary", then there will be four or eight bytes of record length information for each WRITE statement used to produce the file.

Number of pixels in the x direction ?

This entry specifies the number of pixels/mesh points in the x (horizontal) direction. The maximum number of pixels/mesh points in any direction is restricted to 512.

Number of pixels in the y direction ?

This entry specifies the number of pixels/mesh points in the x (horizontal) direction.

Number of pixels in the z direction ?

This entry specifies the number of pixels/mesh points in the z (vertical) direction.

Loading image...

It may take some time to load the image.

Displaying image...

x coordinate index for view plane ?

Specify the x coordinate index for the view plane.

y coordinate index for view plane ?

Specify the y coordinate index for the view plane.

z coordinate index for view plane ?

Specify the z coordinate index for the view plane.

Time index ?

Specify the time index for the view plane.

Copy image to which buffer ?

Specify the buffer to which you wish to copy this image.

Errors, Warnings and Messages

Error Message: Unable to open requested image data file

The requested file could not be opened. It may not exist, or it may be in use by another application.

Warning Message: Unable to load some or all of the image at the requested time/position. Reverting to previous data. !!R4 set to -1 to indicate failure. You should reload the image.

The most probable cause is an attempt was made to read past the end of the file.

Parent menu

Main Menu

DigImage User Documentation


Stuart Dalziel, last page update: 19 February 1996